From 10536e285c02de27fe3cdb703bebc461be9277c5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 13 Jul 2011 12:33:51 +0100 Subject: 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. --- engines/scumm/script_v4.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines/scumm/script_v4.cpp') 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); } -- cgit v1.2.3