[Scummvm-cvs-logs] SF.net SVN: scummvm: [31642] scummvm/trunk/engines/made/screen.cpp

john_doe at users.sourceforge.net john_doe at users.sourceforge.net
Mon Apr 21 13:17:51 CEST 2008


Revision: 31642
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31642&view=rev
Author:   john_doe
Date:     2008-04-21 04:17:51 -0700 (Mon, 21 Apr 2008)

Log Message:
-----------
Fixed drawAnimFrame (don't draw anything if the frame number is invalid)

Modified Paths:
--------------
    scummvm/trunk/engines/made/screen.cpp

Modified: scummvm/trunk/engines/made/screen.cpp
===================================================================
--- scummvm/trunk/engines/made/screen.cpp	2008-04-21 11:05:44 UTC (rev 31641)
+++ scummvm/trunk/engines/made/screen.cpp	2008-04-21 11:17:51 UTC (rev 31642)
@@ -259,6 +259,9 @@
 
 void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo) {
 
+	if (frameNum < 0)
+		return;
+
 	AnimationResource *anim = _vm->_res->getAnimation(animIndex);
 	Graphics::Surface *sourceSurface = anim->getFrame(frameNum);
 	byte *source = (byte*)sourceSurface->getBasePtr(0, 0);
@@ -279,7 +282,7 @@
 
 uint16 Screen::drawPic(uint16 index, int16 x, int16 y, uint16 flag1, uint16 flag2) {
 
-	//DEBUG
+	//HACK (until clipping is impelemented)
 	if (y > 200) y = 0;
 
 	drawFlex(index, x, y, flag1, flag2, _clipInfo1);


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