[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.182,1.183 gfx.cpp,2.339,2.340

Max Horn fingolfin at users.sourceforge.net
Sun Sep 26 11:12:57 CEST 2004


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

Modified Files:
	akos.cpp gfx.cpp 
Log Message:
fix actor masking with V7_SMOOTH_SCROLLING_HACK enabled

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -d -r1.182 -r1.183
--- akos.cpp	24 Sep 2004 20:37:24 -0000	1.182
+++ akos.cpp	26 Sep 2004 18:09:47 -0000	1.183
@@ -511,8 +511,8 @@
 	height = _height;
 
 	scaleytab = &v1.scaletable[v1.scaleYindex];
-	maskbit = revBitMask[v1.x & 7];
-	mask = v1.mask_ptr + v1.x / 8;
+	maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7];
+	mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf);
 
 	if (len)
 		goto StartPos;
@@ -532,7 +532,7 @@
 						return;
 					}
 				} else {
-					masked = (y < 0 || y >= _outheight) || (v1.mask_ptr && (*mask & maskbit));
+					masked = (y < 0 || y >= _outheight) || (*mask & maskbit);
 
 					if (color && !masked && !skip_column) {
 						pcolor = palette[color];
@@ -566,14 +566,14 @@
 					v1.x += v1.scaleXstep;
 					if (v1.x < 0 || v1.x >= _outwidth)
 						return;
-					maskbit = revBitMask[v1.x & 7];
+					maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7];
 					v1.destptr += v1.scaleXstep;
 					skip_column = false;
 				} else
 					skip_column = true;
 				v1.scaleXindex += v1.scaleXstep;
 				dst = v1.destptr;
-				mask = v1.mask_ptr + v1.x / 8;
+				mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf);
 			}
 		StartPos:;
 		} while (--len);
@@ -928,8 +928,6 @@
 
 	v1.destptr = _outptr + v1.y * _outwidth + v1.x;
 
-	v1.mask_ptr = _vm->getMaskBuffer(0, v1.y, _zbuf);
-
 	codec1_genericDecode();
 	
 	return drawFlag;

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.339
retrieving revision 2.340
diff -u -d -r2.339 -r2.340
--- gfx.cpp	26 Sep 2004 14:56:51 -0000	2.339
+++ gfx.cpp	26 Sep 2004 18:09:48 -0000	2.340
@@ -328,6 +328,7 @@
 			// in V7_SMOOTH_SCROLLING_HACK mode. Right now I have no idea
 			// why this hack is needed, but for now it works well enough.
 			lp = left / 8 + _screenStartStrip - 1;
+			//lp = (left + vs->xstart) / 8;
 		} else
 #endif
 		lp = left / 8 + _screenStartStrip;
@@ -756,7 +757,7 @@
 }
 
 byte *ScummEngine::getMaskBuffer(int x, int y, int z) {
-	return gdi.getMaskBuffer(x / 8, y, z) + _screenStartStrip;
+	return gdi.getMaskBuffer((x + virtscr[0].xstart) / 8, y, z);
 }
 
 byte *Gdi::getMaskBuffer(int x, int y, int z) {





More information about the Scummvm-git-logs mailing list