Ticket #15303: lsl5-patch.txt

File lsl5-patch.txt, 2.4 KB (added by eriktorbjorn, 4 months ago)
Line 
1diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
2index 2aa46a9dd3e..43d5d76f22a 100644
3--- a/engines/sci/engine/script_patches.cpp
4+++ b/engines/sci/engine/script_patches.cpp
5@@ -9385,6 +9385,36 @@ static const uint16 larry5PatchPokerJackpotInit[] = {
6 PATCH_END
7 };
8
9+// The way LSL5's Talker class is written, there is a small recurring chance
10+// that text boxes will time out immediately, and an even smaller chance that
11+// they won't time out at all. This was fixed in the German, French, Spanish,
12+// and Italian versions of the game.
13+//
14+// Applies to: English VGA version
15+// Responsible method: Talker::doit in script 928
16+
17+static const uint16 larry5SignatureTalkerDisposeWhenDone[] = {
18+ 0x76, // push0
19+ 0x43, 0x42, 0x00, // callk GetTime
20+ SIG_MAGICDWORD,
21+ 0x36, // push
22+ 0x63, 0x5c, // pToa ticks
23+ 0x1e, // gt?
24+ SIG_ADDTOOFFSET(+3),
25+ SIG_END
26+};
27+
28+static const uint16 larry5PatchTalkerDisposeWhenDone[] = {
29+ 0x89, 0x58, // lsg 58 [ gGameTime ]
30+ 0x63, 0x5c, // pToa ticks
31+ 0x04, // sub
32+ 0x36, // push
33+ 0x35, 0x00, // ldi 00
34+ 0x1e, // gt?
35+ 0x31, 0x08, // bnt 08
36+ PATCH_END
37+};
38+
39 // script, description, signature patch
40 static const SciScriptPatcherEntry larry5Signatures[] = {
41 { true, 0, "update stopGroop client", 1, larry5SignatureUpdateStopGroopClient, larry5PatchUpdateStopGroopClient },
42@@ -9395,6 +9425,7 @@ static const SciScriptPatcherEntry larry5Signatures[] = {
43 { true, 280, "English-only: fix green card limo bug", 1, larry5SignatureGreenCardLimoBug, larry5PatchGreenCardLimoBug },
44 { true, 380, "German-only: Enlarge Patti Textbox", 1, larry5SignatureGermanEndingPattiTalker, larry5PatchGermanEndingPattiTalker },
45 { true, 500, "speed up palette animation", 1, larry5SignatureRoom500PaletteAnimation, larry5PatchRoom500PaletteAnimation },
46+ { true, 928, "English-only: fix text box timeout", 1, larry5SignatureTalkerDisposeWhenDone, larry5PatchTalkerDisposeWhenDone },
47 SCI_SIGNATUREENTRY_TERMINATOR
48 };
49