49 void start(
bool demo);
Manages the main game loop, rendering, and application state.
void runLoop()
The main game loop that runs continuously while the game is active. This loop calls the input,...
SDL_Window * m_window
Pointer to the SDL_Window.
SDL_Renderer * m_renderer
Pointer to the SDL_Renderer used for all rendering in the game.
void advanceFrame()
Advances the game frame, updating timing and FPS calculations.
float m_FPS
Frames per second, updated during the game loop to measure performance.
void render()
Renders the game state to the window. This function should be called once per frame to draw all game ...
void printStats()
Prints current game statistics like FPS.
bool m_gameIsRunning
Flag to control the game loop.
void start(bool demo)
Starts the game application, initializing all necessary resources.
~GameApplication()
Destructor that cleans up SDL resources.
void input()
Processes input from the user. This function should be called in the game loop to handle events like ...
GameApplication(std::string title)
Constructs a GameApplication with a specified window title.
void update()
Updates the game state. This function should be called once per frame to update the state of the game...