aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorColin Snover2017-07-26 22:00:38 -0500
committerColin Snover2017-07-26 22:02:37 -0500
commitdc597dc7a87d3d053b67cfbaf93a4855d472ddda (patch)
treedc7d3665dbf951995adb1c5f6e04f85945d136f2 /engines/sci/engine
parent8adb91038ff3e086608c759576b3a40dba09677c (diff)
downloadscummvm-rg350-dc597dc7a87d3d053b67cfbaf93a4855d472ddda.tar.gz
scummvm-rg350-dc597dc7a87d3d053b67cfbaf93a4855d472ddda.tar.bz2
scummvm-rg350-dc597dc7a87d3d053b67cfbaf93a4855d472ddda.zip
SCI32: Patch spin loop in Phant2 puzzle
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/script_patches.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 873002403a..2f382f4e01 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3781,10 +3781,35 @@ static const uint16 phant2GetVersionPatch[] = {
PATCH_END
};
+// The game uses a spin loop when displaying the success animation of the ratboy
+// puzzle, which causes the mouse to appear unresponsive. Replace the spin loop
+// with a call to ScummVM kWait.
+// Applies to at least: US English
+static const uint16 phant2RatboySignature[] = {
+ 0x8d, 0x01, // lst 1
+ 0x35, 0x1e, // ldi $1e
+ 0x22, // lt?
+ SIG_MAGICDWORD,
+ 0x31, 0x17, // bnt $17 [0c3d]
+ 0x76, // push0
+ 0x43, 0x79, SIG_UINT16(0x00), // callk GetTime, 0
+ SIG_END
+};
+
+static const uint16 phant2RatboyPatch[] = {
+ 0x78, // push1
+ 0x35, 0x1e, // ldi $1e
+ 0x36, // push
+ 0x43, kScummVMWaitId, PATCH_UINT16(0x02), // callk Wait, $2
+ 0x33, 0x14, // jmp [to next outer loop]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry phantasmagoria2Signatures[] = {
{ true, 0, "slow interface fades", 3, phant2SlowIFadeSignature, phant2SlowIFadePatch },
{ true, 0, "bad arguments to get game version", 1, phant2GetVersionSignature, phant2GetVersionPatch },
+ { true, 4081, "non-responsive mouse after ratboy puzzle", 1, phant2RatboySignature, phant2RatboyPatch },
{ true, 63016, "non-responsive mouse during music fades", 1, phant2Wait4FadeSignature, phant2Wait4FadePatch },
{ true, 63019, "non-responsive mouse during computer load", 1, phant2CompSlideDoorsSignature, phant2CompSlideDoorsPatch },
SCI_SIGNATUREENTRY_TERMINATOR