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:
auria 2010-04-25 17:15:30 +00:00
parent e2e442f756
commit e6d933eba5

View File

@ -36,7 +36,7 @@ AbstractStateManager::AbstractStateManager()
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Other #pragma mark Game State Management
#endif #endif
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -60,6 +60,19 @@ GameState AbstractStateManager::getGameState()
return m_game_mode; 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 // Send tear-down event to previous menu
if (m_menu_stack.size() > 0) getCurrentScreen()->tearDown(); 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; m_menu_stack[m_menu_stack.size()-1] = name;
switchToScreen(name.c_str()); 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) void AbstractStateManager::resetAndGoToScreen(Screen* screen)
{ {
std::string name = screen->getName(); std::string name = screen->getName();