mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
TSAGE: Implement code for restarting the game in Blue Force
This commit is contained in:
parent
e38921855c
commit
e9aebf0a21
@ -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() {
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
virtual void processEvent(Event &event);
|
||||
virtual bool canSaveGameStateCurrently();
|
||||
virtual bool canLoadGameStateCurrently();
|
||||
virtual void restart();
|
||||
};
|
||||
|
||||
#define OBJ_ARRAY_SIZE 10
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user