aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorKirben2013-08-26 19:32:26 +1000
committerKirben2013-08-26 19:32:26 +1000
commit5f6451d092af39b1600248005a53cc62343cc03f (patch)
treeca20e6ab84988f4abe65ca63ec14b4e15ee5bafe /engines
parent2141ad285e0200f4773726a13504f960e382f13e (diff)
downloadscummvm-rg350-5f6451d092af39b1600248005a53cc62343cc03f.tar.gz
scummvm-rg350-5f6451d092af39b1600248005a53cc62343cc03f.tar.bz2
scummvm-rg350-5f6451d092af39b1600248005a53cc62343cc03f.zip
SCUMM: Fix COMI regression, after commit 84d1d28373d782464bd46b10abd6b092f7eb6367.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/gfx.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 4d65ccc88a..1bb4a28f65 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1769,11 +1769,8 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
// Check whether lights are turned on or not
const bool lightsOn = _vm->isLightOn();
- if (_vm->_game.features & GF_SMALL_HEADER) {
+ if ((_vm->_game.features & GF_SMALL_HEADER) || _vm->_game.version == 8) {
smap_ptr = ptr;
- } else if (_vm->_game.version == 8) {
- // Skip to the BSTR->WRAP->OFFS chunk
- smap_ptr = ptr + 24;
} else {
smap_ptr = _vm->findResource(MKTAG('S','M','A','P'), ptr);
assert(smap_ptr);
@@ -1887,6 +1884,12 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
smapLen = READ_LE_UINT32(smap_ptr);
if (stripnr * 4 + 4 < smapLen)
offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 4);
+ } else if (_vm->_game.version == 8) {
+ smapLen = READ_BE_UINT32(smap_ptr + 4);
+ // Skip to the BSTR->WRAP->OFFS chunk
+ smap_ptr += 24;
+ if (stripnr * 4 + 8 < smapLen)
+ offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 8);
} else {
smapLen = READ_BE_UINT32(smap_ptr + 4);
if (stripnr * 4 + 8 < smapLen)