aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-02 18:51:13 -1000
committerPaul Gilbert2015-05-02 18:51:13 -1000
commitc5d5694883a48974cf85f5d2a854d3a7c5d8b1d4 (patch)
tree9b9938b312e55fa2ae8533c564e5b4c4b0ebcd58 /engines
parent0a2c50deb5c61500410a91556ed5e3ceb0cc9742 (diff)
downloadscummvm-rg350-c5d5694883a48974cf85f5d2a854d3a7c5d8b1d4.tar.gz
scummvm-rg350-c5d5694883a48974cf85f5d2a854d3a7c5d8b1d4.tar.bz2
scummvm-rg350-c5d5694883a48974cf85f5d2a854d3a7c5d8b1d4.zip
SHERLOCK: Fix gfx glitch when returning to morgue for a second time
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/scene.cpp5
-rw-r--r--engines/sherlock/sherlock.cpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 6e7f628616..8a47707aea 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -169,6 +169,9 @@ void Scene::selectScene() {
* Fres all the graphics and other dynamically allocated data for the scene
*/
void Scene::freeScene() {
+ if (_currentScene == -1)
+ return;
+
_vm->_talk->freeTalkVars();
_vm->_inventory->freeInv();
_vm->_sound->freeSong();
@@ -190,6 +193,8 @@ void Scene::freeScene() {
for (uint idx = 0; idx < _images.size(); ++idx)
delete _images[idx]._images;
_images.clear();
+
+ _currentScene = -1;
}
/**
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index b8948f99d8..8b25615792 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -163,6 +163,7 @@ void SherlockEngine::sceneLoop() {
}
}
+ _scene->freeScene();
_people->freeWalk();
}