diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 77609715c70..6bfc74627df 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() { diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index 1b161bce06b..d0d0e0ee404 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -45,6 +45,7 @@ public: virtual void processEvent(Event &event); virtual bool canSaveGameStateCurrently(); virtual bool canLoadGameStateCurrently(); + virtual void restart(); }; #define OBJ_ARRAY_SIZE 10 diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp index c73f3f84999..c97bb20e976 100644 --- a/engines/tsage/blue_force/blueforce_scenes1.cpp +++ b/engines/tsage/blue_force/blueforce_scenes1.cpp @@ -3220,9 +3220,11 @@ void Scene190::postInit(SceneObjectList *OwnerList) { (BF_GLOBALS._sceneManager._previousScene == 20)) { // clearScreen(); } - if (BF_GLOBALS._dayNumber == 0) + if (BF_GLOBALS._dayNumber == 0) { // If at start of game, change to first day BF_GLOBALS._dayNumber = 1; + g_globals->_sceneManager._previousScene = 100; + } // Load the scene data loadScene(190);