aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorsluicebox2019-03-11 02:51:33 -0700
committerFilippos Karapetis2019-03-11 11:51:33 +0200
commit94bf32650fa9feb729b10a1dd730fe832c2c6744 (patch)
tree1866880cb817ee8a2c0fd9ce699910d8eb1757ad /engines
parentba5276c49638daba67675a4192613b149a5cbc5c (diff)
downloadscummvm-rg350-94bf32650fa9feb729b10a1dd730fe832c2c6744.tar.gz
scummvm-rg350-94bf32650fa9feb729b10a1dd730fe832c2c6744.tar.bz2
scummvm-rg350-94bf32650fa9feb729b10a1dd730fe832c2c6744.zip
SCI: Fix SQ4CD Sock's door, bug #10914 (#1533)
Diffstat (limited to 'engines')
-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 5a2259985b..d8533f4c67 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -116,6 +116,7 @@ static const char *const selectorNameTable[] = {
"has", // King's Quest 6, GK1
"modeless", // King's Quest 6 CD
"cycler", // Space Quest 4 / system selector
+ "addToPic", // Space Quest 4
"loop", // Laura Bow 1 Colonel's Bequest, QFG4
"setLoop", // Laura Bow 1 Colonel's Bequest, QFG4
"ignoreActors", // Laura Bow 1 Colonel's Bequest
@@ -210,6 +211,7 @@ enum ScriptPatcherSelectors {
SELECTOR_has,
SELECTOR_modeless,
SELECTOR_cycler,
+ SELECTOR_addToPic,
SELECTOR_loop,
SELECTOR_setLoop,
SELECTOR_ignoreActors,
@@ -11102,6 +11104,29 @@ static const uint16 sq4PatchZeroGravityBlast[] = {
PATCH_END
};
+// The door to Sock's is immediately disposed of in the CD version, breaking its
+// Look message and preventing it from being drawn when restoring a saved game.
+// We remove the incorrect dispose call along with a redundant addToPic.
+//
+// Applies to: English PC CD
+// Responsible method: rm370:init
+// Fixes bug #10914
+static const uint16 sq4CdSignatureSocksDoor[] = {
+ 0x38, SIG_SELECTOR16(addToPic), // pushi addToPic
+ 0x76, // push0
+ 0x39, SIG_SELECTOR8(dispose), // pushi dispose
+ 0x76, // push0
+ SIG_MAGICDWORD,
+ 0x72, SIG_UINT16(0x0176), // lofsa door
+ 0x4a, 0x08, // send 08 [ door addToPic: dispose: ]
+ SIG_END
+};
+
+static const uint16 sq4CdPatchSocksDoor[] = {
+ 0x32, PATCH_UINT16(0x0009), // jmp 0009
+ PATCH_END
+};
+
// The scripts in SQ4CD support simultaneous playing of speech and subtitles,
// but this was not available as an option. The following two patches enable
// this functionality in the game's GUI options dialog.
@@ -11201,6 +11226,7 @@ static const SciScriptPatcherEntry sq4Signatures[] = {
{ true, 298, "Floppy: endless flight", 1, sq4FloppySignatureEndlessFlight, sq4FloppyPatchEndlessFlight },
{ true, 700, "Floppy: throw stuff at sequel police bug", 1, sq4FloppySignatureThrowStuffAtSequelPoliceBug, sq4FloppyPatchThrowStuffAtSequelPoliceBug },
{ true, 45, "CD: walk in from below for room 45 fix", 1, sq4CdSignatureWalkInFromBelowRoom45, sq4CdPatchWalkInFromBelowRoom45 },
+ { true, 370, "CD: sock's door restore and message fix", 1, sq4CdSignatureSocksDoor, sq4CdPatchSocksDoor },
{ true, 391, "CD: missing Audio for universal remote control", 1, sq4CdSignatureMissingAudioUniversalRemote, sq4CdPatchMissingAudioUniversalRemote },
{ true, 396, "CD: get points for changing back clothes fix", 1, sq4CdSignatureGetPointsForChangingBackClothes, sq4CdPatchGetPointsForChangingBackClothes },
{ true, 405, "CD/Floppy: zero gravity blast fix", 1, sq4SignatureZeroGravityBlast, sq4PatchZeroGravityBlast },