From 6a7bb77305dc280e6af2afb4beb5cc06ca6350b8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 20 Apr 2009 12:35:17 +0000 Subject: SCUMM: Introduced new method ScummEngine_v5::jumpRelative; unified some v0 and v2 opcodes svn-id: r40025 --- engines/scumm/script_v4.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'engines/scumm/script_v4.cpp') diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp index b8964c4194..a8702a5d79 100644 --- a/engines/scumm/script_v4.cpp +++ b/engines/scumm/script_v4.cpp @@ -66,20 +66,14 @@ void ScummEngine_v4::o4_ifState() { int a = getVarOrDirectWord(PARAM_1); int b = getVarOrDirectByte(PARAM_2); - if (getState(a) != b) - o5_jumpRelative(); - else - ignoreScriptWord(); + jumpRelative(getState(a) == b); } void ScummEngine_v4::o4_ifNotState() { int a = getVarOrDirectWord(PARAM_1); int b = getVarOrDirectByte(PARAM_2); - if (getState(a) == b) - o5_jumpRelative(); - else - ignoreScriptWord(); + jumpRelative(getState(a) != b); } void ScummEngine_v4::o4_pickupObject() { -- cgit v1.2.3