aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2017-01-09 15:23:54 -0600
committerColin Snover2017-01-09 19:34:54 -0600
commite18e6399acd856231ed869812559eff1c998cef6 (patch)
tree0c0daf4117a4c6992ec226baca6c03a70d51a390 /engines
parentb895b4b075ee8b9ca327c027b620db3ea8059e8d (diff)
downloadscummvm-rg350-e18e6399acd856231ed869812559eff1c998cef6.tar.gz
scummvm-rg350-e18e6399acd856231ed869812559eff1c998cef6.tar.bz2
scummvm-rg350-e18e6399acd856231ed869812559eff1c998cef6.zip
SCI32: Fix bad rendering of Sierra logo in MGDX
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/script_patches.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 0c4f0da959..6f064368fa 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2864,6 +2864,43 @@ static const SciScriptPatcherEntry mothergoose256Signatures[] = {
#ifdef ENABLE_SCI32
#pragma mark -
+#pragma mark Mixed-up Mother Goose Deluxe
+
+// The game uses pic 10005 to render the Sierra logo, but then it also
+// initialises a logo object with view 502 on the same priority as the pic. In
+// the original interpreter, it is dumb luck which is drawn first (based on the
+// order of the memory IDs), though usually the pic is drawn first because not
+// many objects have been created at the start of the game. In ScummVM, the
+// renderer guarantees a sort order based on the creation order of screen items,
+// and since the view is created after the pic, it wins and is drawn on top.
+// This patch stops the view object from being created at all.
+//
+// Applies to at least: English CD from King's Quest Collection
+// Responsible method: sShowLogo::changeState
+static const uint16 mothergooseHiresSignatureLogo[] = {
+ 0x38, SIG_UINT16(0x8e), // pushi $8e
+ SIG_MAGICDWORD,
+ 0x76, // push0
+ 0x72, SIG_UINT16(0x82), // lofsa logo[82]
+ 0x4a, SIG_UINT16(0x04), // send $4
+ SIG_END
+};
+
+static const uint16 mothergooseHiresPatchLogo[] = {
+ 0x18, 0x18, 0x18, // waste bytes
+ 0x18, // waste bytes
+ 0x18, 0x18, 0x18, // waste bytes
+ 0x18, 0x18, 0x18, // waste bytes
+ PATCH_END
+};
+
+// script, description, signature patch
+static const SciScriptPatcherEntry mothergooseHiresSignatures[] = {
+ { true, 108, "bad logo rendering", 1, mothergooseHiresSignatureLogo, mothergooseHiresPatchLogo },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+#pragma mark -
#pragma mark Phantasmagoria
// script, description, signature patch
@@ -5147,6 +5184,10 @@ void ScriptPatcher::processScript(uint16 scriptNr, byte *scriptData, const uint3
signatureTable = mothergoose256Signatures;
break;
#ifdef ENABLE_SCI32
+ case GID_MOTHERGOOSEHIRES:
+ signatureTable = mothergooseHiresSignatures;
+ break;
+
case GID_PHANTASMAGORIA:
signatureTable = phantasmagoriaSignatures;
break;