aboutsummaryrefslogtreecommitdiff
path: root/scumm/gfx.cpp
diff options
context:
space:
mode:
authorMax Horn2002-12-30 14:04:46 +0000
committerMax Horn2002-12-30 14:04:46 +0000
commit1fad3ca0b92640ab08252b3d5dce7e9cfcadb533 (patch)
tree0e2e3c8222c310fe1c2a8268f04953d9840d1173 /scumm/gfx.cpp
parent69dfba70eb07d8f281c0ddabe111b6db0096c009 (diff)
downloadscummvm-rg350-1fad3ca0b92640ab08252b3d5dce7e9cfcadb533.tar.gz
scummvm-rg350-1fad3ca0b92640ab08252b3d5dce7e9cfcadb533.tar.bz2
scummvm-rg350-1fad3ca0b92640ab08252b3d5dce7e9cfcadb533.zip
cleanup
svn-id: r6278
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r--scumm/gfx.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index fb596f9cd5..6d1e1e5fc1 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -814,14 +814,8 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h,
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)) {
- zplane_list[1] = smap_ptr + READ_LE_UINT32(ptr);
- // FIXME - how does GF_OLD256 encode the multiple zplanes?
- if (!(_vm->_features & GF_OLD256))
- for (i = 2; i < numzbuf; i++) {
- zplane_list[i] = zplane_list[i-1] + READ_LE_UINT16(zplane_list[i-1]);
- }
- } else if (ptr[-4] == 'O' && ptr[-3] == 'I' && READ_LE_UINT32(ptr - 8) > READ_LE_UINT32(ptr) + 12) {
+ if ((ptr[-2] == 'B' && ptr[-1] == 'M' && READ_LE_UINT32(ptr - 6) > (READ_LE_UINT32(ptr) + 10)) ||
+ (ptr[-4] == 'O' && ptr[-3] == 'I' && READ_LE_UINT32(ptr - 8) > READ_LE_UINT32(ptr) + 12)) {
zplane_list[1] = smap_ptr + READ_LE_UINT32(ptr);
// FIXME - how does GF_OLD256 encode the multiple zplanes?
if (!(_vm->_features & GF_OLD256))
@@ -946,12 +940,11 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, const int h,
if (!zplane_list[i])
continue;
- if (_vm->_features & GF_SMALL_HEADER) {
- 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 if (_vm->_features & GF_AFTER_V8)
+ if (_vm->_features & GF_OLD256)
+ offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 4);
+ else if (_vm->_features & GF_SMALL_HEADER)
+ offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 2);
+ else if (_vm->_features & GF_AFTER_V8)
offs = READ_LE_UINT32(zplane_list[i] + stripnr * 4 + 8);
else
offs = READ_LE_UINT16(zplane_list[i] + stripnr * 2 + 8);