diff options
author | Travis Howell | 2004-09-26 08:50:10 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-26 08:50:10 +0000 |
commit | db5e3079017aa4c1422bed427db1174ae93ea594 (patch) | |
tree | 60c5f825d930c3a1b2d513e15a3f3c16d36d948c | |
parent | cc7ca9ce4bb071a6d220b945b08a971249e6e892 (diff) | |
download | scummvm-rg350-db5e3079017aa4c1422bed427db1174ae93ea594.tar.gz scummvm-rg350-db5e3079017aa4c1422bed427db1174ae93ea594.tar.bz2 scummvm-rg350-db5e3079017aa4c1422bed427db1174ae93ea594.zip |
COMI reads object flag from headers, it doesn't use useOrDecompress at all.
svn-id: r15285
-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]; |