removed some old fishy code I can't make sense of *blush* - it doesn't seem to have any purpose so I don't think this will change anything. Some other code cleanup along the way
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5263 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e2e442f756
commit
e6d933eba5
@ -36,7 +36,7 @@ AbstractStateManager::AbstractStateManager()
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark Other
|
||||
#pragma mark Game State Management
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -60,6 +60,19 @@ GameState AbstractStateManager::getGameState()
|
||||
return m_game_mode;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void AbstractStateManager::setGameState(GameState state)
|
||||
{
|
||||
if (m_game_mode == state) return; // no change
|
||||
|
||||
GameState previous = m_game_mode;
|
||||
m_game_mode = state;
|
||||
|
||||
onGameStateChange(previous, state);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@ -109,12 +122,6 @@ void AbstractStateManager::replaceTopMostScreen(Screen* screen)
|
||||
// Send tear-down event to previous menu
|
||||
if (m_menu_stack.size() > 0) getCurrentScreen()->tearDown();
|
||||
|
||||
//FIXME: this doesn't go in the *abstract* state manager
|
||||
//FIXME: I don't understand this line. since this can't be called in game mode, why
|
||||
// is a switch necessary? why don't we check what the new topmost menu is before
|
||||
// changing input mode? why do we change input mode but NOT game mode?
|
||||
input_manager->setMode(InputManager::MENU);
|
||||
|
||||
m_menu_stack[m_menu_stack.size()-1] = name;
|
||||
switchToScreen(name.c_str());
|
||||
|
||||
@ -180,18 +187,6 @@ void AbstractStateManager::popMenu()
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void AbstractStateManager::setGameState(GameState state)
|
||||
{
|
||||
if (m_game_mode == state) return; // no change
|
||||
|
||||
GameState previous = m_game_mode;
|
||||
m_game_mode = state;
|
||||
|
||||
onGameStateChange(previous, state);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void AbstractStateManager::resetAndGoToScreen(Screen* screen)
|
||||
{
|
||||
std::string name = screen->getName();
|
||||
|
Loading…
Reference in New Issue
Block a user