From f97e550d8631bc1821da1c126ae545db15769c9c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 2 May 2015 17:48:07 -1000 Subject: SHERLOCK: Don't mark leaving scene as visited during savegame loads --- engines/sherlock/saveload.cpp | 1 - engines/sherlock/scene.cpp | 11 +++++++---- engines/sherlock/scene.h | 1 + engines/sherlock/sherlock.cpp | 2 -- engines/sherlock/sherlock.h | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/sherlock') diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp index 86a4e8417a..71e21618ae 100644 --- a/engines/sherlock/saveload.cpp +++ b/engines/sherlock/saveload.cpp @@ -388,7 +388,6 @@ void SaveManager::synchronize(Common::Serializer &s) { if (screen.fontNumber() != oldFont) journal.resetPosition(); - _vm->_loadingSavedGame = true; _justLoaded = true; } diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp index 2c5859024c..e3c1799d66 100644 --- a/engines/sherlock/scene.cpp +++ b/engines/sherlock/scene.cpp @@ -88,6 +88,7 @@ Scene::Scene(SherlockEngine *vm): _vm(vm) { Common::fill(&_sceneStats[idx][0], &_sceneStats[idx][65], false); _currentScene = -1; _goToScene = -1; + _loadingSavedGame = false; _changes = false; _keyboardInput = 0; _walkedInScene = false; @@ -162,10 +163,10 @@ void Scene::freeScene() { _vm->_sound->freeSong(); _vm->_sound->freeLoadedSounds(); - if (!_vm->_loadingSavedGame) + if (!_loadingSavedGame) saveSceneStatus(); else - _vm->_loadingSavedGame = false; + _loadingSavedGame = false; _sequenceBuffer.clear(); _descText.clear(); @@ -1494,10 +1495,12 @@ void Scene::synchronize(Common::Serializer &s) { if (s.isSaving()) saveSceneStatus(); - if (s.isSaving()) + if (s.isSaving()) { s.syncAsSint16LE(_currentScene); - else + } else { s.syncAsSint16LE(_goToScene); + _loadingSavedGame = true; + } for (int sceneNum = 0; sceneNum < SCENES_COUNT; ++sceneNum) { for (int flag = 0; flag < 65; ++flag) { diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h index 4fb7ac228a..7ee7db1119 100644 --- a/engines/sherlock/scene.h +++ b/engines/sherlock/scene.h @@ -89,6 +89,7 @@ private: Common::String _rrmName; int _selector; bool _lookHelp; + bool _loadingSavedGame; bool loadScene(const Common::String &filename); diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp index c33ecb6d49..b8948f99d8 100644 --- a/engines/sherlock/sherlock.cpp +++ b/engines/sherlock/sherlock.cpp @@ -46,7 +46,6 @@ SherlockEngine::SherlockEngine(OSystem *syst, const SherlockGameDescription *gam _talk = nullptr; _ui = nullptr; _useEpilogue2 = false; - _loadingSavedGame = false; _loadGameSlot = -1; _canLoadSave = false; } @@ -164,7 +163,6 @@ void SherlockEngine::sceneLoop() { } } - _scene->freeScene(); _people->freeWalk(); } diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h index dfaaa70806..95fe514e0c 100644 --- a/engines/sherlock/sherlock.h +++ b/engines/sherlock/sherlock.h @@ -105,7 +105,6 @@ public: Common::String _soundOverride; Common::String _titleOverride; bool _useEpilogue2; - bool _loadingSavedGame; int _loadGameSlot; bool _canLoadSave; public: -- cgit v1.2.3