Alpha Engine
|
Header file for the game state manager. More...
Go to the source code of this file.
Macros | |
#define | AE_GS_RESTART 0xFFFFFFFE |
Special GameState: Restart. More... | |
#define | AE_GS_QUIT 0xFFFFFFFF |
Special GameState: Quit. More... | |
Functions | |
void | AEGameStateMgrAdd (u32 gameStateIdx, void(*pLoad)(), void(*pInit)(), void(*pUpdate)(), void(*pDraw)(), void(*pFree)(), void(*pUnload)()) |
Create a new GameState and add it to GameStateManager. More... | |
void | AEGameStateMgrInit (u32 gameStateInit) |
Initialize the GameStateManager. More... | |
void | AEGameStateMgrUpdate () |
Update the GameStateManager. More... | |
Variables | |
u32 | gAEGameStateInit |
Initial GameState. More... | |
u32 | gAEGameStateCurr |
Current GameState. More... | |
u32 | gAEGameStatePrev |
Previous GameState. More... | |
u32 | gAEGameStateNext |
Next GameState. More... | |
void(* | AEGameStateLoad )(void) |
Function pointer for load. More... | |
void(* | AEGameStateInit )(void) |
Function pointer for init. More... | |
void(* | AEGameStateUpdate )(void) |
Function pointer for update. More... | |
void(* | AEGameStateDraw )(void) |
Function pointer for draw. More... | |
void(* | AEGameStateFree )(void) |
Function pointer for free. More... | |
void(* | AEGameStateUnload )(void) |
Function pointer for unload. More... | |
Detailed Description
Header file for the game state manager.
- Project: Alpha Engine
- Author
- Sun Tjen Fam
- Date
- October 10, 2007
- Copyright
- Copyright (C) 2013 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited.
Definition in file AEGameStateMgr.h.
Macro Definition Documentation
#define AE_GS_QUIT 0xFFFFFFFF |
Special GameState: Quit.
Definition at line 24 of file AEGameStateMgr.h.
#define AE_GS_RESTART 0xFFFFFFFE |
Special GameState: Restart.
Definition at line 23 of file AEGameStateMgr.h.
Function Documentation
void AEGameStateMgrAdd | ( | u32 | gameStateIdx, |
void(*)() | pLoad, | ||
void(*)() | pInit, | ||
void(*)() | pUpdate, | ||
void(*)() | pDraw, | ||
void(*)() | pFree, | ||
void(*)() | pUnload | ||
) |
Create a new GameState and add it to GameStateManager.
The new GameState is identified as gameStateIdx and will contain the 6 function pointers passed in.
- Parameters
-
[in] gameStateIdx ID of the newly created GameState. [in] pLoad Function pointer to the load function of the new GameState. [in] pInit Function pointer to the init function of the new GameState. [in] pUpdate Function pointer to the update function of the new GameState. [in] pDraw Function pointer to the draw function of the new GameState. [in] pFree Function pointer to the free function of the new GameState. [in] pUnload Function pointer to the unload function of the new GameState.
- Return values
-
void No return.
void AEGameStateMgrInit | ( | u32 | gameStateInit | ) |
Initialize the GameStateManager.
Set the initial GameState and start the GameStateManager with that GameState.
- Warning
- This function should be called AFTER all the GameStates have been added to the GameStateManager.
- Parameters
-
[in] gameStateInit ID of the initial GameState.
- Return values
-
void No return.
void AEGameStateMgrUpdate | ( | ) |
Update the GameStateManager.
Call this function when the GameState changes to set the function pointers for the new state.
- Return values
-
void No return.
Variable Documentation
void(* AEGameStateDraw)(void) |
Function pointer for draw.
void(* AEGameStateFree)(void) |
Function pointer for free.
void(* AEGameStateInit)(void) |
Function pointer for init.
void(* AEGameStateLoad)(void) |
Function pointer for load.
void(* AEGameStateUnload)(void) |
Function pointer for unload.
void(* AEGameStateUpdate)(void) |
Function pointer for update.
u32 gAEGameStateCurr |
Current GameState.
u32 gAEGameStateInit |
Initial GameState.
u32 gAEGameStateNext |
Next GameState.
u32 gAEGameStatePrev |
Previous GameState.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by
