diff options
author | Travis Howell | 2004-09-26 15:25:58 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-26 15:25:58 +0000 |
commit | 28727812319185ac39d951176c6e63bed8b68f21 (patch) | |
tree | 0f71bcdf40c2859afbb6b731b4b6a807773a4207 /scumm | |
parent | dfad37c10b68b909f11452976a2f42237d322cea (diff) | |
download | scummvm-rg350-28727812319185ac39d951176c6e63bed8b68f21.tar.gz scummvm-rg350-28727812319185ac39d951176c6e63bed8b68f21.tar.bz2 scummvm-rg350-28727812319185ac39d951176c6e63bed8b68f21.zip |
Add HE object flag support
svn-id: r15292
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 8 | ||||
-rw-r--r-- | scumm/object.h | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index c0aa01b186..fcadfb88e1 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -479,8 +479,7 @@ void ScummEngine::drawObject(int obj, int arg) { if (_version == 8) flags = (od.flag & 16) == 0; else if (_features & GF_HUMONGOUS) - // TODO: Should be read from object header - flags = 0; + flags = (od.flag & 1) != 0; else flags = Gdi::dbAllowMaskOr; @@ -771,6 +770,7 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * cdhd = (const CodeHeader *)findResourceData(MKID('CDHD'), searchptr + od->OBCDoffset); if (cdhd == NULL) error("Room %d missing CDHD blocks(s)", _roomResource); + imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), room + od->OBIMoffset); if (_version == 8) { od->obj_nr = READ_LE_UINT16(&(cdhd->v7.obj_id)); @@ -778,7 +778,6 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * od->parent = cdhd->v7.parent; od->parentstate = cdhd->v7.parentstate; - imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), room + od->OBIMoffset); od->x_pos = (int)READ_LE_UINT32(&imhd->v8.x_pos); od->y_pos = (int)READ_LE_UINT32(&imhd->v8.y_pos); od->width = (uint)READ_LE_UINT32(&imhd->v8.width); @@ -793,7 +792,6 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * od->parent = cdhd->v7.parent; od->parentstate = cdhd->v7.parentstate; - imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), room + od->OBIMoffset); od->x_pos = READ_LE_UINT16(&imhd->v7.x_pos); od->y_pos = READ_LE_UINT16(&imhd->v7.y_pos); od->width = READ_LE_UINT16(&imhd->v7.width); @@ -814,6 +812,8 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * } od->parent = cdhd->v6.parent; od->actordir = cdhd->v6.actordir; + od->flag = imhd->old.flag; + } else { od->obj_nr = READ_LE_UINT16(&(cdhd->v5.obj_id)); diff --git a/scumm/object.h b/scumm/object.h index 11b8bd89ed..62b5bd8c77 100644 --- a/scumm/object.h +++ b/scumm/object.h @@ -104,7 +104,10 @@ struct ImageHeader { /* file format */ struct { uint16 obj_id; uint16 image_count; - uint16 unk[4]; + uint16 unk[1]; + byte flag; + byte unk1; + uint16 unk2[2]; uint16 width; uint16 height; uint16 hotspot_num; |