diff options
author | sluicebox | 2018-10-22 14:18:52 -0700 |
---|---|---|
committer | Filippos Karapetis | 2018-10-23 00:18:52 +0300 |
commit | ced47b44eae3307ee9e84299833b275b5b122fca (patch) | |
tree | 7666bf47621685c58608921c4795196cbb96711f /engines/sci | |
parent | 209c62201028ffa546d1ac4b269bcf7fb6514b0b (diff) | |
download | scummvm-rg350-ced47b44eae3307ee9e84299833b275b5b122fca.tar.gz scummvm-rg350-ced47b44eae3307ee9e84299833b275b5b122fca.tar.bz2 scummvm-rg350-ced47b44eae3307ee9e84299833b275b5b122fca.zip |
SCI: Script patch for LB1 candles, bug #10743 (#1355)
Fixes a persistence bug in original game
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 2c3fe5e914..7bc44f8778 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -3346,6 +3346,32 @@ static const uint16 laurabow1PatchArmorOilingArmFix[] = { PATCH_END }; +// Jeeves lights the chapel candles (room 58) in act 2 but they don't stay +// lit when re-entering until the next act. This is due to Room58:init +// incorrectly testing the global variable that tracks Jeeves' act 2 state. +// +// We fix this by changing the test from if global155 equals 11, which it +// never does, to if it's greater than 11. The global is set to 12 in +// lightCandles:changeState(11) and it continues to increment as Jeeves' +// chore sequence progresses, ending with 17. +// +// Applies to: DOS, Amiga, Atari ST +// Responsible method: Room58:init +// Fixes bug #10743 +static const uint16 laurabow1SignatureChapelCandlesPersistence[] = { + SIG_MAGICDWORD, + 0x89, 0x9b, // lsg global155 [ Jeeves' act 2 state ] + 0x35, 0x0b, // ldi b + 0x1a, // eq? + SIG_END +}; + +static const uint16 laurabow1PatchChapelCandlesPersistence[] = { + PATCH_ADDTOOFFSET(+4), + 0x1e, // gt? + PATCH_END +}; + // LB1 DOS doesn't acknowledge Lillian's presence in room 44 when she's sitting // on the bed in act 4. Look, talk, etc respond that she's not there. // This is due to not setting global 195 which tracks who is in the room. @@ -3450,6 +3476,7 @@ static const SciScriptPatcherEntry laurabow1Signatures[] = { { true, 37, "armor move to fix", 2, laurabow1SignatureArmorMoveToFix, laurabow1PatchArmorMoveToFix }, { true, 37, "allowing input, after oiling arm", 1, laurabow1SignatureArmorOilingArmFix, laurabow1PatchArmorOilingArmFix }, { true, 44, "lillian bed fix", 1, laurabow1SignatureLillianBedFix, laurabow1PatchLillianBedFix }, + { true, 58, "chapel candles persistence", 1, laurabow1SignatureChapelCandlesPersistence, laurabow1PatchChapelCandlesPersistence }, { true, 236, "tell Lilly about Gertie blocking fix 1/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix1, laurabow1PatchTellLillyAboutGertieBlockingFix1 }, { true, 236, "tell Lilly about Gertie blocking fix 2/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix2, laurabow1PatchTellLillyAboutGertieBlockingFix2 }, SCI_SIGNATUREENTRY_TERMINATOR |