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


Public Member Functions | |
| GameState (StateID state, std::string m) | |
| ~GameState () | |
| virtual void | paint () |
| Callback for painting, overload in other states. | |
| virtual void | doKey (int key, int x, int y, bool special, bool down, unsigned int modifiers) |
| Callback for key event, overload in other states. | |
| virtual void | keyRelease (int key, int x, int y, bool special, unsigned int modifiers) |
| virtual void | doMouseDown (Interface::MouseButtonType button, int x, int y) |
| Callback for mouse down, overload in other states. | |
| virtual void | doMouseUp (Interface::MouseButtonType button, int x, int y) |
| Callback for mouse up, overload in other states. | |
| virtual void | doMouseDragged (int x, int y) |
| Callback for mouse dragged, overload in other states. | |
| virtual bool | isActive () |
| void | setupKeyBindings () |
| void | doKey_InGame (int key, int x, int y, bool special, bool down, unsigned int modifiers) |
| void | doKey_GameOver (int key, int x, int y, bool special, bool down, unsigned int modifiers) |
Static Public Attributes | |
| static GameState * | currentGame |
| Holds a pointer to the currentGame, or NULL if no game is in progress. | |
| static KeyBindings | kb |
| Keybindings set up from preference file etc. | |
Protected Types | |
| typedef void(GameState::*) | DoKeyFunc_t (int, int, int, bool, bool, unsigned int) |
Protected Member Functions | |
| void | setupProjectionMatrix () |
| void | setupOrthoMatrix () |
| void | endTurn () |
Static Protected Member Functions | |
| static void | LoadMissionIncremental () |
| This function is called several times during game initialization. | |
| static void | Update (int value) |
| static void | GenerateTrees (short nmemb, float minRadius, float maxRadius) |
| static void | GenerateStones (short nmemb, float radius) |
| static void | Start () |
| static void | StartGameOver () |
| static void | GameOverPaint () |
Protected Attributes | |
| int | buttonsDown |
| float | lastMouseX |
| float | lastMouseY |
| bool | cameraLock |
| float | turnStart |
| float | turnTime_ms |
| bool | turnActive |
| std::string | mission |
| DoKeyFunc_t | doKeyFunc |
Static Protected Attributes | |
| static int | initState |
| Used for keeping track of incremental init. | |
| static long | lastUpdate |
Friends | |
| class | State |
| Allow state to access our protected members. | |
typedef void(GameState::*) GameState::DoKeyFunc_t(int, int, int, bool, bool, unsigned int) [protected] |
| GameState::GameState | ( | StateID | state, | |
| std::string | m | |||
| ) |
| GameState::~GameState | ( | ) |
| virtual void GameState::doKey | ( | int | key, | |
| int | x, | |||
| int | y, | |||
| bool | special, | |||
| bool | down, | |||
| unsigned int | modifiers | |||
| ) | [virtual] |
| void GameState::doKey_GameOver | ( | int | key, | |
| int | x, | |||
| int | y, | |||
| bool | special, | |||
| bool | down, | |||
| unsigned int | modifiers | |||
| ) |
| void GameState::doKey_InGame | ( | int | key, | |
| int | x, | |||
| int | y, | |||
| bool | special, | |||
| bool | down, | |||
| unsigned int | modifiers | |||
| ) |
| virtual void GameState::doMouseDown | ( | Interface::MouseButtonType | button, | |
| int | x, | |||
| int | y | |||
| ) | [virtual] |
| virtual void GameState::doMouseDragged | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
| virtual void GameState::doMouseUp | ( | Interface::MouseButtonType | button, | |
| int | x, | |||
| int | y | |||
| ) | [virtual] |
| void GameState::endTurn | ( | ) | [protected] |
| static void GameState::GameOverPaint | ( | ) | [static, protected] |
| static void GameState::GenerateStones | ( | short | nmemb, | |
| float | radius | |||
| ) | [static, protected] |
| static void GameState::GenerateTrees | ( | short | nmemb, | |
| float | minRadius, | |||
| float | maxRadius | |||
| ) | [static, protected] |
| virtual bool GameState::isActive | ( | ) | [virtual] |
| virtual void GameState::keyRelease | ( | int | key, | |
| int | x, | |||
| int | y, | |||
| bool | special, | |||
| unsigned int | modifiers | |||
| ) | [virtual] |
| static void GameState::LoadMissionIncremental | ( | ) | [static, protected] |
This function is called several times during game initialization.
Each time a small fraction of setup is completed this is to avoid locking the main thread during setup.
| virtual void GameState::paint | ( | ) | [virtual] |
| void GameState::setupKeyBindings | ( | ) |
| void GameState::setupOrthoMatrix | ( | ) | [protected] |
| void GameState::setupProjectionMatrix | ( | ) | [protected] |
| static void GameState::Start | ( | ) | [static, protected] |
| static void GameState::StartGameOver | ( | ) | [static, protected] |
| static void GameState::Update | ( | int | value | ) | [static, protected] |
friend class State [friend] |
Allow state to access our protected members.
int GameState::buttonsDown [protected] |
bool GameState::cameraLock [protected] |
GameState* GameState::currentGame [static] |
Holds a pointer to the currentGame, or NULL if no game is in progress.
DoKeyFunc_t GameState::doKeyFunc [protected] |
int GameState::initState [static, protected] |
Used for keeping track of incremental init.
KeyBindings GameState::kb [static] |
Keybindings set up from preference file etc.
float GameState::lastMouseX [protected] |
float GameState::lastMouseY [protected] |
long GameState::lastUpdate [static, protected] |
std::string GameState::mission [protected] |
bool GameState::turnActive [protected] |
float GameState::turnStart [protected] |
float GameState::turnTime_ms [protected] |
1.4.7