aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 023ed904a9..9990c95ec2 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -1316,9 +1316,18 @@ void Scumm_v2::o2_setObjectName() {
if (obj < _numActors)
error("Can't set actor %d name with new-name-of", obj);
- name = getObjOrActorName(obj);
- if (name == NULL)
- return; // Silently abort
+ // TODO: Would be nice if we used rtObjectName resource for pre-V6
+ // games, too. The only problem with that which I can see is that this
+ // would break savegames. I.e. it would require yet another change to
+ // the save/load system.
+
+ // FIXME: This is rather nasty code.
+ // Find the object name in the OBCD resource.
+ byte *objptr;
+ objptr = getOBCDFromObject(obj);
+ if (objptr == NULL)
+ return; // Silently fail for now
+ name = objptr + *(objptr + 14);
while(name[size++])
;