[Scummvm-cvs-logs] SF.net SVN: scummvm: [26280] scummvm/trunk/engines/scumm/gfx.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Fri Mar 23 04:06:12 CET 2007


Revision: 26280
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26280&view=rev
Author:   kirben
Date:     2007-03-22 20:06:10 -0700 (Thu, 22 Mar 2007)

Log Message:
-----------
Fix bug #1684010 - SPYFOX1: Background buffer not been cleared.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/gfx.cpp

Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp	2007-03-23 02:55:07 UTC (rev 26279)
+++ scummvm/trunk/engines/scumm/gfx.cpp	2007-03-23 03:06:10 UTC (rev 26280)
@@ -1099,23 +1099,23 @@
 			byte *mask = (byte *)_textSurface.getBasePtr(x, y - _screenTop);
 			fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height);
 		}
-	} else if (_game.heversion == 100) {
+	} else if (_game.heversion >= 71) {
 		// Flags are used for different methods in HE games
-		int32 flags = color;
-		if (flags & 0x4000000) {
+		uint32 flags = color;
+		if ((flags & 0x2000) || (flags & 0x4000000)) {
 			blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
-		} else if (flags & 0x2000000) {
+		} else if ((flags & 0x4000) || (flags & 0x2000000)) {
 			blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height);
-		} else if (flags & 0x1000000) {
-			flags &= 0xFFFFFF;
+		} else if ((flags & 0x8000) || (flags & 0x1000000)) {
+			flags &= (flags & 0x1000000) ? 0xFFFFFF : 0x7FFF;
 			fill(backbuff, vs->pitch, flags, width, height);
 			fill(bgbuff, vs->pitch, flags, width, height);
 		} else {
 			fill(backbuff, vs->pitch, flags, width, height);
 		}
-	} else {
+	} else if (_game.version >= 60) {
 		// Flags are used for different methods in HE games
-		int16 flags = color;
+		uint16 flags = color;
 		if (flags & 0x2000) {
 			blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
 		} else if (flags & 0x4000) {
@@ -1127,6 +1127,8 @@
 		} else {
 			fill(backbuff, vs->pitch, flags, width, height);
 		}
+	} else {
+		fill(backbuff, vs->pitch, color, width, height);
 	}
 }
 


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