aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-09-27 01:26:05 +0000
committerTravis Howell2004-09-27 01:26:05 +0000
commit9dcd1d5ccdef5086d392a5f0905b6a89471b79df (patch)
treee7a2574762f0dc94577fe87542b388c05bdeb8fb
parent3c050327ce28f6a5a578ab39e0e41d7e379f6f28 (diff)
downloadscummvm-rg350-9dcd1d5ccdef5086d392a5f0905b6a89471b79df.tar.gz
scummvm-rg350-9dcd1d5ccdef5086d392a5f0905b6a89471b79df.tar.bz2
scummvm-rg350-9dcd1d5ccdef5086d392a5f0905b6a89471b79df.zip
Revert by bad change and just adjust for BMAP images.
svn-id: r15304
-rw-r--r--scumm/gfx.cpp18
-rw-r--r--scumm/gfx.h2
2 files changed, 11 insertions, 9 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 3016ce4a47..d96ff6bc91 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1092,11 +1092,16 @@ void Gdi::drawBitmapV2Helper(const byte *ptr, VirtScreen *vs, int x, int y, cons
}
}
-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 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
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 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip, int width)
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);
}
}
diff --git a/scumm/gfx.h b/scumm/gfx.h
index ecb1ae64ff..2477e1b7de 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -261,7 +261,7 @@ protected:
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);