aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/script_v4.cpp12
-rw-r--r--engines/scumm/script_v5.cpp14
2 files changed, 26 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);
}
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index a6cf504586..02c8d977a5 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2095,6 +2095,20 @@ void ScummEngine_v5::o5_startScript() {
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
return;
+ // WORKAROUND bug #3306145 (also occurs in original): Some old versions of
+ // Indy3 sometimes fail to allocate IQ points correctly. To quote:
+ // "In the Amiga version you get the 15 points for puzzle 30 if you give the
+ // book or KO the guy. The PC version correctly gives 10 points for puzzle
+ // 29 for KO and 15 for puzzle 30 when giving the book."
+ // This workaround is meant to address that.
+ if (_game.id == GID_INDY3 && vm.slot[_currentScript].number == 106 && script == 125 && VAR(115) != 2) {
+ // If Var[115] != 2, then:
+ // Correct: startScript(125,[29,10]);
+ // Wrong : startScript(125,[30,15]);
+ data[0] = 29;
+ data[1] = 10;
+ }
+
// Method used by original games to skip copy protection scheme
if (!_copyProtection) {
// Copy protection was disabled in LucasArts Classic Adventures (PC Disk)