aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-08-19 15:58:39 +0000
committerFilippos Karapetis2010-08-19 15:58:39 +0000
commit780dacf48d7c0a4912036762bfa5ffc93bbe2429 (patch)
tree4674554e59601e5b996df9dc896a077d77c4e1f1
parentc427ecb7ccdd88b02712eb2f357d44fb999236df (diff)
downloadscummvm-rg350-780dacf48d7c0a4912036762bfa5ffc93bbe2429.tar.gz
scummvm-rg350-780dacf48d7c0a4912036762bfa5ffc93bbe2429.tar.bz2
scummvm-rg350-780dacf48d7c0a4912036762bfa5ffc93bbe2429.zip
SCI: Fixed one of the bugs in hoyle3, from bug report #3038837 - "HOYLE3: EGA/VGA Crashes" (that report includes more issues)
svn-id: r52213
-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 0500cc601b..b46e5ab37e 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1319,7 +1319,7 @@ void run_vm(EngineState *s) {
if (validate_unsignedInteger(r_temp, compare1) && validate_unsignedInteger(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, opcodeUltWorkarounds, r_temp, s->r_acc);
}
break;
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 2611d36e41..9bc2235e33 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -60,6 +60,12 @@ const SciWorkaroundEntry opcodeLeWorkarounds[] = {
};
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
+const SciWorkaroundEntry opcodeUltWorkarounds[] = {
+ { GID_HOYLE3, 400, 0, 1, "Character", "say", -1, 0, { WORKAROUND_FAKE, 0 } }, // While playing Pachisi, when any character starts to talk - bug #3038837
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry opcodeLaiWorkarounds[] = {
{ GID_CAMELOT, 92, 92, 0, "endingCartoon2", "changeState", 0x20d, 0, { WORKAROUND_FAKE, 0 } }, // during the ending, sub gets called with no parameters, uses parameter 1 which is theGrail in this case - bug #3044734
SCI_WORKAROUNDENTRY_TERMINATOR
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index f7fbc2269a..bf1ac3a445 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -72,6 +72,7 @@ extern const SciWorkaroundEntry opcodeDivWorkarounds[];
extern const SciWorkaroundEntry opcodeDptoaWorkarounds[];
extern const SciWorkaroundEntry opcodeGeWorkarounds[];
extern const SciWorkaroundEntry opcodeLeWorkarounds[];
+extern const SciWorkaroundEntry opcodeUltWorkarounds[];
extern const SciWorkaroundEntry opcodeLaiWorkarounds[];
extern const SciWorkaroundEntry opcodeLsiWorkarounds[];
extern const SciWorkaroundEntry opcodeMulWorkarounds[];