[Scummvm-git-logs] scummvm branch-2-3 -> 3f71aa42866267cc9e14838cbc997a593a552f78
sluicebox
22204938+sluicebox at users.noreply.github.com
Thu Sep 9 17:43:00 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bf4b3bbbdb SCI: Replace QFG1VGA fetch workaround with script patch
3f71aa4286 SCI: Add QFG1VGA Mac workaround for Brigands
Commit: bf4b3bbbdb7306577de63e1c8fd9c0933cba98fb
https://github.com/scummvm/scummvm/commit/bf4b3bbbdb7306577de63e1c8fd9c0933cba98fb
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-09-09T12:41:35-05:00
Commit Message:
SCI: Replace QFG1VGA fetch workaround with script patch
Spell animation now travels towards the intended plant as in the
original, and also fixes Mac version
Changed paths:
engines/sci/engine/script_patches.cpp
engines/sci/engine/workarounds.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index f90b87adee..d73a7bc39b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -12493,6 +12493,45 @@ static const uint16 qfg1vgaPatchThievesGuildCashier[] = {
PATCH_END
};
+// When casting the fetch spell at the spitting plants and failing to fetch the
+// seed, the script lassoFailed stores the target coordinates in temp variables
+// during state 0 and expects them to still be there in state 1. This worked by
+// accident in Sierra's interpreter.
+//
+// We fix this by using local variables instead. Locals 7 and 8 are only used to
+// save and restore ego's speeds during other sequences in this room.
+//
+// Applies to: All versions
+// Responsible method: lassoFailed:changeState
+// Fixes bug: #5309
+static const uint16 qfg1vgaSignatureCastFetchAtPlants[] = {
+ SIG_MAGICDWORD,
+ 0xa5, 0x00, // sat 00 [ temp0 = flower:x ]
+ 0x76, // push0 [ y ]
+ 0x76, // push0
+ 0x83, 0x05, // lal 05
+ 0x93, 0x0c, // lali 0c
+ 0x4a, 0x04, // send 04 [ flower y? ]
+ 0x36, // push
+ 0x35, 0x1e, // ldi 1e
+ 0x04, // sub
+ 0xa5, 0x01, // sat 01 [ temp0 = flower:y - 30 ]
+ SIG_ADDTOOFFSET(+31),
+ 0x8d, 0x00, // lst 00
+ 0x8d, 0x01, // lst 01
+ SIG_END
+};
+
+static const uint16 qfg1vgaPatchCastFetchAtPlants[] = {
+ 0xa3, 0x07, // sal 07
+ PATCH_ADDTOOFFSET(+12),
+ 0xa3, 0x08, // sal 08
+ PATCH_ADDTOOFFSET(+31),
+ 0x8b, 0x07, // lsl 07
+ 0x8b, 0x08, // lsl 08
+ PATCH_END
+};
+
// When entering the great hall (room 141), the Mac version stores ego's speed
// in a temp variable in egoEnters:changeState(0) and expects that value to be
// there in state 6 when restoring ego's speed. We patch the script to use its
@@ -12680,6 +12719,7 @@ static const uint16 qfg1vgaPatchDrinkWaterMessage[] = {
// script, description, signature patch
static const SciScriptPatcherEntry qfg1vgaSignatures[] = {
{ true, 0, "inventory weight warning", 1, qfg1vgaSignatureInventoryWeightWarn, qfg1vgaPatchInventoryWeightWarn },
+ { true, 16, "cast fetch at plants", 1, qfg1vgaSignatureCastFetchAtPlants, qfg1vgaPatchCastFetchAtPlants },
{ true, 41, "moving to castle gate", 1, qfg1vgaSignatureMoveToCastleGate, qfg1vgaPatchMoveToCastleGate },
{ true, 55, "healer's hut, no delay for buy/steal", 1, qfg1vgaSignatureHealerHutNoDelay, qfg1vgaPatchHealerHutNoDelay },
{ true, 58, "mac: giant fight", 6, qfg1vgaSignatureMacGiantFight, qfg1vgaPatchMacGiantFight },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 3c0baaf472..dff882ec26 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -499,7 +499,6 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_PQSWAT, -1, 73, 0, "theLashInterface", "transmit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Clicking the transmit button in LASH
{ GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
{ GID_QFG1, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1/hq1: going to the brigands hideout
- { GID_QFG1VGA, 16, 16, 0, "lassoFailed", "changeState", NULL, -1, -1, { WORKAROUND_FAKE, 0 } }, // qfg1vga: casting the "fetch" spell in the screen with the flowers, temps 0 and 1 - bug #5309
{ GID_QFG1VGA, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1vga_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga: going to the brigands hideout - bug #5515
{ GID_QFG1VGA, 58, 58, 0, NULL, "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 18 } }, // qfg1vga: casting "detect magic" at giant's cave, temp 0 used instead of spell number. object is "rm58" but Mac version has blank names
{ GID_QFG1VGA, 96, 96, 0, NULL, "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga mac: when yorick throws an object
Commit: 3f71aa42866267cc9e14838cbc997a593a552f78
https://github.com/scummvm/scummvm/commit/3f71aa42866267cc9e14838cbc997a593a552f78
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-09-09T12:41:35-05:00
Commit Message:
SCI: Add QFG1VGA Mac workaround for Brigands
Changed paths:
engines/sci/engine/workarounds.cpp
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index dff882ec26..566dbac815 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -257,6 +257,21 @@ static const uint16 sig_uninitread_qfg1vga_1[] = {
SIG_END
};
+// Game: Quest for Glory 1 VGA
+// Calling method: Encounter::init (although class names are blank in Mac)
+// Subroutine offset: 0x0f22 (script 210)
+// Applies to at least: Mac floppy
+static const uint16 sig_uninitread_qfg1vga_2[] = {
+ 0x3f, 0x02, // link 02
+ 0x87, 0x00, // lap param[0]
+ 0x30, SIG_UINT16(0x000c), // bnt [...]
+ 0x87, 0x01, // lap param[1]
+ 0x30, SIG_UINT16(0x0007), // bnt [...]
+ 0x87, 0x01, // lap param[1]
+ 0xa5, 0x01, // sat temp[1]
+ SIG_END
+};
+
// Game: Quest for Glory 2
// Calling method: abdulS::changeState, jabbarS::changeState
// Subroutine offset: English 0x2d22 (script 260)
@@ -500,6 +515,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
{ GID_QFG1, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1/hq1: going to the brigands hideout
{ GID_QFG1VGA, -1, 210, 0, "Encounter", "init", sig_uninitread_qfg1vga_1, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga: going to the brigands hideout - bug #5515
+ { GID_QFG1VGA, -1, 210, 0, NULL, "init", sig_uninitread_qfg1vga_2, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga mac: going to the brigands hideout - bug #5515. object is "Encounter" but Mac version has blank names
{ GID_QFG1VGA, 58, 58, 0, NULL, "doVerb", NULL, 0, 0, { WORKAROUND_FAKE, 18 } }, // qfg1vga: casting "detect magic" at giant's cave, temp 0 used instead of spell number. object is "rm58" but Mac version has blank names
{ GID_QFG1VGA, 96, 96, 0, NULL, "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga mac: when yorick throws an object
{ GID_QFG1VGA, 320, 320, 0, NULL, "changeState", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // qfg1vga mac: first time entering room 320 when centaur offers fruits and vegetables
More information about the Scummvm-git-logs
mailing list