diff options
-rw-r--r-- | scumm/gfx.cpp | 10 | ||||
-rw-r--r-- | scumm/object.cpp | 11 | ||||
-rw-r--r-- | scumm/object.h | 3 |
3 files changed, 16 insertions, 8 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 154ec862ec..ce648fce7d 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1255,6 +1255,10 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi } CHECK_HEAP; + // COMI only uses flag value + if (_vm->_version == 8) + useOrDecompress = true; + if (_vm->_version == 1) { mask_ptr = getMaskBuffer(x, y, 1); drawStripC64Mask(mask_ptr, stripnr, width, height); @@ -1816,9 +1820,6 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine switch (code) { case 1: - // FIXME: Ugly workaround for bug #901462 - if (_vm->_version == 8) - useOrDecompress = true; drawStripBasicV(dst, dstPitch, src, numLinesToProcess, false); break; @@ -1838,9 +1839,6 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine case 6: case 10: - // FIXME: Ugly workaround for bug #901462 - if (_vm->_version == 8 && code == 10) - useOrDecompress = true; drawStripComplex(dst, dstPitch, src, numLinesToProcess, false); break; diff --git a/scumm/object.cpp b/scumm/object.cpp index e18e245082..49f03ebe84 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -475,7 +475,15 @@ void ScummEngine::drawObject(int obj, int arg) { } if (numstrip != 0) { - byte flags = (_features & GF_HUMONGOUS) ? 0 : Gdi::dbAllowMaskOr; + byte flags; + if (_version == 8) + flags = (od.flag & 16); + else if (_features & GF_HUMONGOUS) + //TODO Should be read from object header + flags = 0; + else + flags = Gdi::dbAllowMaskOr;; + if (_version == 1) { gdi._C64ObjectMode = true; gdi.decodeC64Gfx(ptr, gdi._C64ObjectMap, width * (height / 8) * 3); @@ -777,6 +785,7 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * od->height = (uint)READ_LE_UINT32(&imhd->v8.height); // HACK: This is done sinec an angle doesn't fit into a byte (360 > 256) od->actordir = toSimpleDir(1, READ_LE_UINT32(&imhd->v8.actordir)); + od->flag = READ_LE_UINT32(&imhd->v8.flag); } else if (_version == 7) { od->obj_nr = READ_LE_UINT16(&(cdhd->v7.obj_id)); diff --git a/scumm/object.h b/scumm/object.h index 160cb2be26..11b8bd89ed 100644 --- a/scumm/object.h +++ b/scumm/object.h @@ -37,6 +37,7 @@ struct ObjectData { byte parentstate; byte state; byte fl_object_index; + byte flag; }; #if !defined(__GNUC__) @@ -136,7 +137,7 @@ struct ImageHeader { /* file format */ uint32 width; uint32 height; uint32 actordir; - uint32 hotspot_num; // This field is missing in the COMI demo (version == 800) ! + uint32 flag; // This field is missing in the COMI demo (version == 800) ! struct { int32 x, y; } GCC_PACK hotspot[15]; |