[Scummvm-git-logs] scummvm master -> b568680e5621b6d877d952bdc7a7a90bc0be4ab6

bluegr bluegr at gmail.com
Wed Apr 24 00:02:22 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b568680e56 SCI: Fix QFG1VGA inventory weight warn, bug #10942


Commit: b568680e5621b6d877d952bdc7a7a90bc0be4ab6
    https://github.com/scummvm/scummvm/commit/b568680e5621b6d877d952bdc7a7a90bc0be4ab6
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-04-24T01:02:18+03:00

Commit Message:
SCI: Fix QFG1VGA inventory weight warn, bug #10942

Fix a script bug that breaks the game when picking mushrooms or other
actions if they trigger an inventory weight warning

Changed paths:
    engines/sci/engine/script_patches.cpp


diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index f84c643..04d524c 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -7896,6 +7896,60 @@ static const uint16 qfg1vgaPatchSpeedTest[] = {
 	PATCH_END
 };
 
+// QFG1VGA has a bug where exceeding the weight limit during certain scenes
+//  breaks the character screen for the rest of the game. Picking mushrooms,
+//  searching cheetaurs, and fetching the seed are among the vulnerable actions.
+//
+// When adding inventory, ego:get displays a warning if the new items exceed the
+//  weight limit. If this happens while qfgMessager is displaying a message
+//  then both will display at the same time but only one will be disposed. This
+//  leaves an extra entry in the kernel's window list for the rest of the game.
+//  kDisplay then sends text to the wrong window, breaking the character screen
+//  and others, and prevents the player from ever viewing their stats.
+//
+// We fix this by adding a check to ego:get that skips displaying messages if a
+//  dialog already exists. This is what Sierra did in the Mac version after
+//  reverting the scene-specific patches they issued for the PC version.
+//
+// Applies to: PC Floppy
+// Responsible method: ego:get
+// Fixes bug: #10942
+static const uint16 qfg1vgaSignatureInventoryWeightWarn[] = {
+	0x8f, 0x00,                         // lsp 00
+	0x35, 0x01,                         // ldi 01
+	0x1a,                               // eq?
+	0x31, 0x04,                         // bnt 04
+	0x35, 0x01,                         // ldi 01
+	0x33, 0x02,                         // jmp 02
+	0x87, 0x02,                         // lap 02
+	0xa5, SIG_MAGICDWORD, 0x01,         // sat 01
+	0x38, SIG_UINT16(0x024d),           // pushi amount [ hard-coded for PC ]
+	0x76,                               // push0
+	0x85, 0x00,                         // lat 00
+	0x4a, 0x04,                         // send 04 [ temp0 amount? ]
+	0xa5, 0x02,                         // sat 02
+	SIG_ADDTOOFFSET(+0x0092),
+	0x8d, 0x01,                         // lst 01
+	SIG_END
+};
+
+static const uint16 qfg1vgaPatchInventoryWeightWarn[] = {
+	0x87, 0x00,                         // lap 00
+	0x78,                               // push1 [ save 1 byte ]
+	0x1a,                               // eq?
+	0x2f, 0x02,                         // bt 02 [ save 4 bytes ]
+	0x87, 0x02,                         // lap 02
+	0xa5, 0x01,                         // sat 01
+	0x38, PATCH_UINT16(0x024d),         // pushi amount [ hard-coded for PC ]
+	0x76,                               // push0
+	0x85, 0x00,                         // lat 00
+	0x4a, 0x04,                         // send 04 [ temp0 amount? ]
+	0xa5, 0x02,                         // sat 02
+	0x81, 0x19,                         // lag 19  [ dialog ]
+	0x2e, PATCH_UINT16(0x0092),         // bt 0092 [ skip messages if dialog ]
+	PATCH_END
+};
+
 // The baby antwerps in room 78 lockup the game if they get in ego's way when
 //  exiting south. They also crash the interpreter if they wander too far off
 //  the screen. These problems also occur in Sierra's interpreter.
@@ -8071,6 +8125,7 @@ static const uint16 qfg1vgaPatchMacLogoIntroSkip[] = {
 
 //          script, description,                                      signature                            patch
 static const SciScriptPatcherEntry qfg1vgaSignatures[] = {
+	{  true,     0, "inventory weight warning",                    1, qfg1vgaSignatureInventoryWeightWarn, qfg1vgaPatchInventoryWeightWarn },
 	{  true,    41, "moving to castle gate",                       1, qfg1vgaSignatureMoveToCastleGate,    qfg1vgaPatchMoveToCastleGate },
 	{  true,    55, "healer's hut, no delay for buy/steal",        1, qfg1vgaSignatureHealerHutNoDelay,    qfg1vgaPatchHealerHutNoDelay },
 	{  true,    73, "brutus script freeze glitch",                 1, qfg1vgaSignatureBrutusScriptFreeze,  qfg1vgaPatchBrutusScriptFreeze },





More information about the Scummvm-git-logs mailing list