[Scummvm-cvs-logs] SF.net SVN: scummvm:[45746] scummvm/trunk/engines/draci
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Sun Nov 8 07:16:25 CET 2009
Revision: 45746
http://scummvm.svn.sourceforge.net/scummvm/?rev=45746&view=rev
Author: spalek
Date: 2009-11-08 06:16:25 +0000 (Sun, 08 Nov 2009)
Log Message:
-----------
Fixed mistake with two inner loop caused by not clearing the path.
Also, optimize play() and stop()
Modified Paths:
--------------
scummvm/trunk/engines/draci/animation.cpp
scummvm/trunk/engines/draci/walking.cpp
Modified: scummvm/trunk/engines/draci/animation.cpp
===================================================================
--- scummvm/trunk/engines/draci/animation.cpp 2009-11-08 05:47:39 UTC (rev 45745)
+++ scummvm/trunk/engines/draci/animation.cpp 2009-11-08 06:16:25 UTC (rev 45746)
@@ -294,7 +294,7 @@
void AnimationManager::play(int id) {
Animation *anim = getAnimation(id);
- if (anim) {
+ if (anim && !anim->isPlaying()) {
// Mark the first frame dirty so it gets displayed
anim->markDirtyRect(_vm->_screen->getSurface());
@@ -307,7 +307,7 @@
void AnimationManager::stop(int id) {
Animation *anim = getAnimation(id);
- if (anim) {
+ if (anim && anim->isPlaying()) {
// Clean up the last frame that was drawn before stopping
anim->markDirtyRect(_vm->_screen->getSurface());
Modified: scummvm/trunk/engines/draci/walking.cpp
===================================================================
--- scummvm/trunk/engines/draci/walking.cpp 2009-11-08 05:47:39 UTC (rev 45745)
+++ scummvm/trunk/engines/draci/walking.cpp 2009-11-08 06:16:25 UTC (rev 45746)
@@ -650,6 +650,7 @@
} else {
// Otherwise we are done. continueWalking() will return false next time.
debugC(2, kDraciWalkingDebugLevel, "We have walked the whole path");
+ _path.clear();
return false;
}
}
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