diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index b80f0e43924..116518c7a09 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1406,11 +1406,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip) { } void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h) { - const byte *bmap_ptr; - - warning("drawBMAPObject() called"); - - bmap_ptr = _vm->findResourceData(MKID('BMAP'), ptr); + const byte *bmap_ptr = _vm->findResourceData(MKID('BMAP'), ptr); assert(bmap_ptr); byte code = *bmap_ptr++; diff --git a/scumm/object.cpp b/scumm/object.cpp index 4a8a069e995..6c9460ae614 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -171,18 +171,14 @@ int ScummEngine::getObjectIndex(int object) const { int ScummEngine::getObjectImageCount(int object) { const byte *ptr; const ImageHeader *imhd; - int count, objnum; + int objnum; objnum = getObjectIndex(object); - if (objnum == -1) - error("getObjectImageCount: object %d not in memory", object); + assert(objnum != -1); ptr = getOBIMFromObject(_objs[objnum]); imhd = (const ImageHeader *)findResourceData(MKID('IMHD'), ptr); - - count = READ_LE_UINT32(&imhd->v8.image_count); - warning("getObjectImageCount: image count %d", count); - return count; + return (READ_LE_UINT32(&imhd->v8.image_count)); } int ScummEngine::whereIsObject(int object) const { @@ -476,7 +472,7 @@ void ScummEngine::drawObject(int obj, int arg) { if (numstrip != 0) { byte flags; - if (_version == 8) + if ((_gameId == GID_CMI) && !(_features & GF_DEMO)) flags = ((od.flag & 16) == 0) ? Gdi::dbAllowMaskOr : 0; else if (_features & GF_HUMONGOUS) flags = ((od.flag & 1) != 0) ? Gdi::dbAllowMaskOr : 0; @@ -784,7 +780,8 @@ 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 = (byte) READ_LE_UINT32(&imhd->v8.flag); + if (!(_features & GF_DEMO)) + od->flag = (byte)READ_LE_UINT32(&imhd->v8.flag); } else if (_version == 7) { od->obj_nr = READ_LE_UINT16(&(cdhd->v7.obj_id)); @@ -796,7 +793,7 @@ void ScummEngine::setupRoomObject(ObjectData *od, const byte *room, const byte * od->y_pos = READ_LE_UINT16(&imhd->v7.y_pos); od->width = READ_LE_UINT16(&imhd->v7.width); od->height = READ_LE_UINT16(&imhd->v7.height); - od->actordir = (byte) READ_LE_UINT16(&imhd->v7.actordir); + od->actordir = (byte)READ_LE_UINT16(&imhd->v7.actordir); } else if (_version == 6) { od->obj_nr = READ_LE_UINT16(&(cdhd->v6.obj_id));