aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/object.cpp7
-rw-r--r--scumm/script_v5.cpp7
2 files changed, 4 insertions, 10 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index cb23185a69..f8f4c8fa39 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -926,17 +926,14 @@ const byte *Scumm::getObjOrActorName(int obj) {
return NULL;
if (_features & GF_SMALL_HEADER) {
- int offset = 0;
+ byte offset = 0;
if (_version <= 2)
offset = *(objptr + 14);
else if (_features & GF_OLD_BUNDLE)
offset = *(objptr + 16);
- else if (_version == 3)
- offset = *(objptr + 18);
else
- // FIXME: is this really correct?
- offset = READ_LE_UINT16(objptr + 18);
+ offset = *(objptr + 18);
return (objptr + offset);
}
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 3407ab890b..bfb803d223 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1917,15 +1917,12 @@ void Scumm_v5::o5_setObjectName() {
}
if (_features & GF_SMALL_HEADER) {
- int offset = 0;
+ byte offset = 0;
if (_features & GF_OLD_BUNDLE)
offset = *(objptr + 16);
- else if (_version == 3)
- offset = *(objptr + 18);
else
- // FIXME: is this really correct?
- offset = READ_LE_UINT16(objptr + 18);
+ offset = *(objptr + 18);
size = READ_LE_UINT16(objptr) - offset;
name = objptr + offset;