The central class responsible for the game loop, window creation, and event handling. More...
#include <Game.h>

Public Member Functions | |
| Game () | |
| Game constructor. | |
| ~Game () | |
| Game deconstructor. | |
| void | init (const char *title, int xpos, int ypos, int width, int height, bool fullscreen) |
| Initializes the SDL window, renderer, and subsystems. | |
| void | handleEvents () |
| Processes SDL events such as keyboard input and window closure. | |
| void | ghostSpawn () |
| Placeholder function for ghost spawning logic. | |
| void | update () |
| Updates the state of the game world. | |
| void | render () |
| Renders all game objects to the screen. | |
| void | clean () |
| Cleans up resources and shuts down SDL. | |
| bool | running () |
| Checks if the game loop is currently running. | |
Static Public Member Functions | |
| static void | setPause (bool pause) |
| Sets the paused state of the game. | |
| static const bool | getPaused () |
| Gets the current paused state of the game. | |
Static Public Attributes | |
| static float | deltaTime |
| The time in seconds it took to complete the last frame. | |
| static float | timeScale |
| A factor to scale time, allowing for slow-motion or fast-forward effects. | |
| static SDL_Event | event |
| The global SDL event object. | |
| static SDL_Renderer * | renderer |
| The global SDL renderer. | |
| static SDL_Point | mouseCoords |
| The current screen coordinates of the mouse. | |
| static bool | mouseButtonPressed |
| True if the primary mouse button is currently pressed. | |
The central class responsible for the game loop, window creation, and event handling.
Gets the current paused state of the game.

Initializes the SDL window, renderer, and subsystems.
| title | The title of the window. |
| xpos | The initial x-position of the window. |
| ypos | The initial y-position of the window. |
| width | The width of the window. |
| height | The height of the window. |
| fullscreen | Whether to start the game in fullscreen mode. |
|
inline |
Checks if the game loop is currently running.
Sets the paused state of the game.
| pause | True to pause the game, false to resume. |