diff options
| -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) {  | 
