aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-02 17:48:07 -1000
committerPaul Gilbert2015-05-02 17:48:07 -1000
commitf97e550d8631bc1821da1c126ae545db15769c9c (patch)
tree27b1394ed316848e6d447149b41547ad0c5a6a11 /engines
parent9ff445497fe53b72193dcf944b54091080c90964 (diff)
downloadscummvm-rg350-f97e550d8631bc1821da1c126ae545db15769c9c.tar.gz
scummvm-rg350-f97e550d8631bc1821da1c126ae545db15769c9c.tar.bz2
scummvm-rg350-f97e550d8631bc1821da1c126ae545db15769c9c.zip
SHERLOCK: Don't mark leaving scene as visited during savegame loads
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/saveload.cpp1
-rw-r--r--engines/sherlock/scene.cpp11
-rw-r--r--engines/sherlock/scene.h1
-rw-r--r--engines/sherlock/sherlock.cpp2
-rw-r--r--engines/sherlock/sherlock.h1
5 files changed, 8 insertions, 8 deletions
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: