[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.129,1.130
James Brown
ender at users.sourceforge.net
Thu Aug 1 15:12:06 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv20984
Modified Files:
script_v1.cpp
Log Message:
Clean that up a bit.
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- script_v1.cpp 1 Aug 2002 09:25:09 -0000 1.129
+++ script_v1.cpp 1 Aug 2002 09:27:50 -0000 1.130
@@ -2119,25 +2119,27 @@
int i = 0;
byte *name = NULL;
unsigned char work[255];
+
+ // Read in new name
+ while ((a = fetchScriptByte()) != 0) {
+ work[i++] = a;
+ if (a == 0xFF) {
+ work[i++] = fetchScriptByte();
+ work[i++] = fetchScriptByte();
+ work[i++] = fetchScriptByte();
+ }
+ }
if (obj < NUM_ACTORS)
error("Can't set actor %d name with new-name-of", 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();
- }
- }
+ // FIXME: Bug 587553. This is an odd one and looks more like
+ // an actual bug in the original script. Usually we would error
warning("Can't find OBCD to rename object %d to %s", obj, name);
return;
}
+
name = getObjOrActorName(obj);
if (_features & GF_SMALL_HEADER) {
@@ -2152,19 +2154,6 @@
size = READ_LE_UINT16(objptr) - offset;
} else {
size = getResourceDataSize(name);
- }
-
- i = 0;
-
- while ((a = fetchScriptByte()) != 0) {
- work[i++] = a;
-
- if (a == 0xFF) {
- work[i++] = fetchScriptByte();
- work[i++] = fetchScriptByte();
- work[i++] = fetchScriptByte();
- }
-
}
if (i >= size) {
More information about the Scummvm-git-logs
mailing list