aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-09-17 11:20:37 +0000
committerTravis Howell2004-09-17 11:20:37 +0000
commit48fb2878871488c5c4bfc3e674e68873e1c5a2a6 (patch)
tree2110da6c2be23571c9213f241d58535ceac4a2dd
parent5e7e609d19d12fc4a5f9a466b9365ec5a55e7a71 (diff)
downloadscummvm-rg350-48fb2878871488c5c4bfc3e674e68873e1c5a2a6.tar.gz
scummvm-rg350-48fb2878871488c5c4bfc3e674e68873e1c5a2a6.tar.bz2
scummvm-rg350-48fb2878871488c5c4bfc3e674e68873e1c5a2a6.zip
Correct and rename opcode
svn-id: r15147
-rw-r--r--scumm/intern.h2
-rw-r--r--scumm/script_v72he.cpp17
-rw-r--r--scumm/script_v80he.cpp2
-rw-r--r--scumm/script_v90he.cpp2
4 files changed, 11 insertions, 12 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 1b19675e54..bae5db51c3 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -721,7 +721,7 @@ protected:
void o72_wordArrayIndexedRead();
void o72_wordArrayWrite();
void o72_wordArrayIndexedWrite();
- void o72_compareStackList();
+ void o72_isAnyOf();
void o72_unknown50();
void o72_findObjectWithClassOf();
void o72_wordArrayInc();
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 23ed33dbf0..5d939d03fd 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -78,7 +78,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_land),
OPCODE(o6_lor),
OPCODE(o6_pop),
- OPCODE(o72_compareStackList),
+ OPCODE(o72_isAnyOf),
/* 1C */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@@ -664,18 +664,17 @@ void ScummEngine_v72he::o72_wordArrayIndexedRead() {
push(readArray(fetchScriptWord(), idx, base));
}
-void ScummEngine_v72he::o72_compareStackList() {
- int args[128], i;
+void ScummEngine_v72he::o72_isAnyOf() {
+ int args[128], i = 0;
int num = getStackList(args, ARRAYSIZE(args));
int value = pop();
- if (num) {
- for (i = 1; i < num; i++) {
- if (args[i] == value) {
- push(1);
- return;
- }
+ while (i < num) {
+ if (args[i] == value) {
+ push(1);
+ return;
}
+ i++;
}
push(0);
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index b1cb185bed..beefe9ae5d 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -78,7 +78,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_land),
OPCODE(o6_lor),
OPCODE(o6_pop),
- OPCODE(o72_compareStackList),
+ OPCODE(o72_isAnyOf),
/* 1C */
OPCODE(o6_invalid),
OPCODE(o6_invalid),
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 68fb511b0d..b461f0a0f3 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -78,7 +78,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_land),
OPCODE(o6_lor),
OPCODE(o6_pop),
- OPCODE(o72_compareStackList),
+ OPCODE(o72_isAnyOf),
/* 1C */
OPCODE(o90_unknown1C),
OPCODE(o90_getLT),