aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-08-07 01:09:32 +0000
committerFilippos Karapetis2010-08-07 01:09:32 +0000
commitab79d581531355f76f90ce0668e012ffbfa201f5 (patch)
tree86d17d40a01eeaba9b01699751283ea433e125c0 /engines
parent0cb8e130d891cfe2418e2792c490f73544cb6689 (diff)
downloadscummvm-rg350-ab79d581531355f76f90ce0668e012ffbfa201f5.tar.gz
scummvm-rg350-ab79d581531355f76f90ce0668e012ffbfa201f5.tar.bz2
scummvm-rg350-ab79d581531355f76f90ce0668e012ffbfa201f5.zip
SCI: Fixed script bug #3040142 - "PEPPER: Crash on Pugh's office"
svn-id: r51821
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp2
-rw-r--r--engines/sci/engine/workarounds.cpp6
-rw-r--r--engines/sci/engine/workarounds.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index dbf9c2b17e..fe4eb15763 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1248,7 +1248,7 @@ void run_vm(EngineState *s) {
if (validate_signedInteger(r_temp, compare1) && validate_signedInteger(s->r_acc, compare2))
s->r_acc = make_reg(0, compare1 <= compare2);
else
- s->r_acc = arithmetic_lookForWorkaround(opcode, NULL, r_temp, s->r_acc);
+ s->r_acc = arithmetic_lookForWorkaround(opcode, opcodeLeWorkarounds, r_temp, s->r_acc);
}
break;
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 4c6ddc18df..b7bb306edf 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -53,6 +53,12 @@ const SciWorkaroundEntry opcodeGeWorkarounds[] = {
};
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
+const SciWorkaroundEntry opcodeLeWorkarounds[] = {
+ { GID_PEPPER, 370, 23, 0, "eastExitFeature", "onMe", -1, 0, { WORKAROUND_FAKE, 1 } }, // Pugh's office, when trying to use either the left or right exits, gets called on an integer and a pointer - bug #3040142
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry opcodeLsiWorkarounds[] = {
{ GID_QFG2, 200, 200, 0, "astro", "messages", -1, 0, { WORKAROUND_FAKE, 0 } }, // when getting asked for your name by the astrologer bug #3039879
SCI_WORKAROUNDENTRY_TERMINATOR
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index 1b3bafd6cc..220ffd7fda 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -71,6 +71,7 @@ struct SciWorkaroundEntry {
extern const SciWorkaroundEntry opcodeDivWorkarounds[];
extern const SciWorkaroundEntry opcodeDptoaWorkarounds[];
extern const SciWorkaroundEntry opcodeGeWorkarounds[];
+extern const SciWorkaroundEntry opcodeLeWorkarounds[];
extern const SciWorkaroundEntry opcodeLsiWorkarounds[];
extern const SciWorkaroundEntry opcodeMulWorkarounds[];
extern const SciWorkaroundEntry opcodeAndWorkarounds[];