diff options
Diffstat (limited to 'engines/sci/engine/script_patches.cpp')
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 144 |
1 files changed, 126 insertions, 18 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 738f2acfd0..c2f041af72 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -1054,6 +1054,64 @@ static const uint16 gk1Day5PhoneFreezePatch[] = { PATCH_END }; +// When Gabriel is grabbing a vine 'vineSwing::changeState(1)', +// him saying "I can't believe I'm doing this..." is cut off. +// We change it so the scripts wait for the audio. +// This is not supposed to be applied to the Floppy version. +// +// Applies to at lesat: English PC-CD, German PC-CD, Spanish PC-CD +static const uint16 gk1Day9VineSwingSignature[] = { + 0x38, SIG_UINT16(4), // pushi $4 + 0x51, 0x17, // class CT + 0x36, // push + 0x39, 0x0b, // pushi $b + 0x78, // push1 + 0x7c, // pushSelf + 0x81, 0x00, // lag global[$0] + 0x4a, SIG_UINT16(0x20), // send $20 + 0x38, SIG_SELECTOR16(setMotion), // pushi setMotion + 0x78, // push1 + 0x76, // push0 + 0x72, SIG_UINT16(0x0412), // lofsa guard1 + 0x4a, SIG_UINT16(0x06), // send $6 + 0x38, SIG_SELECTOR16(say), // pushi say + 0x38, SIG_UINT16(0x04), // pushi $4 + SIG_MAGICDWORD, + 0x39, 0x07, // pushi $7 + 0x39, 0x08, // pushi $8 + 0x39, 0x10, // pushi $10 + 0x78, // push1 + 0x81, 0x5b, // lsg global[$5b] + 0x4a, SIG_UINT16(0x000c), // send $c + SIG_END +}; + +static const uint16 gk1Day9VineSwingPatch[] = { + 0x38, SIG_UINT16(3), // pushi $3 + 0x51, 0x17, // class CT + 0x36, // push + 0x39, 0x0b, // pushi $b + 0x78, // push1 + 0x81, 0x00, // lag global[$0] + 0x4a, SIG_UINT16(0x1e), // send $20 + 0x38, SIG_SELECTOR16(setMotion), // pushi setMotion + 0x78, // push1 + 0x76, // push0 + 0x72, SIG_UINT16(0x0412), // lofsa guard1 + 0x4a, SIG_UINT16(0x06), // send $6 + 0x38, SIG_SELECTOR16(say), // pushi say + 0x38, SIG_UINT16(0x05), // pushi $5 + 0x39, 0x07, // pushi $7 + 0x39, 0x08, // pushi $8 + 0x39, 0x10, // pushi $10 + 0x78, // push1 + 0x7c, // pushSelf + 0x81, 0x5b, // lsg global[$5b] + 0x4a, SIG_UINT16(0x000e), // send $c + PATCH_END +}; + + // In GK1, the `view` selector is used to store view numbers in some cases and // object references to Views in other cases. `Interrogation::dispose` compares // an object stored in the `view` selector with a number (which is not valid) @@ -1120,6 +1178,7 @@ static const SciScriptPatcherEntry gk1Signatures[] = { { true, 230, "fix day 6 police beignet timer issue (1/2)", 1, gk1Day6PoliceBeignetSignature1, gk1Day6PoliceBeignetPatch1 }, { true, 230, "fix day 6 police beignet timer issue (2/2)", 1, gk1Day6PoliceBeignetSignature2, gk1Day6PoliceBeignetPatch2 }, { true, 230, "fix day 6 police sleep timer issue", 1, gk1Day6PoliceSleepSignature, gk1Day6PoliceSleepPatch }, + { true, 710, "fix day 9 vine swing speech playing", 1, gk1Day9VineSwingSignature, gk1Day9VineSwingPatch }, { true, 64908, "disable video benchmarking", 1, sci2BenchmarkSignature, sci2BenchmarkPatch }, { true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, { true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, @@ -3993,25 +4052,74 @@ static const uint16 phant2InvOffsetPatch[] = { PATCH_END }; -// script, description, signature patch +// The text placement of "File" and "Note" content inside DocuStore File +// Retrieval System makes some letters especially "g" overlap the +// corresponding box. Set by 'WynNetDoco::open'. +// We fix this by changing the position of those 2 inside the heap of +// subclass 'WynNetDoco' slightly. +// Applies to at least: English CD, Japanese CD, German CD +static const uint16 phant2DocuStoreFileNotePlacementSignature[] = { + SIG_MAGICDWORD, + SIG_UINT16(0x0046), // nameX + SIG_UINT16(0x000a), // nameY + SIG_ADDTOOFFSET(+10), // skip over nameMsg* + SIG_UINT16(0x0046), // noteX + SIG_UINT16(0x001e), // noteY + SIG_END +}; + +static const uint16 phant2DocuStoreFileNotePlacementPatch[] = { + PATCH_ADDTOOFFSET(+2), + PATCH_UINT16(0x0006), // new nameY + PATCH_ADDTOOFFSET(+12), + PATCH_UINT16(0x001b), // new noteY + PATCH_END +}; + +// The text placement of "From" and "Subject" content inside DocuStore. +// We fix this by changing the position inside the heap of subclass +// 'WynNetEmail' slightly. +// For this one, we also fix the horizontal placement. +static const uint16 phant2DocuStoreEmailPlacementSignature[] = { + SIG_MAGICDWORD, + SIG_UINT16(0x0049), // nameX + SIG_UINT16(0x0008), // nameY + SIG_ADDTOOFFSET(+10), // skip over nameMsg* + SIG_UINT16(0x0049), // noteX + SIG_UINT16(0x001c), // noteY + SIG_END +}; + +static const uint16 phant2DocuStoreEmailPlacementPatch[] = { + PATCH_UINT16(0x0050), // new nameX + PATCH_UINT16(0x0006), // new nameY + SIG_ADDTOOFFSET(+10), + PATCH_UINT16(0x0050), // new noteX + PATCH_UINT16(0x001b), // new noteY + PATCH_END +}; + +// script, description, signature patch static const SciScriptPatcherEntry phantasmagoria2Signatures[] = { - { true, 0, "speed up interface fades", 3, phant2SlowIFadeSignature, phant2SlowIFadePatch }, - { true, 0, "fix bad arguments to get game version", 1, phant2GetVersionSignature, phant2GetVersionPatch }, - { true, 3000, "replace spin loop in alien password window", 1, phant2WaitParam1Signature, phant2WaitParam1Patch }, - { true, 4081, "replace spin loop after ratboy puzzle", 1, phant2RatboySignature, phant2RatboyPatch }, - { true, 63001, "fix inventory left scroll delta", 1, phant2InvLeftDeltaSignature, phant2InvLeftDeltaPatch }, - { true, 63001, "fix inventory right scroll delta", 1, phant2InvRightDeltaSignature, phant2InvRightDeltaPatch }, - { true, 63001, "fix inventory wrong initial offset", 1, phant2InvOffsetSignature, phant2InvOffsetPatch }, - { true, 63004, "limit in-game audio volume", 1, phant2AudioVolumeSignature, phant2AudioVolumePatch }, - { true, 63016, "replace spin loop during music fades", 1, phant2Wait4FadeSignature, phant2Wait4FadePatch }, - { true, 63019, "replace spin loop during computer load", 1, phant2WaitParam1Signature, phant2WaitParam1Patch }, - { true, 63019, "replace spin loop during computer scrolling", 1, phant2SlowScrollSignature, phant2SlowScrollPatch }, - { true, 63019, "fix bad doc/email name & memo positioning", 2, phant2BadPositionSignature, phant2BadPositionPatch }, - { true, 63019, "fix bad folder/doc icon refresh", 2, phant2BadIconSignature, phant2BadIconPatch }, - { true, 64990, "remove save game name mangling (1/2)", 1, phant2SaveNameSignature1, phant2SaveNamePatch1 }, - { true, 64990, "increase number of save games (1/2)", 1, phant2NumSavesSignature1, phant2NumSavesPatch1 }, - { true, 64990, "increase number of save games (2/2)", 2, phant2NumSavesSignature2, phant2NumSavesPatch2 }, - { true, 64994, "remove save game name mangling (2/2)", 1, phant2SaveNameSignature2, phant2SaveNamePatch2 }, + { true, 0, "speed up interface fades", 3, phant2SlowIFadeSignature, phant2SlowIFadePatch }, + { true, 0, "fix bad arguments to get game version", 1, phant2GetVersionSignature, phant2GetVersionPatch }, + { true, 3000, "replace spin loop in alien password window", 1, phant2WaitParam1Signature, phant2WaitParam1Patch }, + { true, 4081, "replace spin loop after ratboy puzzle", 1, phant2RatboySignature, phant2RatboyPatch }, + { true, 63001, "fix inventory left scroll delta", 1, phant2InvLeftDeltaSignature, phant2InvLeftDeltaPatch }, + { true, 63001, "fix inventory right scroll delta", 1, phant2InvRightDeltaSignature, phant2InvRightDeltaPatch }, + { true, 63001, "fix inventory wrong initial offset", 1, phant2InvOffsetSignature, phant2InvOffsetPatch }, + { true, 63004, "limit in-game audio volume", 1, phant2AudioVolumeSignature, phant2AudioVolumePatch }, + { true, 63016, "replace spin loop during music fades", 1, phant2Wait4FadeSignature, phant2Wait4FadePatch }, + { true, 63019, "replace spin loop during computer load", 1, phant2WaitParam1Signature, phant2WaitParam1Patch }, + { true, 63019, "replace spin loop during computer scrolling", 1, phant2SlowScrollSignature, phant2SlowScrollPatch }, + { true, 63019, "fix bad doc/email name & memo positioning", 2, phant2BadPositionSignature, phant2BadPositionPatch }, + { true, 63019, "fix bad folder/doc icon refresh", 2, phant2BadIconSignature, phant2BadIconPatch }, + { true, 63019, "fix file and note content placement", 1, phant2DocuStoreFileNotePlacementSignature, phant2DocuStoreFileNotePlacementPatch }, + { true, 63019, "fix email content placement", 1, phant2DocuStoreEmailPlacementSignature, phant2DocuStoreEmailPlacementPatch }, + { true, 64990, "remove save game name mangling (1/2)", 1, phant2SaveNameSignature1, phant2SaveNamePatch1 }, + { true, 64990, "increase number of save games (1/2)", 1, phant2NumSavesSignature1, phant2NumSavesPatch1 }, + { true, 64990, "increase number of save games (2/2)", 2, phant2NumSavesSignature2, phant2NumSavesPatch2 }, + { true, 64994, "remove save game name mangling (2/2)", 1, phant2SaveNameSignature2, phant2SaveNamePatch2 }, SCI_SIGNATUREENTRY_TERMINATOR }; |