aboutsummaryrefslogtreecommitdiff
path: root/gfx.cpp
diff options
context:
space:
mode:
authorJames Brown2002-04-17 17:01:08 +0000
committerJames Brown2002-04-17 17:01:08 +0000
commit610f45a750af7e46243c140e2ed9f8f8b7636067 (patch)
treed4cdc57a754817994ab32b496bef2aad2ba711e5 /gfx.cpp
parent1df77c2002de490074342c586f6fb68422462010 (diff)
downloadscummvm-rg350-610f45a750af7e46243c140e2ed9f8f8b7636067.tar.gz
scummvm-rg350-610f45a750af7e46243c140e2ed9f8f8b7636067.tar.bz2
scummvm-rg350-610f45a750af7e46243c140e2ed9f8f8b7636067.zip
LoomCD masks working. jah is a genius. That is all.
svn-id: r3977
Diffstat (limited to 'gfx.cpp')
-rw-r--r--gfx.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/gfx.cpp b/gfx.cpp
index 97cfc56e0c..b95b7d5cf7 100644
--- a/gfx.cpp
+++ b/gfx.cpp
@@ -338,10 +338,8 @@ void Scumm::initBGBuffers()
byte *room;
room = getResourceAddress(rtRoom, _roomResource);
- if (_features & GF_OLD256) {
- gdi._numZBuffer = 2;
- } else if (_features & GF_SMALL_HEADER) {
- gdi._numZBuffer = 1; // ENDER
+ if (_features & GF_SMALL_HEADER) {
+ gdi._numZBuffer = 2; // ENDER
} else {
ptr = findResource(MKID('RMIH'), findResource(MKID('RMIM'), room));
gdi._numZBuffer = READ_LE_UINT16(ptr + 8) + 1;
@@ -653,7 +651,7 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen * vs, int x, int y, int h,
numzbuf = _disable_zbuffer ? 0 : _numZBuffer;
- if (_vm->_features & GF_OLD256) {
+ if (_vm->_features & GF_SMALL_HEADER) {
/* this is really ugly, FIXME */
if (ptr[-2] == 'B' && ptr[-1] == 'M' &&
READ_LE_UINT32(ptr - 6) > (READ_LE_UINT32(ptr) + 10)) {
@@ -746,7 +744,10 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen * vs, int x, int y, int h,
continue;
if (_vm->_features & GF_SMALL_HEADER)
- offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 4);
+ if (_vm->_features & GF_OLD256)
+ offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 4);
+ else
+ offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 2);
else
offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8);