User:Monster Iestyn/Source Code Documentation/g_state.h
Jump to navigation
Jump to search
Online link | GitHub entry |
---|---|
File type | C header file |
#include guard | __G_STATE__
|
This header file provides the typedefs and variables for handling the game's general state.
Includes
Typedefs
Name | Type | Description |
---|---|---|
gamestate_t
|
enum
|
Game states |
gameaction_t
|
enum
|
Game actions |
Enumerations
gamestate_t
Value | Name | Description |
---|---|---|
0 | GS_NULL
|
The "blank" game state. This is the initial value for the gamestate variable on game startup.
|
1 | GS_LEVEL
|
A level is currently being played. |
2 | GS_INTERMISSION
|
The tally screen displayed after completing a level. |
3 | GS_CONTINUING
|
The continue screen. |
4 | GS_TITLESCREEN
|
The title screen. |
5 | GS_TIMEATTACK
|
The Record Attack menu. |
6 | GS_CREDITS
|
The credits screen (unless a custom cutscene is used). |
7 | GS_EVALUATION
|
The evaluation screen displayed after the credits. |
8 | GS_GAMEEND
|
The "end of game" state following the credits and evaluation, Does nothing for a second before returning to the title screen. |
9 | GS_INTRO
|
The intro cutscene (unless a custom cutscene is used). |
10 | GS_CUTSCENE
|
A custom cutscene is running. |
11 | GS_DEDICATEDSERVER
|
Dedicated server (Unused). |
12 | GS_WAITINGPLAYERS
|
Waiting for players in a netgame, after joining a server. |
gameaction_t
Value | Name | Description |
---|---|---|
0 | ga_nothing
|
Do nothing. |
1 | ga_completed
|
The level is complete, display tally screen and determine the next map to go to. Runs G_DoCompleted .
|
2 | ga_worlddone
|
Warp to the next map. Runs G_DoWorldDone .
|
3 | ga_startcont
|
Starts the continue screen game state. Runs G_DoStartContinue .
|
4 | ga_continued
|
Returns to the level from the continue screen. Runs G_DoContinued .
|
Externs
Data name | Data type | Non-extern location(s) | Description |
---|---|---|---|
gamestate
|
gamestate_t
|
g_game.c
|
The current state of the game. |
ultimatemode
|
UINT8 | g_game.c
|
Determines whether the game is running with ultimate mode or not. |
gameaction
|
gameaction_t
|
g_game.c
|
The current game action to be used. This is used to change the game state, if not set to ga_nothing .
|
botingame
|
boolean | g_game.c
|
Determines whether a bot is present in-game or not. |
botskin
|
UINT8 | g_game.c
|
The bot player's skin number plus one (1 = Sonic, 2 = Tails, 3 = Knuckles). If a bot is not present in-game, this will have a value of 0. |
botcolor
|
UINT8 | g_game.c
|
The bot player's skin color. |