Skip to content
Snippets Groups Projects
Commit aa716b19 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

rename terrain test in the menu

parent 38a1e10c
No related merge requests found
......@@ -79,13 +79,15 @@ static void setupServiceLocators(fggl::util::ServiceLocator& locator) {
}
int main(int argc, const char* argv[]) {
fggl::App app( "fggl-demo" );
auto& locator = fggl::util::ServiceLocator::instance();
setupServiceLocators(locator);
// Would be nice to not take args like this, it messes with lifetimes
auto& windowing = app.use<fggl::gfx::ecsGlfwModule>(locator.get<fggl::input::Input>());
// create the application
fggl::App app( "fggl-demo" );
// Would be nice to not take args like this, it messes with lifetimes
auto& windowing = app.use<fggl::gfx::ecsGlfwModule>(locator.get<fggl::input::Input>());
// -- should not be our problem - this is a broken api
auto window = windowing.createWindow("Demo Game");
......@@ -101,11 +103,13 @@ int main(int argc, const char* argv[]) {
// Add a basic main menu
auto *menu = app.add_state<fggl::scenes::BasicMenu>("menu");
menu->add("start", [&app]() { app.change_state("game"); });
// add some menu items for the game states
menu->add("terrain", [&app]() { app.change_state("game"); });
menu->add("rollball", [&app]() { app.change_state("rollball"); });
menu->add("quit", [&app]() { app.running(false); });
// the game state itself
// the game states themselves
app.add_state<GameScene>("game");
app.add_state<demo::RollBall>("rollball");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment