aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorColin Snover2017-01-16 12:53:35 -0600
committerColin Snover2017-01-16 12:54:39 -0600
commit88981b8db6881cc6c40a0409e27d49aca4835057 (patch)
tree146ccdd16b6590c61e7fc57543bd6b64d4fc8ecf /engines/sci/engine
parent5d18151b55d4bc56e6c88909668f247c75c638d4 (diff)
downloadscummvm-rg350-88981b8db6881cc6c40a0409e27d49aca4835057.tar.gz
scummvm-rg350-88981b8db6881cc6c40a0409e27d49aca4835057.tar.bz2
scummvm-rg350-88981b8db6881cc6c40a0409e27d49aca4835057.zip
SCI32: Script patch priority drawing bug in MGDX
This fixes the horse at the fountain drawing on top of the fountain instead of behind it.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/script_patches.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 968d72747a..c542be7ef2 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2962,9 +2962,31 @@ static const uint16 mothergooseHiresPatchLogo[] = {
PATCH_END
};
+// After finishing the rhyme at the fountain, a horse will appear and walk
+// across the screen. The priority of the horse is set too high, so it is
+// rendered in front of the fountain instead of behind the fountain. This patch
+// corrects the priority so the horse draws behind the fountain.
+//
+// Applies to at least: English CD from King's Quest Collection
+// Responsible method: rhymeScript::changeState
+static const uint16 mothergooseHiresSignatureHorse[] = {
+ SIG_MAGICDWORD,
+ 0x39, 0x4a, // pushi $4a (setPri)
+ 0x78, // push1
+ 0x38, SIG_UINT16(0xb7), // pushi $b7
+ SIG_END
+};
+
+static const uint16 mothergooseHiresPatchHorse[] = {
+ PATCH_ADDTOOFFSET(3),
+ 0x38, PATCH_UINT16(0x59),
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry mothergooseHiresSignatures[] = {
{ true, 108, "bad logo rendering", 1, mothergooseHiresSignatureLogo, mothergooseHiresPatchLogo },
+ { true, 318, "bad horse z-index", 1, mothergooseHiresSignatureHorse, mothergooseHiresPatchHorse },
SCI_SIGNATUREENTRY_TERMINATOR
};