diff options
author | sluicebox | 2019-10-27 16:17:38 -0700 |
---|---|---|
committer | sluicebox | 2019-10-27 16:17:38 -0700 |
commit | ea59841c41dc084f77cee4e88148d2f4b407855b (patch) | |
tree | c4228a2819007d521466837f4d8272705f406891 /engines/sci/engine | |
parent | e2c7434aa8c5ae3e4ed390c63bd0207ee1d29765 (diff) | |
download | scummvm-rg350-ea59841c41dc084f77cee4e88148d2f4b407855b.tar.gz scummvm-rg350-ea59841c41dc084f77cee4e88148d2f4b407855b.tar.bz2 scummvm-rg350-ea59841c41dc084f77cee4e88148d2f4b407855b.zip |
SCI: Fix SQ5 random lockup in captain's chair
Fixes bug #6130
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 6bda373cf8..c1e13218eb 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -16296,8 +16296,40 @@ static const uint16 sq5PatchDriveBayPathfindingFix[] = { PATCH_END }; +// Sitting in the captain's chair while Droole plays paddle ball randomly locks +// up the game. Upon sitting, sTakeCommand plays a sound using theMusic3 and +// waits for it to complete. This is the same object that's used to play the +// paddle ball sound. If ego sits before a paddle ball sound starts or Droole +// stops paddling and disposes the sound then sTakeCommand is never cued. +// +// We fix this conflict by using a different Sound object for the chair. +// theMusic4 is only used once while meeting the crew in sNewCaptain. +// +// Applies to: All versions +// Responsible method: sTakeCommand:changeState +// Fixes bug: #6130 +static const uint16 sq5SignatureCaptainChairFix[] = { + SIG_MAGICDWORD, + 0x76, // push0 + 0x72, SIG_UINT16(0x0018), // lofsa theMusic4 + SIG_ADDTOOFFSET(+947), + 0x72, SIG_UINT16(0x02ec), // lofsa theMusic3 + SIG_ADDTOOFFSET(+26), + 0x72, SIG_UINT16(0x02ec), // lofsa theMusic3 + SIG_END +}; + +static const uint16 sq5PatchCaptainChairFix[] = { + PATCH_ADDTOOFFSET(+951), + 0x72, PATCH_UINT16(0x0018), // lofsa theMusic4 + PATCH_ADDTOOFFSET(+26), + 0x72, PATCH_UINT16(0x0018), // lofsa theMusic4 + PATCH_END +}; + // script, description, signature patch static const SciScriptPatcherEntry sq5Signatures[] = { + { true, 200, "captain chair lockup fix", 1, sq5SignatureCaptainChairFix, sq5PatchCaptainChairFix }, { true, 226, "toolbox fix", 1, sq5SignatureToolboxFix, sq5PatchToolboxFix }, { true, 1000, "drive bay pathfinding fix", 1, sq5SignatureDriveBayPathfindingFix, sq5PatchDriveBayPathfindingFix }, SCI_SIGNATUREENTRY_TERMINATOR |