[Scummvm-cvs-logs] SF.net SVN: scummvm:[49434] scummvm/trunk/engines/m4

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sat Jun 5 00:53:26 CEST 2010


Revision: 49434
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49434&view=rev
Author:   dreammaster
Date:     2010-06-04 22:53:26 +0000 (Fri, 04 Jun 2010)

Log Message:
-----------
Bugfix for wrong parameter order in scene resources load method call. Also added fragment to destroy an active animation when it's finished animating

Modified Paths:
--------------
    scummvm/trunk/engines/m4/animation.h
    scummvm/trunk/engines/m4/mads_scene.cpp

Modified: scummvm/trunk/engines/m4/animation.h
===================================================================
--- scummvm/trunk/engines/m4/animation.h	2010-06-04 20:06:59 UTC (rev 49433)
+++ scummvm/trunk/engines/m4/animation.h	2010-06-04 22:53:26 UTC (rev 49434)
@@ -112,6 +112,8 @@
 	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

Modified: scummvm/trunk/engines/m4/mads_scene.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_scene.cpp	2010-06-04 20:06:59 UTC (rev 49433)
+++ scummvm/trunk/engines/m4/mads_scene.cpp	2010-06-04 22:53:26 UTC (rev 49434)
@@ -77,7 +77,7 @@
 	_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 @@
 	_sceneLogic.sceneStep();
 	_sequenceList.tick();
 
-	if ((_activeAnimation) && !_abortTimers)
+	if ((_activeAnimation) && !_abortTimers) {
 		_activeAnimation->update();
+		if (((MadsAnimation *) _activeAnimation)->freeFlag()) {
+			delete _activeAnimation;
+			_activeAnimation = NULL;
+		}
+	}
 
 	_kernelMessages.update();
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list