[Scummvm-cvs-logs] SF.net SVN: scummvm:[42657] scummvm/branches/gsoc2009-draci/engines/draci

dkasak13 at users.sourceforge.net dkasak13 at users.sourceforge.net
Wed Jul 22 13:30:58 CEST 2009


Revision: 42657
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42657&view=rev
Author:   dkasak13
Date:     2009-07-22 11:30:57 +0000 (Wed, 22 Jul 2009)

Log Message:
-----------
* Disabled unconditional execution of gates' scripts
* Fixed bug in Animation::nextFrame() which caused non-looping animations to linger on forever
* Stopped setting looping to false explicitly in AnimationManager::addAnimation() since the Animation constructor already does that

Modified Paths:
--------------
    scummvm/branches/gsoc2009-draci/engines/draci/animation.cpp
    scummvm/branches/gsoc2009-draci/engines/draci/game.cpp

Modified: scummvm/branches/gsoc2009-draci/engines/draci/animation.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/animation.cpp	2009-07-22 10:32:35 UTC (rev 42656)
+++ scummvm/branches/gsoc2009-draci/engines/draci/animation.cpp	2009-07-22 11:30:57 UTC (rev 42657)
@@ -33,7 +33,7 @@
 	_z = 0;
 	_relX = 0;
 	_relY = 0;
-	setPlaying(false);
+	_playing = false;
 	_looping = false;
 	_tick = _vm->_system->getMillis();
 	_currentFrame = 0;
@@ -87,8 +87,11 @@
 		// If we are at the last frame and not looping, stop the animation
 		// The animation is also restarted to frame zero
 		if ((_currentFrame == getFramesNum() - 1) && !_looping) {
+			// When the animation reaches its end, stop it
+			_vm->_anims->stop(_id);
+
+			// Reset the frame to 0
 			_currentFrame = 0;
-			setPlaying(false);
 		} else {
 			// Mark old frame dirty so it gets deleted
 			markDirtyRect(surface);
@@ -213,7 +216,6 @@
 	anim->setID(id);
 	anim->setZ(z);
 	anim->setPlaying(playing);
-	anim->setLooping(false);
 
 	insertAnimation(anim);
 

Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-22 10:32:35 UTC (rev 42656)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-22 11:30:57 UTC (rev 42657)
@@ -321,10 +321,10 @@
 
 	// HACK: Gates' scripts shouldn't be run unconditionally
 	// This is for testing
-	for (uint i = 0; i < _currentRoom._numGates; ++i) {
-		debugC(6, kDraciLogicDebugLevel, "Running program for gate %d", i);
-		_vm->_script->run(_currentRoom._program, gates[i]);
-	}
+	//for (uint i = 0; i < _currentRoom._numGates; ++i) {
+	//	debugC(6, kDraciLogicDebugLevel, "Running program for gate %d", i);
+	//	_vm->_script->run(_currentRoom._program, gates[i]);
+	//}
 
 	// Set room palette
 	f = _vm->_paletteArchive->getFile(_currentRoom._palette);


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