aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v4.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2011-07-13 12:33:51 +0100
committerEugene Sandulenko2011-07-13 12:33:51 +0100
commit10536e285c02de27fe3cdb703bebc461be9277c5 (patch)
tree4961314e857fe8add344187d3b25159e2ee1f1c5 /engines/scumm/script_v4.cpp
parent648d127ccabd36d6a116715cf548fd32840a9a26 (diff)
downloadscummvm-rg350-10536e285c02de27fe3cdb703bebc461be9277c5.tar.gz
scummvm-rg350-10536e285c02de27fe3cdb703bebc461be9277c5.tar.bz2
scummvm-rg350-10536e285c02de27fe3cdb703bebc461be9277c5.zip
SCUMM: Fix bug #3306145: INDY3: EGA version script bugs
Based on a patch presented in the bugreport. Fixes several bugs connected with calcualting IQ points in Amiga versions of Indy3.
Diffstat (limited to 'engines/scumm/script_v4.cpp')
-rw-r--r--engines/scumm/script_v4.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 1302c8c28d..8340f62dbc 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -68,6 +68,18 @@ void ScummEngine_v4::o4_ifState() {
int a = getVarOrDirectWord(PARAM_1);
int b = getVarOrDirectByte(PARAM_2);
+ // WORKAROUND bug #3306145 (also occurs in original): Some old versions of
+ // Indy3 sometimes fail to allocate IQ points correctly. To quote:
+ // "About the points error leaving Castle Brunwald: It seems to "reversed"!
+ // When you get caught, free yourself and escape, you get 25 IQ points even
+ // though you're not supposed to. However if you escape WITHOUT getting
+ // caught, you get 0 IQ points (supposed to get 25 IQ points)."
+ // This workaround is meant to address that.
+ if (_game.id == GID_INDY3 && a == 367 &&
+ vm.slot[_currentScript].number == 363 && _currentRoom == 25) {
+ b = 0;
+ }
+
jumpRelative(getState(a) == b);
}