aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorsluicebox2019-12-28 14:47:28 -0800
committersluicebox2019-12-28 14:47:49 -0800
commit6ab1d6ac7b0a60294f9a41953ccbf956280526cb (patch)
tree100bad3d9aba715ff0c5fccd708a8c28f3ca9923 /engines/sci
parentff855fe99cb6fed2a1ecc402baee12c94eef0532 (diff)
downloadscummvm-rg350-6ab1d6ac7b0a60294f9a41953ccbf956280526cb.tar.gz
scummvm-rg350-6ab1d6ac7b0a60294f9a41953ccbf956280526cb.tar.bz2
scummvm-rg350-6ab1d6ac7b0a60294f9a41953ccbf956280526cb.zip
SCI32: Fix GK2 broken messages
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/script_patches.cpp24
-rw-r--r--engines/sci/engine/workarounds.cpp4
2 files changed, 28 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 2bedc08c8d..5baade9ff4 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3388,11 +3388,35 @@ static const uint16 gk2BenchmarkPatch[] = {
PATCH_END
};
+// Clicking an inventory item on the Wager 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
+// without any filtering. We fix this by always playing the "Do" message.
+//
+// Applies to: All versions
+// Responsible methods: painting:doVerb in scripts 8616 and 8617
+static const uint16 gk2WagerPaintingMessageSignature[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(say), // pushi say
+ 0x38, SIG_UINT16(0x0006), // pushi 0006
+ 0x67, SIG_ADDTOOFFSET(+1), // pTos noun
+ 0x8f, 0x01, // lsp 01 [ verb ]
+ SIG_END,
+};
+
+static const uint16 gk2WagerPaintingMessagePatch[] = {
+ PATCH_ADDTOOFFSET(+8),
+ 0x39, 0x3e, // pushi 3e [ "Do" verb ]
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry gk2Signatures[] = {
{ true, 0, "disable volume reset on startup", 1, gk2VolumeResetSignature, gk2VolumeResetPatch },
{ true, 0, "disable video benchmarking", 1, gk2BenchmarkSignature, gk2BenchmarkPatch },
{ true, 23, "fix inventory scroll start direction", 1, gk2InvScrollSignature, gk2InvScrollPatch },
+ { true, 8616, "fix wagner painting message", 2, gk2WagerPaintingMessageSignature, gk2WagerPaintingMessagePatch },
+ { true, 8617, "fix wagner painting message", 2, gk2WagerPaintingMessageSignature, gk2WagerPaintingMessagePatch },
{ true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
{ true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },
{ true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index dcae6f99ba..0725695b66 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -1246,6 +1246,8 @@ static const SciMessageWorkaroundEntry messageWorkarounds[] = {
// audio36 for the the other has the wrong tuple, which we fix in the audio36 workarounds.
{ GID_GK1, SCI_MEDIA_ALL, K_LANG_NONE, -1, 420, 2, 32, 3, 1, { MSG_WORKAROUND_REMAP, 420, 2, 32, 0, 1, 0, 0, 0, NULL } },
{ GID_GK1, SCI_MEDIA_ALL, K_LANG_NONE, -1, 420, 2, 32, 0, 1, { MSG_WORKAROUND_REMAP, 420, 2, 32, 2, 1, 0, 0, 0, NULL } },
+ // Clicking any item other than the dagger on theater vent in room 11853
+ { GID_GK2, SCI_MEDIA_ALL, K_LANG_NONE, -1, 1185, 4, 0, 0, 1, { MSG_WORKAROUND_REMAP, 1185, 4, 62, 0, 1, 0, 0, 0, NULL } },
// Asking Yvette about Tut in act 2 party in floppy version - bug #10723
// The last two sequences in this five part message reveal a murder that hasn't occurred yet.
// We skip these as to not spoil the plot, but only in the act 2 rooms, as the message is used
@@ -1321,6 +1323,8 @@ static const SciMessageWorkaroundEntry audio36Workarounds[] = {
// game media language room mod n v c s workaround-type mod n v c s tlk idx len text
// Clicking money on Lorelei when dancing - bug #10819 (see message workarounds above)
{ GID_GK1, SCI_MEDIA_CD, K_LANG_NONE, -1, 420, 2, 32, 0, 1, { MSG_WORKAROUND_REMAP, 420, 2, 32, 3, 1, 0, 0, 0, NULL } },
+ // Clicking Von Glower's letter on Gabriel in room 1120
+ { GID_GK2, SCI_MEDIA_ALL, K_LANG_ENGLISH, -1, 1120, 5, 96, 0, 1, { MSG_WORKAROUND_REMAP, 1120, 5, 2, 0, 1, 0, 0, 0, NULL } },
// Clicking Look on floor grate in room 510 - bug #10848
{ GID_QFG4, SCI_MEDIA_CD, K_LANG_NONE, -1, 510, 23, 1, 0, 1, { MSG_WORKAROUND_REMAP, 510, 199, 1, 0, 1, 0, 0, 0, NULL } },
// Clicking flowers on Rusalka - bug #10849 (see message workarounds above)