aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-08 14:23:33 +0000
committerTorbjörn Andersson2006-04-08 14:23:33 +0000
commit37d1248bd0b0fe603d514ad012d8f17c5c804e70 (patch)
treec21266da2577507da2642e94e14a29017763e6fd /engines/cine
parenta81964c3c22e7d8725a882783a104ed1f51c28c2 (diff)
downloadscummvm-rg350-37d1248bd0b0fe603d514ad012d8f17c5c804e70.tar.gz
scummvm-rg350-37d1248bd0b0fe603d514ad012d8f17c5c804e70.tar.bz2
scummvm-rg350-37d1248bd0b0fe603d514ad012d8f17c5c804e70.zip
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. svn-id: r21695
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/script.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/cine/script.cpp b/engines/cine/script.cpp
index 58deb66a2d..5938f79319 100644
--- a/engines/cine/script.cpp
+++ b/engines/cine/script.cpp
@@ -1968,7 +1968,7 @@ void o2_op8D() {
}
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 @@ void executeScript(prcLinkedListStruct *scriptElement, uint16 params) {
//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);
}
}
}