[Scummvm-cvs-logs] SF.net SVN: scummvm:[40864] scummvm/trunk/engines/tinsel/graphics.cpp

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Sun May 24 16:37:53 CEST 2009


Revision: 40864
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40864&view=rev
Author:   Hkz
Date:     2009-05-24 14:37:53 +0000 (Sun, 24 May 2009)

Log Message:
-----------
tinsel: fix graphic corruption caused by wrong clipping of 8-bit images in Discworld PSX

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/graphics.cpp

Modified: scummvm/trunk/engines/tinsel/graphics.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/graphics.cpp	2009-05-24 14:33:41 UTC (rev 40863)
+++ scummvm/trunk/engines/tinsel/graphics.cpp	2009-05-24 14:37:53 UTC (rev 40864)
@@ -278,7 +278,7 @@
 			srcP += sizeof(uint16);
 
 			// Draw a 4x4 block based on the opcode as in index into the block list
-			// In case we have a 4-bit CLUT image, blocks are 2x4, then expanded into 4x4
+			// In case we have a 4-bit CLUT image, blocks are 2x4 bytes, then expanded into 4x4
 			const uint8 *p;
 			if (fourBitClut)
 				p = (uint8 *)pObj->charBase + psxSkipBytes + (indexVal << 3);
@@ -292,8 +292,8 @@
 						Common::copy(p + boxBounds.left, p + boxBounds.right + 1, tempDest + (SCREEN_WIDTH * (yp - boxBounds.top)));
 					else
 						for (int xp = boxBounds.left; xp <= boxBounds.right; ++xp) {
-							if (*(p + (xp - boxBounds.left)))
-								*(tempDest + SCREEN_WIDTH * (yp - boxBounds.top) + (xp - boxBounds.left)) = *(p + (xp - boxBounds.left));
+							if (*(p + xp))
+								*(tempDest + SCREEN_WIDTH * (yp - boxBounds.top) + (xp - boxBounds.left)) = *(p + xp);
 						}
 				} else {
 					for (int xp = boxBounds.left; xp <= boxBounds.right; ++xp) {


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