aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorPaul Gilbert2010-06-04 22:53:26 +0000
committerPaul Gilbert2010-06-04 22:53:26 +0000
commit3a5fe4ca002a85f7c4549c8d36203553553c53f9 (patch)
tree6c8f73b07198eddd779fb8995218539156155bde /engines/m4
parent8b102ab7afae80d57bbbd03d2cd4a9bea09c9115 (diff)
downloadscummvm-rg350-3a5fe4ca002a85f7c4549c8d36203553553c53f9.tar.gz
scummvm-rg350-3a5fe4ca002a85f7c4549c8d36203553553c53f9.tar.bz2
scummvm-rg350-3a5fe4ca002a85f7c4549c8d36203553553c53f9.zip
Bugfix for wrong parameter order in scene resources load method call. Also added fragment to destroy an active animation when it's finished animating
svn-id: r49434
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/animation.h2
-rw-r--r--engines/m4/mads_scene.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/m4/animation.h b/engines/m4/animation.h
index 59cb52cd87..883d3f2de6 100644
--- a/engines/m4/animation.h
+++ b/engines/m4/animation.h
@@ -112,6 +112,8 @@ public:
virtual void load(const Common::String &filename, int abortTimers);
virtual void update();
virtual void setCurrentFrame(int frameNumber);
+
+ bool freeFlag() const { return _freeFlag; }
};
} // End of namespace M4
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index 69de12e4f6..a65224c722 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -77,7 +77,7 @@ void MadsScene::loadScene2(const char *aaName) {
_kernelMessages.clear();
// Load up the properties for the scene
- _sceneResources.load(_currentScene, 0/*word_83546*/, NULL, _walkSurface, _backgroundSurface);
+ _sceneResources.load(_currentScene, NULL, 0/*word_83546*/, _walkSurface, _backgroundSurface);
// Load scene walk paths
loadSceneCodes(_currentScene);
@@ -301,8 +301,13 @@ void MadsScene::updateState() {
_sceneLogic.sceneStep();
_sequenceList.tick();
- if ((_activeAnimation) && !_abortTimers)
+ if ((_activeAnimation) && !_abortTimers) {
_activeAnimation->update();
+ if (((MadsAnimation *) _activeAnimation)->freeFlag()) {
+ delete _activeAnimation;
+ _activeAnimation = NULL;
+ }
+ }
_kernelMessages.update();
}