aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/object.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 3a7aadeb5d..a86c9e51b6 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -397,7 +397,7 @@ void Scumm::loadRoomObjects()
ObjectData *od;
byte *ptr;
uint16 obim_id;
- byte *room, *searchptr;
+ byte *room, *searchptr, *rootptr;
ImageHeader *imhd;
RoomHeader *roomhdr;
CodeHeader *cdhd;
@@ -421,16 +421,16 @@ void Scumm::loadRoomObjects()
od = &_objs[1];
if (_features & GF_AFTER_V8)
- searchptr = getResourceAddress(rtRoomScripts, _roomResource);
+ searchptr = rootptr = getResourceAddress(rtRoomScripts, _roomResource);
else
- searchptr = room;
+ searchptr = rootptr = room;
for (i = 0; i < _numObjectsInRoom; i++, od++) {
ptr = findResource(MKID('OBCD'), searchptr);
if (ptr == NULL)
error("Room %d missing object code block(s)", _roomResource);
- od->offs_obcd_to_room = ptr - searchptr;
+ od->offs_obcd_to_room = ptr - rootptr;
cdhd = (CodeHeader *)findResourceData(MKID('CDHD'), ptr);
if (_features & GF_AFTER_V7)