#include <GameState.h>
Collaboration diagram for GameState:

Definition at line 27 of file GameState.h.
Public Member Functions | |
| GameState (void) | |
| default constructor | |
| ~GameState (void) | |
| destructor | |
| void | UpdateMaxLevel (void) |
| find the maximum level by searching the level files on disk | |
Public Attributes | |
| int | iGreenHandicap |
| the amount of health taken from player at game start | |
| int | iBrownHandicap |
| the amount of health taken from player at game start | |
| int | iMaxLevel |
| highest level map name found in level directory | |
| int | iCurrentLevel |
| current level playing / to be played | |
| bool | bFullScreen |
| bool | bAutoAdvanceLevel |
| will the level increment after each game | |
| int | iSFXLevel |
| sound effect volume level | |
| int | iBGMLevel |
| background music volume level | |
| int | iTotalJoysticks |
| total number of joysticks detected (clamped to MAX_JOYSTICKS) | |
| char * | cJoystickNames [MAX_JOYSTICKS] |
| array of pointers to joystick names | |
| SDL_Joystick * | Joysticks [MAX_JOYSTICKS] |
| array of SDL joystick structures for getting event data | |
| int | iGreenPlayerJoystick |
| red player's joystick ID number | |
| int | iBrownPlayerJoystick |
| blue player's joystick ID number | |
| CWorld * | World |
| pointer to the game's current world | |
| GameState::GameState | ( | void | ) |
Creates a game state object with default parameters. This constructor will determine the number of joysticks in the system and save that data in the new object. Also, the level file directory is searched and the level files are counted to determine the maximum level playable.
Definition at line 30 of file GameState.cpp.
References bAutoAdvanceLevel, bFullScreen, cJoystickNames, DEFAULT_BGM_VOLUME, DEFAULT_SFX_VOLUME, iBGMLevel, iBrownHandicap, iBrownPlayerJoystick, iCurrentLevel, iGreenHandicap, iGreenPlayerJoystick, iMaxLevel, iSFXLevel, iTotalJoysticks, Joysticks, MAX_JOYSTICKS, RUN_FULLSCREEN, UpdateMaxLevel(), and World.
Here is the call graph for this function:

| GameState::~GameState | ( | void | ) |
| void GameState::UpdateMaxLevel | ( | void | ) |
This function inspects the game's level directory for level files, and stores a count of the number of files found in the object's iMaxLevel variable.
Definition at line 87 of file GameState.cpp.
References iMaxLevel, and MAX_LEVELS.
Referenced by GameState().
Here is the caller graph for this function:

Definition at line 30 of file GameState.h.
Referenced by GameState(), InitGame(), and OptionsMenu().
Definition at line 31 of file GameState.h.
Referenced by GameState(), InitGame(), and OptionsMenu().
Definition at line 32 of file GameState.h.
Referenced by GameState(), main(), OptionsMenu(), and UpdateMaxLevel().
Definition at line 34 of file GameState.h.
Referenced by GameState(), OptionsMenu(), and ToggleFullScreen().
| char* GameState::cJoystickNames[MAX_JOYSTICKS] |
| SDL_Joystick* GameState::Joysticks[MAX_JOYSTICKS] |
Definition at line 41 of file GameState.h.
Referenced by GameState(), OptionsMenu(), and PlayGame().
Definition at line 42 of file GameState.h.
Referenced by GameState(), OptionsMenu(), and PlayGame().
Copyright Windsor Schmidt 2006 - All rights reserved.