diff options
author | Martin Kiewitz | 2017-05-24 15:37:18 +0200 |
---|---|---|
committer | Martin Kiewitz | 2017-05-24 15:37:18 +0200 |
commit | 97d4a9eff1a54a03f506b76aad55a61adc832f30 (patch) | |
tree | 4813032da529eab2a76bd4640e42b364d5126ce7 /engines | |
parent | dc9c121d771e050336fb7cc259d739f2f05b2cf3 (diff) | |
download | scummvm-rg350-97d4a9eff1a54a03f506b76aad55a61adc832f30.tar.gz scummvm-rg350-97d4a9eff1a54a03f506b76aad55a61adc832f30.tar.bz2 scummvm-rg350-97d4a9eff1a54a03f506b76aad55a61adc832f30.zip |
SCI32: Add script patch for cheese maker issue
Room 540, was game breaking, but effectively a script
bug, that just happened to work in SSCI.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 1a276b1dd6..fb59bad707 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -2498,6 +2498,49 @@ static const SciScriptPatcherEntry larry6HiresSignatures[] = { SCI_SIGNATUREENTRY_TERMINATOR }; +#pragma mark - +#pragma mark Leisure Suit Larry 7 + +// =========================================================================== +// In room 540 of Leisure Suit Larry 7, Larry will use 4 items on a so called cheese maker. +// A short cutscene will then play. +// During that cutscene on state 6, an animation will get triggered via a special +// cycler ("End", but from script 64041), that is capable of doing ::cues on specific cels. +// The code of the state is broken and pushes the object itself as the 2nd cel to cue on. +// This parameter gets later changed to last cel by CycleCueList::init. +// Right now, we do not handle comparisons between references to objects and regular values like +// SSCI, so this will need to get fixed too. But this script bug should also get fixed, because +// otherwise it works just by accident. +// +// Applies to at least: English PC-CD, German PC-CD +// Responsible method: soMakeCheese::changeState(6) in script 540 +static const uint16 larry7SignatureMakeCheese[] = { + 0x38, SIG_UINT16(4), // pushi 04 + 0x51, 0xc4, // class End + 0x36, // push + SIG_MAGICDWORD, + 0x7c, // pushSelf + 0x39, 0x04, // pushi 04 + 0x7c, // pushSelf + SIG_END +}; + +static const uint16 larry7PatchMakeCheese[] = { + 0x39, 0x04, // pushi 04 - save 1 byte + 0x51, 0xc4, // class End + 0x36, + 0x7c, // pushSelf + 0x39, 0x04, // pushi 04 + 0x39, 0x10, // pushi 10h (last cel of view 54007, loop 0) + PATCH_END +}; + +// script, description, signature patch +static const SciScriptPatcherEntry larry7Signatures[] = { + { true, 540, "fix make cheese cutscene", 1, larry7SignatureMakeCheese, larry7PatchMakeCheese }, + SCI_SIGNATUREENTRY_TERMINATOR +}; + #endif // =========================================================================== @@ -5962,6 +6005,9 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) { case GID_LSL6HIRES: signatureTable = larry6HiresSignatures; break; + case GID_LSL7: + signatureTable = larry7Signatures; + break; #endif case GID_MOTHERGOOSE256: signatureTable = mothergoose256Signatures; |