diff options
author | Filippos Karapetis | 2010-07-26 05:40:58 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-26 05:40:58 +0000 |
commit | b28b290c7086b1d16df3403b727bc9686d006f13 (patch) | |
tree | 2145c43e5a06aa9e0801c6136862d60641ea73bc | |
parent | fed9541f475f4781dca28fa1d4cc94b36402dc62 (diff) | |
download | scummvm-rg350-b28b290c7086b1d16df3403b727bc9686d006f13.tar.gz scummvm-rg350-b28b290c7086b1d16df3403b727bc9686d006f13.tar.bz2 scummvm-rg350-b28b290c7086b1d16df3403b727bc9686d006f13.zip |
SCI: Fixed bug #3034464, "ECOQUEST2: Crash near beginning"
svn-id: r51293
-rw-r--r-- | engines/sci/engine/vm.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 099fabff16..d672f9b10f 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -1101,7 +1101,7 @@ void run_vm(EngineState *s) { if (validate_unsignedInteger(r_temp, value1) && validate_unsignedInteger(s->r_acc, value2)) s->r_acc = make_reg(0, value1 | value2); else - s->r_acc = arithmetic_lookForWorkaround(opcode, NULL, r_temp, s->r_acc); + s->r_acc = arithmetic_lookForWorkaround(opcode, opcodeOrWorkarounds, r_temp, s->r_acc); break; } diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index e002fcf03f..6d74adde53 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -38,6 +38,12 @@ const SciWorkaroundEntry opcodeDivWorkarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry opcodeOrWorkarounds[] = { + { GID_ECOQUEST2, 100, 0, 0, "Rain", "points", 0xcc6, 0, { WORKAROUND_FAKE, 0 } }, // when giving the papers to the customs officer, gets called against a pointer instead of a number + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, call, index, workaround const SciWorkaroundEntry opcodeDptoaWorkarounds[] = { { GID_LSL6, 360, 938, 0, "ROsc", "cycleDone", -1, 0, { WORKAROUND_FAKE, 1 } }, // when looking through tile in the shower room initial cycles get set to an object instead of 2, we fix this by setting 1 after decrease diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 11d3824c83..4e941a0b15 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -69,6 +69,7 @@ struct SciWorkaroundEntry { }; extern const SciWorkaroundEntry opcodeDivWorkarounds[]; +extern const SciWorkaroundEntry opcodeOrWorkarounds[]; extern const SciWorkaroundEntry opcodeDptoaWorkarounds[]; extern const SciWorkaroundEntry uninitializedReadWorkarounds[]; extern const SciWorkaroundEntry kAbs_workarounds[]; |