[Scummvm-cvs-logs] SF.net SVN: scummvm: [21695] scummvm/trunk/engines/cine/script.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Apr 8 07:24:01 CEST 2006
Revision: 21695
Author: eriktorbjorn
Date: 2006-04-08 07:23:33 -0700 (Sat, 08 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21695&view=rev
Log Message:
-----------
Fixed two Operation Stealth regressions:
* When I introduced the getNext* helper functions I accidentally used
getNextWord() instead of getNextByte() in one case.
* When splitting the opcodes into separate functions, I noticed that Operation
Stealth has no opcode 0x40, yet it's used. So for now we only warn when
trying to execute an undefined opcode.
Modified Paths:
--------------
scummvm/trunk/engines/cine/script.cpp
Modified: scummvm/trunk/engines/cine/script.cpp
===================================================================
--- scummvm/trunk/engines/cine/script.cpp 2006-04-08 14:03:14 UTC (rev 21694)
+++ scummvm/trunk/engines/cine/script.cpp 2006-04-08 14:23:33 UTC (rev 21695)
@@ -1968,7 +1968,7 @@
}
void o2_addBackground() {
- byte param1 = getNextWord();
+ byte param1 = getNextByte();
const char *param2 = getNextString();
DEBUG_SCRIPT(_currentLine, "addBackground(%s,%d)", param2, param1);
@@ -2129,11 +2129,11 @@
//printf("Op: %X\n", opcode - 1);
- if (opcode) {
- if (opcode < _numOpcodes && _opcodeTable[opcode - 1])
+ if (opcode && opcode < _numOpcodes) {
+ if (_opcodeTable[opcode - 1])
(_opcodeTable[opcode - 1]) ();
else
- error("Unsupported opcode %X", opcode - 1);
+ warning("Undefined opcode %X", opcode - 1);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list