[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.341,2.342 gfx.h,1.85,1.86
Travis Howell
kirben at users.sourceforge.net
Sun Sep 26 18:32:17 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2810/scumm
Modified Files:
gfx.cpp gfx.h
Log Message:
Revert by bad change and just adjust for BMAP images.
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.341
retrieving revision 2.342
diff -u -d -r2.341 -r2.342
--- gfx.cpp 26 Sep 2004 20:32:57 -0000 2.341
+++ gfx.cpp 27 Sep 2004 01:26:05 -0000 2.342
@@ -1092,11 +1092,16 @@
}
}
-int Gdi::getZPlanes(const byte *ptr, const byte *zplane_list[9]) const {
+int Gdi::getZPlanes(const byte *ptr, const byte *zplane_list[9], bool bmapImage) const {
int numzbuf;
int i;
- zplane_list[0] = ptr;
+ if ((_vm->_features & GF_SMALL_HEADER) || _vm->_version == 8)
+ zplane_list[0] = ptr;
+ else if (bmapImage)
+ zplane_list[0] = _vm->findResource(MKID('BMAP'), ptr);
+ else
+ zplane_list[0] = _vm->findResource(MKID('SMAP'), ptr);
if (_zbufferDisabled)
numzbuf = 0;
@@ -1187,7 +1192,7 @@
assert(smap_ptr);
- numzbuf = getZPlanes(ptr, zplane_list);
+ numzbuf = getZPlanes(ptr, zplane_list, false);
bottom = y + height;
if (bottom > vs->h) {
@@ -1395,22 +1400,19 @@
if (_numZBuffer <= 1)
return;
- getZPlanes(ptr, zplane_list);
+ getZPlanes(ptr, zplane_list, true);
+ uint32 offs;
for (int stripnr = 0; stripnr < _numStrips; stripnr++)
for (int i = 1; i < _numZBuffer; i++) {
- uint32 offs;
-
if (!zplane_list[i])
continue;
offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8);
-
mask_ptr = getMaskBuffer(stripnr, 0, i);
if (offs) {
z_plane_ptr = zplane_list[i] + offs;
-
decompressMaskImg(mask_ptr, z_plane_ptr, vs->h);
}
}
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- gfx.h 26 Sep 2004 13:41:10 -0000 1.85
+++ gfx.h 27 Sep 2004 01:26:05 -0000 1.86
@@ -261,7 +261,7 @@
byte *getMaskBuffer(int x, int y, int z);
- int getZPlanes(const byte *smap_ptr, const byte *zplane_list[9]) const;
+ int getZPlanes(const byte *smap_ptr, const byte *zplane_list[9], bool bmapImage) const;
void drawBitmapV2Helper(const byte *ptr, VirtScreen *vs, int x, int y, const int width, const int height,
int stripnr, int numstrip, StripTable *table);
More information about the Scummvm-git-logs
mailing list