Quick ability to set the countdown timer length.
This commit is contained in:
parent
d4d8c780a4
commit
8a30fafabb
4 changed files with 21 additions and 6 deletions
17
main.cpp
17
main.cpp
|
@ -4,16 +4,29 @@
|
|||
#include "sound.hpp"
|
||||
#include "textures.hpp"
|
||||
#include "shaders.hpp"
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int opt = 0;
|
||||
int timer_seconds = 60 * 60;
|
||||
|
||||
while((opt = getopt(argc, argv, "-t:")) != -1) {
|
||||
switch(opt) {
|
||||
case 't':
|
||||
timer_seconds = atoi(optarg) * 60;
|
||||
fmt::println("Setting count down timer to {} seconds.", timer_seconds);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sound::init();
|
||||
shaders::init();
|
||||
textures::init();
|
||||
|
||||
GameEngine game{100};
|
||||
auto backend = SFMLBackend(game);
|
||||
GUI gui(backend);
|
||||
GUI gui(backend, timer_seconds);
|
||||
auto builder = Builder(gui, game);
|
||||
|
||||
backend.startup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue