[Scummvm-cvs-logs] CVS: scummvm/scumm costume.cpp,1.103,1.104
Pawel Kolodziejski
aquadran at users.sourceforge.net
Mon Aug 18 11:00:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv11930
Modified Files:
costume.cpp
Log Message:
fixed y position of mask in v1 costume rendering
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- costume.cpp 18 Aug 2003 10:56:21 -0000 1.103
+++ costume.cpp 18 Aug 2003 17:59:06 -0000 1.104
@@ -360,6 +360,7 @@
}
v1.skip_width >>= 3;
+ const byte *mask_ptr = v1.mask_ptr;
if (len)
goto StartPos;
@@ -376,7 +377,7 @@
color = *src++;
if (y < _outheight) {
-#define MASK_AT(xoff) (v1.mask_ptr && ((v1.mask_ptr[(v1.x+xoff) >> 3] | v1.mask_ptr[((v1.x+xoff) >> 3) + v1.imgbufoffs]) & revBitMask[(v1.x+xoff) & 7]))
+#define MASK_AT(xoff) (mask_ptr && ((mask_ptr[(v1.x+xoff) >> 3] | mask_ptr[((v1.x+xoff) >> 3) + v1.imgbufoffs]) & revBitMask[(v1.x+xoff) & 7]))
if (!_mirror) {
pcolor = (color >> 0) & 3; if (pcolor) { if (!MASK_AT(0)) dst[0] = palette[pcolor]; if (!MASK_AT(1)) dst[1] = palette[pcolor]; }
pcolor = (color >> 2) & 3; if (pcolor) { if (!MASK_AT(2)) dst[2] = palette[pcolor]; if (!MASK_AT(3)) dst[3] = palette[pcolor]; }
@@ -392,6 +393,7 @@
}
dst += _outwidth;
y++;
+ mask_ptr += _numStrips;
if (!--height) {
if (!--v1.skip_width)
return;
@@ -400,6 +402,7 @@
v1.x += 8 * v1.scaleXstep;
if (v1.x < 0 || v1.x >= _vm->_screenWidth)
return;
+ mask_ptr = v1.mask_ptr + (v1.x >> 3);
v1.destptr += 8 * v1.scaleXstep;
dst = v1.destptr;
}
More information about the Scummvm-git-logs
mailing list