[Scummvm-cvs-logs] SF.net SVN: scummvm:[45711] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Sat Nov 7 01:36:23 CET 2009


Revision: 45711
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45711&view=rev
Author:   spalek
Date:     2009-11-07 00:36:23 +0000 (Sat, 07 Nov 2009)

Log Message:
-----------
Done research on ignored animation flags and commented the code

Modified Paths:
--------------
    scummvm/trunk/engines/draci/game.cpp
    scummvm/trunk/engines/draci/script.cpp

Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp	2009-11-07 00:12:03 UTC (rev 45710)
+++ scummvm/trunk/engines/draci/game.cpp	2009-11-07 00:36:23 UTC (rev 45711)
@@ -1178,12 +1178,24 @@
 
 	uint numFrames = animationReader.readByte();
 
-	// FIXME: handle these properly
-	animationReader.readByte(); // Memory logic field, not used
-	animationReader.readByte(); // Disable erasing field, not used
+	// The following two flags are ignored by the played.  Memory logic was
+	// a hint to the old player whether it should cache the sprites or load
+	// them on demand.  We have 1 memory manager and ignore these hints.
+	animationReader.readByte();
+	// The disable erasing field is just a (poor) optimization flag that
+	// turns of drawing the background underneath the sprite.  By reading
+	// the source code of the old player, I'm not sure if that would ever
+	// have worked.  There are only 6 animations in the game with this flag
+	// true.  All of them have just 1 animation phase and they are used to
+	// patch a part of the original background by a new sprite.  This
+	// should work with the default logic as well---just play this
+	// animation on top of the background.  Since the only meaning of the
+	// flag was optimization, ignoring should be OK even without dipping
+	// into details.
+	animationReader.readByte();
+	const bool cyclic = animationReader.readByte();
 
-	bool cyclic = animationReader.readByte();
-
+	// FIXME: handle this properly
 	animationReader.readByte(); // Relative field, not used
 
 	Animation *anim = _vm->_anims->addAnimation(animNum, z, false);

Modified: scummvm/trunk/engines/draci/script.cpp
===================================================================
--- scummvm/trunk/engines/draci/script.cpp	2009-11-07 00:12:03 UTC (rev 45710)
+++ scummvm/trunk/engines/draci/script.cpp	2009-11-07 00:36:23 UTC (rev 45711)
@@ -389,6 +389,10 @@
 		}
 	}
 
+	// We don't test here whether an animation is loaded in the
+	// AnimationManager while not being registered in the object's array of
+	// animations.  This cannot legally happen and an assertion will be
+	// thrown by loadAnimation().
 	loadObjectAnimation(obj, animID);
 }
 


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