Client application entry point using SDL callback-driven lifecycle.
More...
#include "game/Game.hpp"
#include <SDL3/SDL_main.h>
|
| SDL_AppResult | SDL_AppInit (void **appstate, int, char *[]) |
| | Initialise the client application and create the Game instance.
|
| SDL_AppResult | SDL_AppEvent (void *appstate, SDL_Event *event) |
| | Forward SDL events to the Game instance.
|
| SDL_AppResult | SDL_AppIterate (void *appstate) |
| | Run one iteration of the client game loop.
|
| void | SDL_AppQuit (void *appstate, SDL_AppResult) |
| | Clean up and delete the Game instance on exit.
|
Client application entry point using SDL callback-driven lifecycle.
◆ SDL_MAIN_USE_CALLBACKS
| #define SDL_MAIN_USE_CALLBACKS |
◆ SDL_AppEvent()
| SDL_AppResult SDL_AppEvent |
( |
void * | appstate, |
|
|
SDL_Event * | event ) |
Forward SDL events to the Game instance.
- Parameters
-
| appstate | The Game object. |
| event | The incoming SDL event. |
- Returns
- Application continuation result.
◆ SDL_AppInit()
| SDL_AppResult SDL_AppInit |
( |
void ** | appstate, |
|
|
int | , |
|
|
char * | [] ) |
Initialise the client application and create the Game instance.
- Parameters
-
| appstate | Output pointer that receives the Game object. |
| argc | Unused argument count. |
| argv | Unused argument vector. |
- Returns
- SDL_APP_CONTINUE on success, SDL_APP_FAILURE on error.
◆ SDL_AppIterate()
| SDL_AppResult SDL_AppIterate |
( |
void * | appstate | ) |
|
Run one iteration of the client game loop.
- Parameters
-
- Returns
- Application continuation result.
◆ SDL_AppQuit()
| void SDL_AppQuit |
( |
void * | appstate, |
|
|
SDL_AppResult | ) |
Clean up and delete the Game instance on exit.
- Parameters
-
| appstate | The Game object. |
| result | Unused exit result code. |