diff options
author | sluicebox | 2019-06-11 18:50:58 -0700 |
---|---|---|
committer | Filippos Karapetis | 2019-06-13 03:36:14 +0300 |
commit | 222ed9c52d59a96cc85947af98d1dfc98c597403 (patch) | |
tree | 548e71ea8b30c00ba0624e9c557d8eb74bb16141 /engines/sci/engine | |
parent | b051b1545a52e499f68dd828a6c163d48e970bb9 (diff) | |
download | scummvm-rg350-222ed9c52d59a96cc85947af98d1dfc98c597403.tar.gz scummvm-rg350-222ed9c52d59a96cc85947af98d1dfc98c597403.tar.bz2 scummvm-rg350-222ed9c52d59a96cc85947af98d1dfc98c597403.zip |
SCI: Fix SQ4 Sock's Sequel police crash, bug #10974
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 00ce1a3d68..12dd25d3e5 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -12148,6 +12148,52 @@ static const uint16 sq4CdPatchBikerTimepodMessage[] = { PATCH_END }; +// Clicking Walk while getting shot by the Sequel Police outside of Sock's in +// room 370 crashes the CD version. This causes an Oops! error in the original. +// The lookupSelector error comes from within the Grooper and Grycler classes +// but the real bug is that this room's script fails to call handsOff, allowing +// movement during ego's death animation, unlike all the other laser scripts. +// +// We prevent the crash by adding the missing handsOff call. +// +// Applies to: English PC CD +// Responsible method: sp2Squeeze:changeState(3) +// Fixes bug #10974 +static const uint16 sq4CdSignatureSocksSequelPoliceHandsOff[] = { + 0x76, // push0 [ y ] + 0x76, // push0 + 0x81, 0x00, // lag 00 + 0x4a, 0x04, // send 04 [ ego y? ] + SIG_MAGICDWORD, + 0x36, // push + 0x35, 0x20, // ldi 20 + 0x04, // sub + 0xa3, 0x00, // sal 00 [ local0 = ego:y ] + 0x38, SIG_SELECTOR16(setMotion), // pushi setMotion + 0x78, // push1 + 0x76, // push0 + 0x81, 0x00, // lag 00 + 0x4a, 0x06, // send 06 [ ego setMotion: 0 ] + SIG_END +}; + +static const uint16 sq4CdPatchSocksSequelPoliceHandsOff[] = { + 0x38, PATCH_SELECTOR16(setMotion), // pushi setMotion + 0x78, // push1 + 0x76, // push0 + 0x76, // push0 [ y ] + 0x76, // push0 + 0x81, 0x00, // lag 00 + 0x4a, 0x0a, // send 0a [ ego setMotion: 0 y?, saves 4 bytes ] + 0x36, // push + 0x35, 0x20, // ldi 20 + 0x04, // sub + 0xa3, 0x00, // sal 00 [ local0 = ego:y ] + 0x76, // push0 + 0x45, 0x02, 0x00, // callb proc0_2 00 [ handsOff ] + 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. @@ -12499,6 +12545,7 @@ static const SciScriptPatcherEntry sq4Signatures[] = { { true, 290, "CD: cedric easter egg fix", 1, sq4CdSignatureCedricEasterEgg, sq4CdPatchCedricEasterEgg }, { true, 290, "CD: cedric lockup fix (1/2)", 1, sq4CdSignatureCedricLockup1, sq4CdPatchCedricLockup1 }, { true, 290, "CD: cedric lockup fix (2/2)", 1, sq4CdSignatureCedricLockup2, sq4CdPatchCedricLockup2 }, + { true, 370, "CD: sock's sequel police hands-off fix", 1, sq4CdSignatureSocksSequelPoliceHandsOff, sq4CdPatchSocksSequelPoliceHandsOff }, { true, 370, "CD: sock's door restore and message fix", 1, sq4CdSignatureSocksDoor, sq4CdPatchSocksDoor }, { true, 381, "CD: big and tall room description", 1, sq4CdSignatureBigAndTallDescription, sq4CdPatchBigAndTallDescription }, { true, 391, "CD: missing Audio for universal remote control", 1, sq4CdSignatureMissingAudioUniversalRemote, sq4CdPatchMissingAudioUniversalRemote }, |