The Table Engine
app.cpp
Go to the documentation of this file.
1 #include <iostream>
2 
3 #include "gameapp.h"
4 #include "SDL2/SDL.h"
5 
6 int main(int argc, char* argv[])
7 {
8  GameApplication app("Final project game app!");
9 
10  if (argc > 1 && std::string(argv[1]) == "demo") {
11  std::cout << "Loading demo scene..." << std::endl;
12  app.start(true);
13  } else {
14  std::cout << "Loading scenes from JSON..." << std::endl;
15  app.start(false);
16  }
17 
18  app.runLoop();
19 
20  SDL_Quit();
21  return 0;
22 }
int main(int argc, char *argv[])
Definition: app.cpp:6
Manages the main game loop, rendering, and application state.
Definition: gameapp.h:22
void runLoop()
The main game loop that runs continuously while the game is active. This loop calls the input,...
Definition: gameapp.cpp:158
void start(bool demo)
Starts the game application, initializing all necessary resources.
Definition: gameapp.cpp:47