aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-10-12 10:41:50 -0500
committerColin Snover2016-10-14 19:43:47 -0500
commita05ae2e24ae6dcbeb29c95e045141c9500c4d589 (patch)
tree89201b514f21c88543dbafeec9012d12d894bb36 /engines
parent699a147348966dd5c12824b1e1c2b6c6e82bca41 (diff)
downloadscummvm-rg350-a05ae2e24ae6dcbeb29c95e045141c9500c4d589.tar.gz
scummvm-rg350-a05ae2e24ae6dcbeb29c95e045141c9500c4d589.tar.bz2
scummvm-rg350-a05ae2e24ae6dcbeb29c95e045141c9500c4d589.zip
SCI32: Fix slow transitions in SQ6
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/script_patches.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index f2f290fa9e..5ac4b758ba 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -4536,11 +4536,46 @@ static const SciScriptPatcherEntry sq5Signatures[] = {
#pragma mark -
#pragma mark Space Quest 6
+// After the explosion in the Quarters of Deepship 86, the game tries to perform
+// a dramatic long fade, but does this with an unreasonably large number of
+// divisions which takes tens of seconds to finish (because transitions are not
+// CPU-dependent in ScummVM).
+static const uint16 sq6SlowTransitionSignature1[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_UINT16(0x578), // pushi $0578
+ 0x51, 0x33, // class Styler
+ SIG_END
+};
+
+static const uint16 sq6SlowTransitionPatch1[] = {
+ 0x38, SIG_UINT16(180), // pushi 180
+ PATCH_END
+};
+
+// For whatever reason, SQ6 sets the default number of transition divisions to
+// be a much larger value at startup (200 vs 30) if it thinks it is running in
+// Windows. Room 410 (eulogy room) also unconditionally resets divisions to the
+// larger value.
+static const uint16 sq6SlowTransitionSignature2[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_UINT16(0xc8), // pushi $c8
+ 0x51, 0x33, // class Styler
+ SIG_END
+};
+
+static const uint16 sq6SlowTransitionPatch2[] = {
+ 0x38, SIG_UINT16(30), // pushi 30
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry sq6Signatures[] = {
+ { true, 0, "fix slow transitions", 1, sq6SlowTransitionSignature2, sq6SlowTransitionPatch2 },
{ true, 15, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 22, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
+ { true, 410, "fix slow transitions", 1, sq6SlowTransitionSignature2, sq6SlowTransitionPatch2 },
{ true, 460, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
+ { true, 500, "fix slow transitions", 1, sq6SlowTransitionSignature1, sq6SlowTransitionPatch1 },
{ true, 510, "invalid array construction", 1, sci21IntArraySignature, sci21IntArrayPatch },
{ true, 64990, "increase number of save games", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 },
{ true, 64990, "increase number of save games", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 },