diff options
author | Paul Gilbert | 2011-11-02 19:43:52 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-11-02 19:43:52 +1100 |
commit | e9aebf0a210271cb2489332ad0c4ea13bea7542f (patch) | |
tree | e738125de60036502eb5e4f64c6b8d9e6644e314 /engines/tsage/blue_force/blueforce_logic.cpp | |
parent | e38921855cfb88b36c85eb38f18323b476478e78 (diff) | |
download | scummvm-rg350-e9aebf0a210271cb2489332ad0c4ea13bea7542f.tar.gz scummvm-rg350-e9aebf0a210271cb2489332ad0c4ea13bea7542f.tar.bz2 scummvm-rg350-e9aebf0a210271cb2489332ad0c4ea13bea7542f.zip |
TSAGE: Implement code for restarting the game in Blue Force
Diffstat (limited to 'engines/tsage/blue_force/blueforce_logic.cpp')
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 77609715c7..6bfc74627d 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -315,6 +315,24 @@ void BlueForceGame::processEvent(Event &event) { } } +void BlueForceGame::restart() { + g_globals->_scenePalette.clearListeners(); + g_globals->_soundHandler.stop(); + + // Reset the globals + g_globals->reset(); + + // Clear save/load slots + g_globals->_sceneHandler->_saveGameSlot = -1; + g_globals->_sceneHandler->_loadGameSlot = -1; + + g_globals->_stripNum = 0; + g_globals->_events.setCursor(CURSOR_WALK); + + // Change to the first game scene + g_globals->_sceneManager.changeScene(190); +} + /*--------------------------------------------------------------------------*/ AObjectArray::AObjectArray(): EventHandler() { |