aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-04-28 18:19:48 +0000
committerPaweł Kołodziejski2003-04-28 18:19:48 +0000
commit850ee739afcb2a15d016d78b782fd073bf5b75ca (patch)
tree589e73fcdd9b07673caee88c0892b8fb840a9ce5 /scumm
parent12c44ba73d8a3317c47aed7ae172fca6766feab8 (diff)
downloadscummvm-rg350-850ee739afcb2a15d016d78b782fd073bf5b75ca.tar.gz
scummvm-rg350-850ee739afcb2a15d016d78b782fd073bf5b75ca.tar.bz2
scummvm-rg350-850ee739afcb2a15d016d78b782fd073bf5b75ca.zip
fixed two offsets for V2 and two warnings
svn-id: r7185
Diffstat (limited to 'scumm')
-rw-r--r--scumm/object.cpp12
-rw-r--r--scumm/scummvm.cpp2
2 files changed, 11 insertions, 3 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index f6e43d514e..e1aa5f0976 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -538,7 +538,11 @@ void Scumm::loadRoomObjectsOldBundle() {
if (_numObjectsInRoom > _numLocalObjects)
error("More than %d objects in room %d", _numLocalObjects, _roomResource);
- ptr = room + 29;
+ if (_features & GF_AFTER_V2)
+ ptr = room + 28;
+ else
+ ptr = room + 29;
+
for (i = 0; i < _numObjectsInRoom; i++) {
od = &_objs[findLocalObjectSlot()];
@@ -980,7 +984,11 @@ void Scumm::findObjectInRoom(FindObjectInRoom *fo, byte findWhat, uint id, uint
error("findObjectInRoom: More (%d) than %d objects in room %d", numobj, _numLocalObjects, room);
if (_features & GF_OLD_BUNDLE) {
- searchptr = roomptr + 29;
+ if (_features & GF_AFTER_V2)
+ searchptr = roomptr + 28;
+ else
+ searchptr = roomptr + 29;
+
for (i = 0; i < numobj; i++) {
obimptr = roomptr + READ_LE_UINT16(searchptr);
obcdptr = roomptr + READ_LE_UINT16(searchptr + 2 * _numObjectsInRoom);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index e14ab5c4dd..447f88642c 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1096,7 +1096,7 @@ void Scumm::initRoomSubBlocks() {
// HACK: to determine the sizes of the local scripts, we assume that
// a) their order in the data file is the same as in the index
// b) the last script at the same time is the last item in the room "header"
- int len = - _localScriptList[id - _numGlobalScripts] + _resourceHeaderSize;
+ int len = - (int)_localScriptList[id - _numGlobalScripts] + _resourceHeaderSize;
if (*ptr)
len += READ_LE_UINT16(ptr + 1);
else