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

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Sun Jun 6 08:46:29 CEST 2010


Revision: 49448
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49448&view=rev
Author:   dreammaster
Date:     2010-06-06 06:46:29 +0000 (Sun, 06 Jun 2010)

Log Message:
-----------
Bugfixes for correct positioning of opening animation

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

Modified: scummvm/trunk/engines/m4/animation.cpp
===================================================================
--- scummvm/trunk/engines/m4/animation.cpp	2010-06-06 01:12:41 UTC (rev 49447)
+++ scummvm/trunk/engines/m4/animation.cpp	2010-06-06 06:46:29 UTC (rev 49448)
@@ -34,6 +34,7 @@
 
 MadsAnimation::MadsAnimation(MadsM4Engine *vm, MadsView *view): Animation(vm), _view(view) {
 	_font = NULL;
+	_resetFlag = false;
 	_freeFlag = false;
 	_skipLoad = false;
 	_unkIndex = -1;
@@ -159,7 +160,7 @@
 			rec.spriteSlot.xp = animStream->readUint16LE();
 			rec.spriteSlot.yp = animStream->readUint16LE();
 			rec.spriteSlot.depth = animStream->readByte();
-			rec.spriteSlot.scale = animStream->readByte();
+			rec.spriteSlot.scale = (int8)animStream->readByte();
 
 			_frameEntries.push_back(rec);
 		}
@@ -287,7 +288,7 @@
 	}
 
 	// Validate the current frame
-	if (_currentFrame > (int)_miscEntries.size()) {
+	if (_currentFrame >= (int)_miscEntries.size()) {
 		// Is the animation allowed to be repeated?
 		if (_resetFlag) {
 			_currentFrame = 0;

Modified: scummvm/trunk/engines/m4/mads_views.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_views.cpp	2010-06-06 01:12:41 UTC (rev 49447)
+++ scummvm/trunk/engines/m4/mads_views.cpp	2010-06-06 06:46:29 UTC (rev 49448)
@@ -195,7 +195,7 @@
 		if (slot.scale < 100) {
 			// Minimalised drawing
 			assert(slot.spriteListIndex < (int)_sprites.size());
-			M4Sprite *spr = spriteSet.getFrame(slot.frameNumber - 1);
+			M4Sprite *spr = spriteSet.getFrame((slot.frameNumber & 0x7fff) - 1);
 			spr->copyTo(view, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale, 0);
 		} else {
 			int xp, yp;


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