aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorsluicebox2019-12-31 13:07:50 -0800
committersluicebox2019-12-31 13:07:50 -0800
commite1d8f86a19a17586f10ebd6832328f68d6e7e2d3 (patch)
tree4162d56186557f704cb18149ed51942470547db5 /engines/sci
parent4d9ec631f122721ee0a4533461c9042b1dc6c11e (diff)
downloadscummvm-rg350-e1d8f86a19a17586f10ebd6832328f68d6e7e2d3.tar.gz
scummvm-rg350-e1d8f86a19a17586f10ebd6832328f68d6e7e2d3.tar.bz2
scummvm-rg350-e1d8f86a19a17586f10ebd6832328f68d6e7e2d3.zip
SCI32: Fix GK2 Holy water lockup
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script_patches.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 24c9378bd3..4d71e9704a 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3557,6 +3557,31 @@ static const uint16 gk2XaverBlackWolfkPatch[] = {
PATCH_END
};
+// In early versions of GK2, clicking on the holy water basket after using the
+// holy water locks up the game. The script is supposed to test the flag that's
+// set when getting the water but some code mistakenly tests inventory instead.
+// We fix this as Sierra did by replacing the inventory tests with flag tests.
+//
+// Applies to: English PC 1.0, Mac
+// Responsible methods: waterBakset:handleEvent, waterBasket:doVerb
+static const uint16 gk2HolyWaterLockupSignature[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(has), // pushi has
+ 0x78, // push1
+ 0x39, 0x3e, // pushi 3e
+ 0x81, 0x00, // lag 00
+ 0x4a, SIG_UINT16(0x0006), // send 06 [ GraceEgo has: 62 (invBottleOfWater) ]
+ SIG_END
+};
+
+static const uint16 gk2HolyWaterLockupPatch[] = {
+ 0x38, PATCH_UINT16(0x0001), // pushi 0001
+ 0x38, PATCH_UINT16(0x0476), // pushi 0476
+ 0x47, 0x0b, 0x00, // calle proc11_0 [ is flag 1142 set? ]
+ PATCH_UINT16(0x0002),
+ PATCH_END
+};
+
// Clicking an inventory item on the Wagner paintings in rooms 8616 and 8617
// causes a missing message error. The paintings only have responses for the
// "Do" verb but painting:doVerb passes the incoming verb to gk2Messager:say
@@ -3589,6 +3614,7 @@ static const SciScriptPatcherEntry gk2Signatures[] = {
{ true, 37, "fix sound manager lockup", 1, gk2SoundManagerLockupSignature1, gk2SoundManagerLockupPatch1 },
{ true, 37, "fix sound manager lockup (no line numbers)", 1, gk2SoundManagerLockupSignature2, gk2SoundManagerLockupPatch2 },
{ true, 810, "fix frau miller lockup", 1, gk2FrauMillerLockupSignature, gk2FrauMillerLockupPatch },
+ { true, 1020, "fix holy water lockup", 2, gk2HolyWaterLockupSignature, gk2HolyWaterLockupPatch },
{ true, 3210, "fix police station deadend", 1, gk2PoliceStationDeadendSignature, gk2PoliceStationDeadendPatch },
{ true, 4320, "fix xaver black wolf topic", 1, gk2XaverBlackWolfSignature, gk2XaverBlackWolfkPatch },
{ true, 8616, "fix wagner painting message", 2, gk2WagnerPaintingMessageSignature, gk2WagnerPaintingMessagePatch },