[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.452,2.453

Eugene Sandulenko sev at users.sourceforge.net
Wed May 18 16:58:20 CEST 2005


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

Modified Files:
	gfx.cpp 
Log Message:
Fix yet another actor masking issue


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.452
retrieving revision 2.453
diff -u -d -r2.452 -r2.453
--- gfx.cpp	18 May 2005 23:17:00 -0000	2.452
+++ gfx.cpp	18 May 2005 23:57:17 -0000	2.453
@@ -2116,8 +2116,6 @@
 }
 
 void Gdi::drawStripNESMask(byte *dst, int stripnr, int top, int height) const {
-	if (!_NES.hasmask)
-		return;
 	top /= 8;
 	height /= 8;
 	int x = stripnr;	// masks, unlike room graphics, should NOT be adjusted
@@ -2129,7 +2127,12 @@
 		return;
 	}
 	for (int y = top; y < top + height; y++) {
-		byte c = (((_objectMode ? _NES.masktableObj : _NES.masktable)[y][x >> 3] >> (x & 7)) & 1) ? 0xFF : 0x00;
+		byte c;
+		if (_NES.hasmask)
+			c = (((_objectMode ? _NES.masktableObj : _NES.masktable)[y][x >> 3] >> (x & 7)) & 1) ? 0xFF : 0x00;
+		else
+			c = 0;
+
 		for (int i = 0; i < 8; i++) {
 			*dst &= c;
 			dst += _numStrips;





More information about the Scummvm-git-logs mailing list