[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,1.61,1.62 string.cpp,1.44,1.45
Max Horn
fingolfin at users.sourceforge.net
Tue Nov 19 08:34:04 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv29423
Modified Files:
gfx.cpp string.cpp
Log Message:
cleanup
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- gfx.cpp 10 Nov 2002 19:00:28 -0000 1.61
+++ gfx.cpp 19 Nov 2002 16:33:32 -0000 1.62
@@ -280,7 +280,6 @@
void Scumm::setCameraAt(int pos_x, int pos_y)
{
-
if (_features & GF_AFTER_V7) {
ScummPoint old;
@@ -390,31 +389,15 @@
// for GF_SMALL_HEADER already.
gdi._numZBuffer = 2;
} else if (_features & GF_SMALL_HEADER) {
-
-//#define DEBUG_ZPLANE_CODE
-
- ptr = findResourceData(MKID('SMAP'), room);
-#ifdef DEBUG_ZPLANE_CODE
- printf("Trying to determine room zplanes:\n");
- hexdump(ptr-6, 0x20);
-#endif
-
int off;
- gdi._numZBuffer = 0;
+ ptr = findResourceData(MKID('SMAP'), room);
off = READ_LE_UINT32(ptr);
+ gdi._numZBuffer = 0;
for (i = 0; off && (i < 4); i++) {
-#ifdef DEBUG_ZPLANE_CODE
- printf("Plane %d\n", i);
- hexdump(ptr, 0x20);
-#endif
-
gdi._numZBuffer++;
ptr += off;
off = READ_LE_UINT16(ptr);
}
-#ifdef DEBUG_ZPLANE_CODE
- printf("Real plane count = %d\n", gdi._numZBuffer);
-#endif
} else {
ptr = findResource(MKID('RMIH'), findResource(MKID('RMIM'), room));
gdi._numZBuffer = READ_LE_UINT16(ptr + 8) + 1;
@@ -1798,7 +1781,7 @@
right += _lastXstart - vs->xstart;
}
- right++;
+ right++; // FIXME - why do we increment right here?!? (add comment)
if (left < 0)
left = 0;
if (right < 0)
@@ -1812,10 +1795,9 @@
updateDirtyRect(vs->number, left, right, top - topline, bottom - topline, 0x40000000);
- height = (top - topline) * _realWidth + vs->xstart + left;
-
- backbuff = vs->screenPtr + height;
- bgbak = getResourceAddress(rtBuffer, vs->number + 5) + height;
+ int offset = (top - topline) * _realWidth + vs->xstart + left;
+ backbuff = vs->screenPtr + offset;
+ bgbak = getResourceAddress(rtBuffer, vs->number + 5) + offset;
height = bottom - top;
width = right - left;
@@ -1839,11 +1821,9 @@
} while (--height);
}
} else {
- if (height) {
- do {
- memset(backbuff, _bkColor, width);
- backbuff += _realWidth;
- } while (--height);
+ while (height--) {
+ memset(backbuff, _bkColor, width);
+ backbuff += _realWidth;
}
}
}
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- string.cpp 6 Nov 2002 14:50:34 -0000 1.44
+++ string.cpp 19 Nov 2002 16:33:33 -0000 1.45
@@ -308,8 +308,6 @@
gdi._mask_bottom = 16;
}
restoreCharsetBg();
- charset._xpos2 = _string[0].xpos;
- charset._ypos2 = _string[0].ypos;
}
t = charset._right - _string[0].xpos - 1;
@@ -515,7 +513,6 @@
charset._ypos2 = charset._top;
continue;
}
-
} while (1);
gdi._mask_left = charset._strLeft;
More information about the Scummvm-git-logs
mailing list