[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.319,2.320 akos.cpp,1.181,1.182 bomp.cpp,2.21,2.22 object.cpp,1.187,1.188 base-costume.h,1.26,1.27
Max Horn
fingolfin at users.sourceforge.net
Fri Sep 24 13:38:03 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26266
Modified Files:
gfx.cpp akos.cpp bomp.cpp object.cpp base-costume.h
Log Message:
More V7_SMOOTH_SCROLLING_HACK related fixes
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.319
retrieving revision 2.320
diff -u -d -r2.319 -r2.320
--- gfx.cpp 24 Sep 2004 07:36:28 -0000 2.319
+++ gfx.cpp 24 Sep 2004 20:37:23 -0000 2.320
@@ -1223,9 +1223,9 @@
if (bottom > vs->bdirty[sx])
vs->bdirty[sx] = bottom;
- backbuff_ptr = (byte *)vs->pixels + (y * _numStrips + x) * 8;
+ backbuff_ptr = (byte *)vs->pixels + y * vs->pitch + x * 8;
if (vs->hasTwoBuffers)
- bgbak_ptr = vs->backBuf + (y * _numStrips + x) * 8;
+ bgbak_ptr = vs->backBuf + y * vs->pitch + x * 8;
else
bgbak_ptr = backbuff_ptr;
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- akos.cpp 23 Sep 2004 19:51:12 -0000 1.181
+++ akos.cpp 24 Sep 2004 20:37:24 -0000 1.182
@@ -973,9 +973,8 @@
bdd.srcwidth = _width;
bdd.srcheight = _height;
- bdd.out = _outptr;
- bdd.outwidth = _outwidth;
- bdd.outheight = _outheight;
+ bdd.dst = _vm->virtscr[kMainVirtScreen];
+ bdd.dst.pixels = _outptr;
bdd.dataptr = _srcptr;
bdd.scale_x = 255;
bdd.scale_y = 255;
Index: bomp.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bomp.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- bomp.cpp 8 Aug 2004 22:09:49 -0000 2.21
+++ bomp.cpp 24 Sep 2004 20:37:24 -0000 2.22
@@ -219,17 +219,17 @@
}
clip.right = bd.srcwidth;
- if (clip.right > bd.outwidth - bd.x) {
- clip.right = bd.outwidth - bd.x;
+ if (clip.right > bd.dst.w - bd.x) {
+ clip.right = bd.dst.w - bd.x;
}
clip.bottom = bd.srcheight;
- if (clip.bottom > bd.outheight - bd.y) {
- clip.bottom = bd.outheight - bd.y;
+ if (clip.bottom > bd.dst.h - bd.y) {
+ clip.bottom = bd.dst.h - bd.y;
}
src = bd.dataptr;
- dst = bd.out + bd.y * bd.outwidth + bd.x + clip.left;
+ dst = (byte *)bd.dst.pixels + bd.y * bd.dst.pitch + (bd.x + clip.left);
const byte maskbit = revBitMask[(bd.x + clip.left) & 7];
@@ -319,7 +319,7 @@
// Advance to the next line
pos_y++;
mask += gdi._numStrips;
- dst += bd.outwidth;
+ dst += bd.dst.pitch;
}
}
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- object.cpp 21 Sep 2004 12:57:38 -0000 1.187
+++ object.cpp 24 Sep 2004 20:37:24 -0000 1.188
@@ -1192,7 +1192,7 @@
searchptr = roomptr;
assert(searchptr);
ResourceIterator obcds(searchptr, (_features & GF_SMALL_HEADER) != 0);
- for (i = 0;;) {
+ for (i = 0; i < numobj; i++) {
obcdptr = obcds.findNext(MKID('OBCD'));
if (obcdptr == NULL)
error("findObjectInRoom: Not enough code blocks in room %d", room);
@@ -1212,15 +1212,15 @@
fo->cdhd = cdhd;
break;
}
- if (++i == numobj)
- error("findObjectInRoom: Object %d not found in room %d", id, room);
}
+ if (i == numobj)
+ error("findObjectInRoom: Object %d not found in room %d", id, room);
}
roomptr = fo->roomptr;
if (findWhat & foImageHeader) {
ResourceIterator obims(roomptr, (_features & GF_SMALL_HEADER) != 0);
- for (i = 0;;) {
+ for (i = 0; i < numobj; i++) {
obimptr = obims.findNext(MKID('OBIM'));
if (obimptr == NULL)
error("findObjectInRoom: Not enough image blocks in room %d", room);
@@ -1241,9 +1241,9 @@
fo->imhd = imhd;
break;
}
- if (++i == numobj)
- error("findObjectInRoom: Object %d image not found in room %d", id, room);
}
+ if (i == numobj)
+ error("findObjectInRoom: Object %d image not found in room %d", id, room);
}
}
@@ -1495,9 +1495,8 @@
bdd.srcheight = READ_LE_UINT16(&((const BompHeader *)bomp)->old.height);
}
- bdd.out = vs->getPixels(0, 0);
- bdd.outwidth = vs->w;
- bdd.outheight = vs->h;
+ bdd.dst = *vs;
+ bdd.dst.pixels = vs->getPixels(0, 0);
// Skip the bomp header
if (_version == 8) {
bdd.dataptr = bomp + 8;
Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- base-costume.h 8 Sep 2004 21:14:12 -0000 1.26
+++ base-costume.h 24 Sep 2004 20:37:24 -0000 1.27
@@ -111,7 +111,7 @@
_draw_top = _draw_bottom = 0;
_vm = scumm;
- _numStrips = _vm->gdi._numStrips;
+ _numStrips = -1;
_srcptr = 0;
_xmove = _ymove = 0;
_mirror = false;
More information about the Scummvm-git-logs
mailing list