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

bluegr bluegr at gmail.com
Sat Dec 1 20:40:31 CET 2018


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:
e6dbdb880f SCI32: Fix QFG4 fortune teller crash (#1421)


Commit: e6dbdb880fc436df317fcf5e6636b371592bc5d0
    https://github.com/scummvm/scummvm/commit/e6dbdb880fc436df317fcf5e6636b371592bc5d0
Author: Vhati (tvtronix at yahoo.com)
Date: 2018-12-01T21:40:28+02:00

Commit Message:
SCI32: Fix QFG4 fortune teller crash (#1421)

Fixes room disposal when leaving Magda's wagon, bug #10778

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 07604da..29ec62d 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -8027,6 +8027,31 @@ 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.
@@ -8231,6 +8256,7 @@ static const SciScriptPatcherEntry qfg4Signatures[] = {
 	{  true,   320, "fix pathfinding at the inn",                  1, qg4InnPathfindingSignature,    qg4InnPathfindingPatch },
 	{  true,   320, "fix talking to absent innkeeper",             1, qfg4AbsentInnkeeperSignature,  qfg4AbsentInnkeeperPatch },
 	{  true,   440, "fix setLooper calls (1/2)",                   1, qg4SetLooperSignature1,        qg4SetLooperPatch1 },
+	{  true,   470, "fix Magda room disposal",                     1, qfg4MagdaDisposalSignature,    qfg4MagdaDisposalPatch },
 	{  true,   530, "fix setLooper calls (1/2)",                   4, qg4SetLooperSignature1,        qg4SetLooperPatch1 },
 	{  true,   535, "fix setLooper calls (1/2)",                   4, qg4SetLooperSignature1,        qg4SetLooperPatch1 },
 	{  true,   541, "fix setLooper calls (1/2)",                   5, qg4SetLooperSignature1,        qg4SetLooperPatch1 },





More information about the Scummvm-git-logs mailing list