You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
859 B
44 lines
859 B
#include "builder.hpp"
|
|
#include "gui.hpp"
|
|
#include "config.hpp"
|
|
#include <fmt/core.h>
|
|
#include "sound.hpp"
|
|
#include "textures.hpp"
|
|
#include "shaders.hpp"
|
|
#include <unistd.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int opt = 0;
|
|
int timer_seconds = 60 * 60;
|
|
|
|
while((opt = getopt(argc, argv, "t:c:")) != -1) {
|
|
switch(opt) {
|
|
case 't':
|
|
timer_seconds = atoi(optarg) * 60;
|
|
fmt::println("Setting count down timer to {} seconds.", timer_seconds);
|
|
break;
|
|
case 'c':
|
|
Config::set_base_dir(optarg);
|
|
break;
|
|
}
|
|
}
|
|
|
|
sound::init();
|
|
shaders::init();
|
|
textures::init();
|
|
|
|
GameEngine game{100};
|
|
GUI gui(timer_seconds);
|
|
auto builder = Builder(gui, game);
|
|
|
|
gui.startup();
|
|
|
|
while(gui.is_open()) {
|
|
builder.event(BuildEvent::GO);
|
|
gui.main_loop();
|
|
}
|
|
|
|
builder.event(BuildEvent::QUIT);
|
|
return 0;
|
|
}
|
|
|