[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.201,1.202 base-costume.cpp,2.22,2.23 bomp.cpp,2.25,2.26
Max Horn
fingolfin at users.sourceforge.net
Sat Nov 27 18:30:05 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26950
Modified Files:
akos.cpp base-costume.cpp bomp.cpp
Log Message:
Fix AKOS clipping issues at the left/right border of the screen (smooth scrolling regression)
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- akos.cpp 27 Nov 2004 17:50:21 -0000 1.201
+++ akos.cpp 28 Nov 2004 02:05:03 -0000 1.202
@@ -518,8 +518,8 @@
height = _height;
scaleytab = &v1.scaletable[v1.scaleYindex];
- maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7];
- mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf);
+ maskbit = revBitMask[v1.x & 7];
+ mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf);
if (len)
goto StartPos;
@@ -573,14 +573,14 @@
v1.x += v1.scaleXstep;
if (v1.x < 0 || v1.x >= _out.w)
return;
- maskbit = revBitMask[(v1.x + _vm->virtscr[0].xstart) & 7];
+ maskbit = revBitMask[v1.x & 7];
v1.destptr += v1.scaleXstep;
skip_column = false;
} else
skip_column = true;
v1.scaleXindex += v1.scaleXstep;
dst = v1.destptr;
- mask = _vm->getMaskBuffer(v1.x, v1.y, _zbuf);
+ mask = _vm->getMaskBuffer(v1.x - (_vm->virtscr[0].xstart & 7), v1.y, _zbuf);
}
StartPos:;
} while (--len);
@@ -978,8 +978,7 @@
bdd.srcwidth = _width;
bdd.srcheight = _height;
- bdd.dst = _vm->virtscr[kMainVirtScreen];
- bdd.dst.pixels = _out.pixels;
+ bdd.dst = _out;
bdd.dataptr = _srcptr;
bdd.scale_x = 255;
bdd.scale_y = 255;
Index: base-costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.cpp,v
retrieving revision 2.22
retrieving revision 2.23
diff -u -d -r2.22 -r2.23
--- base-costume.cpp 25 Nov 2004 23:36:02 -0000 2.22
+++ base-costume.cpp 28 Nov 2004 02:05:04 -0000 2.23
@@ -34,6 +34,10 @@
_out.pixels = vs.getBackPixels(0, 0);
else
_out.pixels = vs.getPixels(0, 0);
+
+ _actorX += _vm->virtscr[0].xstart & 7;
+ _out.w = _out.pitch;
+ _out.pixels = (byte *)_out.pixels - (_vm->virtscr[0].xstart & 7);
_numStrips = numStrips;
Index: bomp.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bomp.cpp,v
retrieving revision 2.25
retrieving revision 2.26
diff -u -d -r2.25 -r2.26
--- bomp.cpp 27 Nov 2004 19:06:50 -0000 2.25
+++ bomp.cpp 28 Nov 2004 02:05:04 -0000 2.26
@@ -235,11 +235,11 @@
src = bd.dataptr;
dst = (byte *)bd.dst.pixels + bd.y * bd.dst.pitch + (bd.x + clip.left);
- const byte maskbit = revBitMask[(bd.x + clip.left + virtscr[0].xstart) & 7];
+ const byte maskbit = revBitMask[(bd.x + clip.left) & 7];
// Mask against any additionally imposed mask
if (bd.maskPtr) {
- mask = bd.maskPtr + (bd.y * gdi._numStrips) + ((bd.x + clip.left + (virtscr[0].xstart&7)) / 8);
+ mask = bd.maskPtr + (bd.y * gdi._numStrips) + ((bd.x + clip.left) / 8);
}
// Setup vertical scaling
More information about the Scummvm-git-logs
mailing list