SCI32: Remove obsolete script patches

This commit is contained in:
Lars Skovlund 2018-12-27 08:56:35 +01:00 committed by Filippos Karapetis
parent ff7e490593
commit bba8eadfae

View File

@ -8406,31 +8406,6 @@ static const uint16 qfg4SetScalerPatch[] = {
PATCH_END
};
// When the fortune teller's wagon room is disposed, it attempts to call
// hero::show(), hero has a null "plane" property, and ScummVM crashes.
//
// The problematic line was removed in the CD edition. We remove it, too.
//
// Note: This patch is a workaround. The floppy edition SSCI did not crash, and
// its implementation of AddScreenItem() should be checked to find out why.
//
// Applies to at least: English floppy, German floppy
// Responsible method: rm470::dispose()
// Fixes bug: #10778
static const uint16 qfg4MagdaDisposalSignature[] = {
0x38, SIG_SELECTOR16(posn), // posn
SIG_ADDTOOFFSET(+8), // ...
SIG_MAGICDWORD,
0x81, 0x00, // lag global[0] (hero)
0x4a, SIG_UINT16(0x000c), // send 12d (posn: 1000 1000 show:)
SIG_END
};
static const uint16 qfg4MagdaDisposalPatch[] = {
0x33, 0x0e, // jmp 14d (skip the entire hero send)
PATCH_END
};
// The castle's crest-operated bookshelf has an unconditional HAND message
// which always says, "you haven't found the trigger yet," even after it's
// open.
@ -8621,47 +8596,6 @@ static const uint16 qfg4ConditionalVoidPatch[] = {
PATCH_END
};
// The copy protection in floppy versions has a script bug which attempts to add
// views with no planes to the screen. Our interpreter does not allow this and
// treats it as an error. This appears to work in Sierra's interpreter, which
// presumably ignores it, although the script bug was fixed in the CD version.
//
// When asking Dr. Cranium in room 370 about certain potions the game switches
// to a copy protection screen and then back to the conversation. Before the
// switch, craniumTalker is disposed, which in turn disposes craniumThumbs and
// craniumBrow. Disposing these views clears their planes. After returning from
// the protection screen craniumTalker:showAgain is called even though it has
// been disposed. This causes kAddScreenItem to be called on views without
// planes, which is treated as an error by our interpreter.
//
// We work around this by reinitializing craniumTalker after the copy protection
// so that showAgain can be safely called. craniumTalker is reinitialized when
// navigating through the conversation menus so this is normal behavior.
//
// Applies to: English PC Floppy, German PC Floppy
// Responsible method: delayMsg:changeState(0)
// Fixes bug: #10773
static const uint16 qfg4CopyProtectionSignature[] = {
0x31, 0x06, // bnt 06
SIG_MAGICDWORD,
0x35, 0x01, // ldi 01
0x65, 0x24, // aTop register
SIG_ADDTOOFFSET(+6),
0x38, SIG_UINT16(0x0300), // pushi 0300 [ showAgain, hard-coded for floppy ]
SIG_ADDTOOFFSET(+11),
0x4a, SIG_UINT16(0x0004), // send 04 [ craniumTalker: showAgain ]
SIG_END
};
static const uint16 qfg4CopyProtectionPatch[] = {
0x65, 0x24, // aTop register
0x38, PATCH_SELECTOR16(init), // pushi init
0x76, // push0
PATCH_ADDTOOFFSET(+20),
0x4a, PATCH_UINT16(0x0008), // send 08 [ craniumTalker: init, showAgain ]
PATCH_END
};
// In the graveyard rescuing Igor, ropes are briefly obscured by crypt pillars
// in the background Pic. The Pic assigns a priority to the pillars for depth.
// Ropes are initialized without priority. Then there's a setPri() call.
@ -9300,9 +9234,7 @@ static const SciScriptPatcherEntry qfg4Signatures[] = {
{ true, 270, "fix town gate after a staff dream", 1, qfg4DreamGateSignature, qfg4DreamGatePatch },
{ true, 320, "fix pathfinding at the inn", 1, qg4InnPathfindingSignature, qg4InnPathfindingPatch },
{ true, 320, "fix talking to absent innkeeper", 1, qfg4AbsentInnkeeperSignature, qfg4AbsentInnkeeperPatch },
{ true, 370, "Floppy: fix copy protection", 1, qfg4CopyProtectionSignature, qfg4CopyProtectionPatch },
{ true, 440, "fix setLooper calls (1/2)", 1, qg4SetLooperSignature1, qg4SetLooperPatch1 },
{ true, 470, "fix Magda room disposal", 1, qfg4MagdaDisposalSignature, qfg4MagdaDisposalPatch },
{ true, 475, "fix tarot 3 queen card", 1, qfg4Tarot3QueenSignature, qfg4Tarot3QueenPatch },
{ true, 475, "fix tarot 3 death card", 1, qfg4Tarot3DeathSignature, qfg4Tarot3DeathPatch },
{ true, 475, "fix tarot 3 two of cups placement", 1, qfg4Tarot3TwoOfCupsSignature, qfg4Tarot3TwoOfCupsPatch },