aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/script_v4.cpp')
-rw-r--r--engines/scumm/script_v4.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 5691f6707c..08df1e4653 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -45,6 +45,35 @@ void ScummEngine_v4::setupOpcodes() {
OPCODE(0x5c, o4_oldRoomEffect);
OPCODE(0xdc, o4_oldRoomEffect);
+
+ OPCODE(0x0f, o4_ifState);
+ OPCODE(0x2f, o4_ifNotState);
+ OPCODE(0x4f, o4_ifState);
+ OPCODE(0x6f, o4_ifNotState);
+ OPCODE(0x8f, o4_ifState);
+ OPCODE(0xaf, o4_ifNotState);
+ OPCODE(0xcf, o4_ifState);
+ OPCODE(0xef, o4_ifNotState);
+}
+
+void ScummEngine_v4::o4_ifState() {
+ int a = getVarOrDirectWord(PARAM_1);
+ int b = getVarOrDirectByte(PARAM_2);
+
+ if (getState(a) != b)
+ o5_jumpRelative();
+ else
+ ignoreScriptWord();
+}
+
+void ScummEngine_v4::o4_ifNotState() {
+ int a = getVarOrDirectWord(PARAM_1);
+ int b = getVarOrDirectByte(PARAM_2);
+
+ if (getState(a) == b)
+ o5_jumpRelative();
+ else
+ ignoreScriptWord();
}
void ScummEngine_v4::o4_pickupObject() {