diff options
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 17 | ||||
-rw-r--r-- | scumm/script_v80he.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 2 |
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), |