diff options
author | Max Horn | 2003-01-13 16:00:19 +0000 |
---|---|---|
committer | Max Horn | 2003-01-13 16:00:19 +0000 |
commit | 62780b34d7448373631afb3d8c81c86d4919c1aa (patch) | |
tree | afb5f2ea2810cbd68712c0244b0b27054cc0cd36 | |
parent | d900d280c08bb5932c66ba1b9d481587e4a797fe (diff) | |
download | scummvm-rg350-62780b34d7448373631afb3d8c81c86d4919c1aa.tar.gz scummvm-rg350-62780b34d7448373631afb3d8c81c86d4919c1aa.tar.bz2 scummvm-rg350-62780b34d7448373631afb3d8c81c86d4919c1aa.zip |
clear object table for small header games, too
svn-id: r6448
-rw-r--r-- | scumm/object.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index fd95c2c062..0c7615858d 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -437,9 +437,8 @@ void Scumm::loadRoomObjects() continue; // Nuke all non-flObjects (flObjects are nuked in script.cpp) - if (!_objs[i].fl_object_index) { + if (_objs[i].fl_object_index == 0) { _objs[i].obj_nr = 0; - _objs[i].fl_object_index = 0; } else { // Nuke all unlocked flObjects if (!(res.flags[rtFlObject][_objs[i].fl_object_index] & RF_LOCK)) { @@ -462,7 +461,6 @@ void Scumm::loadRoomObjects() searchptr = rootptr = room; assert(searchptr); - // Load in new room objects for (i = 0; i < _numObjectsInRoom; i++) { od = &_objs[findLocalObjectSlot()]; @@ -545,6 +543,11 @@ void Scumm::loadRoomObjectsSmall() if (_numObjectsInRoom > _numLocalObjects) error("More than %d objects in room %d", _numLocalObjects, _roomResource); + // Clear out old room objects + for (i = 0; i < _numLocalObjects; i++) { + _objs[i].obj_nr = 0; + } + searchptr = room; for (i = 0; i < _numObjectsInRoom; i++) { od = &_objs[findLocalObjectSlot()]; @@ -555,7 +558,6 @@ void Scumm::loadRoomObjectsSmall() od->OBCDoffset = ptr - room; od->obj_nr = READ_LE_UINT16(ptr + 6); - if (_dumpScripts) { char buf[32]; sprintf(buf, "roomobj-%d-", _roomResource); |