[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.472,2.473

kirben kirben at users.sourceforge.net
Tue Oct 18 06:57:30 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18120/scumm

Modified Files:
	gfx.cpp 
Log Message:

HE games use overlow to get correct color value.
Fixes regressions in activity and puttmoon.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.472
retrieving revision 2.473
diff -u -d -r2.472 -r2.473
--- gfx.cpp	18 Oct 2005 01:30:20 -0000	2.472
+++ gfx.cpp	18 Oct 2005 13:56:10 -0000	2.473
@@ -1087,18 +1087,33 @@
 			byte *mask = (byte *)_charset->_textSurface.pixels + _charset->_textSurface.pitch * (y - _screenTop) + x;
 			fill(mask, _charset->_textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height);
 		}
+	} else if (_heversion == 100) {
+		// Flags are used for different methods in HE games
+		int32 flags = color;
+		if (flags & 0x4000000) {
+			blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
+		} else if (flags & 0x2000000) {
+			blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height);
+		} else if (flags & 0x1000000) {
+			flags &= 0xFFFFFF;
+			fill(backbuff, vs->pitch, flags, width, height);
+			fill(bgbuff, vs->pitch, flags, width, height);
+		} else {
+			fill(backbuff, vs->pitch, flags, width, height);
+		}
 	} else {
-		// Flags are used for different methods in HE71+ games
-		if ((color & 0x2000) || (color & 0x4000000)) {
+		// Flags are used for different methods in HE games
+		int16 flags = color;
+		if (flags & 0x2000) {
 			blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height);
-		} else if ((color & 0x4000) || (color & 0x2000000)) {
+		} else if (flags & 0x4000) {
 			blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height);
-		} else if ((color & 0x8000) || (color & 0x1000000)) {
-			color &= (_heversion == 100) ? 0xFFFFFF : 0x7FFF;
-			fill(backbuff, vs->pitch, color, width, height);
-			fill(bgbuff, vs->pitch, color, width, height);
+		} else if (flags & 0x8000) {
+			flags &= 0x7FFF;
+			fill(backbuff, vs->pitch, flags, width, height);
+			fill(bgbuff, vs->pitch, flags, width, height);
 		} else {
-			fill(backbuff, vs->pitch, color, width, height);
+			fill(backbuff, vs->pitch, flags, width, height);
 		}
 	}
 }





More information about the Scummvm-git-logs mailing list