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

dkasak13 at users.sourceforge.net dkasak13 at users.sourceforge.net
Wed Jul 22 07:00:11 CEST 2009


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

Log Message:
-----------
If a frame has scaled dimensions set to 0, the engine now does no scaling instead of scaling it to nothing. Fixes the disappearing chair bug.

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

Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-22 04:50:11 UTC (rev 42649)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-22 05:00:11 UTC (rev 42650)
@@ -388,6 +388,17 @@
 
 		Sprite *sp = new Sprite(spriteFile->_data, spriteFile->_length, x, y, true);
 
+		// Some frames set the scaled dimensions to 0 even though other frames
+		// from the same animations have them set to normal values
+		// We work around this by assuming it means no scaling is necessary
+		if (scaledWidth == 0) {
+			scaledWidth = sp->getWidth();
+		}
+
+		if (scaledHeight == 0) {
+			scaledHeight = sp->getHeight();
+		}
+
 		sp->setScaled(scaledWidth, scaledHeight);
 
 		if (mirror) 


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