[Scummvm-cvs-logs] CVS: scummvm/simon vga.cpp,1.76,1.77

Travis Howell kirben at users.sourceforge.net
Wed Jul 30 09:26:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv9895/simon

Modified Files:
	vga.cpp 
Log Message:

Fix Golum Ring causes graphic glitches, bug #777966


Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- vga.cpp	30 Jul 2003 11:16:09 -0000	1.76
+++ vga.cpp	30 Jul 2003 16:25:05 -0000	1.77
@@ -748,8 +748,6 @@
 
 		vc_10_skip_cols(&state);
 
-		/* XXX: implement transparency */
-
 		w = 0;
 		do {
 			mask = vc_10_depack_column(&state);	/* esi */
@@ -757,15 +755,33 @@
 			dst = state.surf_addr + w * 2;	/* edi */
 
 			h = state.draw_height;
-			do {
-				if (mask[0] & 0xF0)
-					dst[0] = src[0];
-				if (mask[0] & 0x0F)
-					dst[1] = src[1];
-				mask++;
-				dst += state.surf_pitch;
-				src += state.surf2_pitch;
-			} while (--h);
+			if (!(_game & GF_SIMON2) && vc_get_bit(88)) {
+				/* transparency */
+				do {
+					if (mask[0] & 0xF0) {
+						if ((dst[0] & 0x0F0) == 0x20)
+							dst[0] = src[0];
+					}
+					if (mask[0] & 0x0F) {
+						if ((dst[1] & 0x0F0) == 0x20)
+							dst[1] = src[1];
+					}
+					mask++;
+					dst += state.surf_pitch;
+					src += state.surf2_pitch;
+				} while (--h);
+			} else {
+				/* no transparency */
+				do {
+					if (mask[0] & 0xF0)
+						dst[0] = src[0];
+					if (mask[0] & 0x0F)
+						dst[1] = src[1];
+					mask++;
+					dst += state.surf_pitch;
+					src += state.surf2_pitch;
+				} while (--h);
+			}
 		} while (++w != state.draw_width);
 
 		/* vc_10_helper_5 */





More information about the Scummvm-git-logs mailing list