aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-05 09:25:07 +0000
committerMax Horn2003-05-05 09:25:07 +0000
commitac0897515db5de4077031e9f385f0ece6c0fe202 (patch)
tree2a006e585b7e19ef324907ca3c4e43d20db15a94
parentfa0df19a1df16489b7319bfd27711409c15fa699 (diff)
downloadscummvm-rg350-ac0897515db5de4077031e9f385f0ece6c0fe202.tar.gz
scummvm-rg350-ac0897515db5de4077031e9f385f0ece6c0fe202.tar.bz2
scummvm-rg350-ac0897515db5de4077031e9f385f0ece6c0fe202.zip
unified o?_isEqual, too (but not as nice due to hack)
svn-id: r7340
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v2.cpp15
-rw-r--r--scumm/script_v5.cpp5
3 files changed, 6 insertions, 15 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 59145b7472..ce43e1a56b 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -248,7 +248,6 @@ protected:
void o2_ifClassOfIs();
void o2_walkActorTo();
void o2_putActor();
- void o2_isEqual();
void o2_startScript();
void o2_panCameraTo();
void o2_setActorElevation();
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index ee70356a0d..3f74a8d6fa 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -123,7 +123,7 @@ void Scumm_v2::setupOpcodes() {
OPCODE(o5_increment),
OPCODE(o2_setState08),
/* 48 */
- OPCODE(o2_isEqual),
+ OPCODE(o5_isEqual),
OPCODE(o5_faceActor),
OPCODE(o2_chainScript),
OPCODE(o2_setObjY),
@@ -283,7 +283,7 @@ void Scumm_v2::setupOpcodes() {
OPCODE(o5_decrement),
OPCODE(o2_clearState08),
/* C8 */
- OPCODE(o2_isEqual),
+ OPCODE(o5_isEqual),
OPCODE(o5_faceActor),
OPCODE(o2_chainScript),
OPCODE(o2_setObjY),
@@ -775,17 +775,6 @@ void Scumm_v2::o2_verbOps() {
}
}
-void Scumm_v2::o2_isEqual() {
- int a = getVar();
- int b = getVarOrDirectWord(0x80);
-
- if (b == a)
- ignoreScriptWord();
- else
- o5_jumpRelative();
-
-}
-
void Scumm_v2::o2_doSentence() {
int a;
SentenceTab *st;
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index ed69b94606..483885addb 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1212,7 +1212,10 @@ void Scumm_v5::o5_isEqual() {
int16 a, b;
int var;
- var = fetchScriptWord();
+ if (_features & GF_AFTER_V2)
+ var = fetchScriptByte();
+ else
+ var = fetchScriptWord();
a = readVar(var);
b = getVarOrDirectWord(0x80);