diff options
author | Max Horn | 2003-04-26 10:43:59 +0000 |
---|---|---|
committer | Max Horn | 2003-04-26 10:43:59 +0000 |
commit | 2363704bd78026227a27a074145d43bb2bb3fea1 (patch) | |
tree | e2598e66f7e94c3f530db2c561e11c382462619c /scumm/gfx.cpp | |
parent | cfaee3247467b74dcc1796d73df09358a0345ede (diff) | |
download | scummvm-rg350-2363704bd78026227a27a074145d43bb2bb3fea1.tar.gz scummvm-rg350-2363704bd78026227a27a074145d43bb2bb3fea1.tar.bz2 scummvm-rg350-2363704bd78026227a27a074145d43bb2bb3fea1.zip |
proper fix for COMI regression
svn-id: r7125
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r-- | scumm/gfx.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 7a5291c13b..703f96eb83 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -852,9 +852,8 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h, if (_disable_zbuffer) numzbuf = 0; -// FIXME what is this supposed to do? breaks comi -// else if (_numZBuffer <= 1) -// numzbuf = _numZBuffer; + else if (_numZBuffer <= 1) + numzbuf = _numZBuffer; else { numzbuf = _numZBuffer; assert(numzbuf <= (int)ARRAYSIZE(zplane_list)); @@ -887,9 +886,6 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h, for (i = 1; i < numzbuf; i++) { zplane_list[i] = zplnOffsChunkStart + READ_LE_UINT32(zplnOffsChunkStart + 4 + i*4) + 16; } - - // A small hack to skip to the BSTR->WRAP->OFFS chunk - smap_ptr += 24; } else { const uint32 zplane_tags[] = { MKID('ZP00'), @@ -904,6 +900,12 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h, } } } + + if (_vm->_features & GF_AFTER_V8) { + // A small hack to skip to the BSTR->WRAP->OFFS chunk. Note: order matters, we do this + // *after* the Z buffer code because that assumes' the orginal value of smap_ptr. + smap_ptr += 24; + } bottom = y + h; if (bottom > vs->height) { |