group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
main.cpp File Reference

Client application entry point using SDL callback-driven lifecycle. More...

#include "game/Game.hpp"
#include <SDL3/SDL_main.h>
Include dependency graph for main.cpp:

Macros

#define SDL_MAIN_USE_CALLBACKS

Functions

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.

Detailed Description

Client application entry point using SDL callback-driven lifecycle.

Macro Definition Documentation

◆ SDL_MAIN_USE_CALLBACKS

#define SDL_MAIN_USE_CALLBACKS

Function Documentation

◆ SDL_AppEvent()

SDL_AppResult SDL_AppEvent ( void * appstate,
SDL_Event * event )

Forward SDL events to the Game instance.

Parameters
appstateThe Game object.
eventThe 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
appstateOutput pointer that receives the Game object.
argcUnused argument count.
argvUnused 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
appstateThe Game object.
Returns
Application continuation result.

◆ SDL_AppQuit()

void SDL_AppQuit ( void * appstate,
SDL_AppResult  )

Clean up and delete the Game instance on exit.

Parameters
appstateThe Game object.
resultUnused exit result code.
Here is the call graph for this function: