#include <dxf_statemanager.h>
Inheritance diagram for dxf::StateManager:

Public Member Functions | |
| void | Load () |
| void | Unload () |
| void | RegisterState (const std::wstring &name, GameState *pState) |
| void | ChangeState (const std::wstring &name) |
| bool | JustChangedState () |
| void | Resize (const D3DSURFACE_DESC *pBackBufferSurfaceDesc) |
| GameState * | GetCurrentGameState () |
Protected Member Functions | |
| StateManager () | |
| virtual void | Update () |
Protected Attributes | |
| GameState * | pCurrentState |
Private Attributes | |
| std::wstring | newState |
| StateMap | states |
Definition at line 192 of file dxf_statemanager.h.
| dxf::StateManager::StateManager | ( | ) | [protected] |
| void dxf::StateManager::ChangeState | ( | const std::wstring & | name | ) |
Change to the state identified by the name
Definition at line 111 of file dxf_statemanager.cpp.
References newState.
Referenced by dxf::DXFChangeState().
| GameState * dxf::StateManager::GetCurrentGameState | ( | ) |
Returns a pointer to the current game state
Definition at line 141 of file dxf_statemanager.cpp.
References pCurrentState.
Referenced by dxf::GetCurrentGameState(), dxf::Game::MsgProc(), dxf::View::OnCreateDevice(), dxf::View::OnDestroyDevice(), dxf::View::OnFrameRender(), dxf::OnGameStateGUIEvent(), dxf::View::OnLostDevice(), and dxf::View::OnResetDevice().
| bool dxf::StateManager::JustChangedState | ( | ) |
Returns true if ChangeState was called in this frame
Definition at line 115 of file dxf_statemanager.cpp.
References newState.
| void dxf::StateManager::Load | ( | ) |
Reimplemented in dxf::Model.
Definition at line 90 of file dxf_statemanager.cpp.
References pCurrentState.
Referenced by dxf::Model::Load().
| void dxf::StateManager::RegisterState | ( | const std::wstring & | name, | |
| GameState * | pState | |||
| ) |
Add a state to the state manager using the string as an identifier.
Definition at line 103 of file dxf_statemanager.cpp.
References newState, dxf::Console::output, and states.
Referenced by dxf::DXFRegisterState().
| void dxf::StateManager::Resize | ( | const D3DSURFACE_DESC * | pBackBufferSurfaceDesc | ) |
Called when the back buffer changes, the call is passed on to the current state
Definition at line 137 of file dxf_statemanager.cpp.
References pCurrentState, and dxf::GameState::Resize().
Referenced by dxf::View::OnResetDevice().
| void dxf::StateManager::Unload | ( | ) |
Reimplemented in dxf::Model.
Definition at line 94 of file dxf_statemanager.cpp.
References pCurrentState, states, and dxf::GameState::Unload().
Referenced by dxf::Model::Unload().
| void dxf::StateManager::Update | ( | ) | [protected, virtual] |
Update call, needs to be called each frame by the super-class to process state changes
Definition at line 119 of file dxf_statemanager.cpp.
References newState, pCurrentState, and states.
Referenced by dxf::Model::OnFrameMove().
std::wstring dxf::StateManager::newState [private] |
Definition at line 219 of file dxf_statemanager.h.
Referenced by ChangeState(), JustChangedState(), RegisterState(), and Update().
GameState* dxf::StateManager::pCurrentState [protected] |
Definition at line 217 of file dxf_statemanager.h.
Referenced by GetCurrentGameState(), Load(), dxf::Model::OnFrameMove(), dxf::Model::Render2D(), dxf::Model::Render3D(), dxf::Model::RenderPre2D(), Resize(), StateManager(), Unload(), and Update().
StateMap dxf::StateManager::states [private] |
Definition at line 220 of file dxf_statemanager.h.
Referenced by RegisterState(), Unload(), and Update().
1.4.7