[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.128,1.129
James Brown
ender at users.sourceforge.net
Thu Aug 1 14:23:29 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv20349
Modified Files:
script_v1.cpp
Log Message:
#587553 hack
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- script_v1.cpp 30 Jul 2002 12:02:28 -0000 1.128
+++ script_v1.cpp 1 Aug 2002 09:25:09 -0000 1.129
@@ -2116,16 +2116,28 @@
int obj = getVarOrDirectWord(0x80);
int size;
int a;
- int i;
- byte *name;
+ int i = 0;
+ byte *name = NULL;
unsigned char work[255];
if (obj < NUM_ACTORS)
error("Can't set actor %d name with new-name-of", obj);
- if (!getOBCDFromObject(obj))
- error("Can't set name of object %d", obj);
+ if (!getOBCDFromObject(obj)) {
+ // FIXME for bug 587553. This is an odd one and looks more
+ // like an actual bug in the original script.
+ while ((a = fetchScriptByte()) != 0) {
+ work[i++] = a;
+ if (a == 0xFF) {
+ work[i++] = fetchScriptByte();
+ work[i++] = fetchScriptByte();
+ work[i++] = fetchScriptByte();
+ }
+ }
+ warning("Can't find OBCD to rename object %d to %s", obj, name);
+ return;
+ }
name = getObjOrActorName(obj);
if (_features & GF_SMALL_HEADER) {
More information about the Scummvm-git-logs
mailing list