[Scummvm-git-logs] scummvm master -> 817c9e77aa6f2c40571e807888bace46b08d0142

csnover csnover at users.noreply.github.com
Sat Sep 16 07:21:55 CEST 2017


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:
817c9e77aa SCI32: Fix bad play call in Shivers room 23090


Commit: 817c9e77aa6f2c40571e807888bace46b08d0142
    https://github.com/scummvm/scummvm/commit/817c9e77aa6f2c40571e807888bace46b08d0142
Author: David Fioramonti (dafioram at gmail.com)
Date: 2017-09-15T23:44:13-05:00

Commit Message:
SCI32: Fix bad play call in Shivers room 23090

This fixes a bad play call by replacing it with a fade call.

The newRoom function In script rm23v090 (room 23090) was
calling a play function with 5 arguments, but the play
function only takes 4 arguments. Since it looks like a fade
call it has been replaced with that.

Fixes Trac#10200.

snover helped.

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 2200657..018b408 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -115,6 +115,8 @@ static const char *const selectorNameTable[] = {
 	"posn",         // SCI2 benchmarking script
 	"detailLevel",  // GK2 benchmarking
 	"view",         // RAMA benchmarking
+	"fade",         // Shivers sound fix
+	"play",         // Shivers sound fix
 	"test",         // Torin
 	"get",          // Torin
 	"set",          // Torin
@@ -166,6 +168,8 @@ enum ScriptPatcherSelectors {
 	SELECTOR_posn,
 	SELECTOR_detailLevel,
 	SELECTOR_view,
+	SELECTOR_fade,
+	SELECTOR_play,
 	SELECTOR_test,
 	SELECTOR_get,
 	SELECTOR_set,
@@ -6193,11 +6197,34 @@ static const uint16 shiversPatchSuperCall[] = {
 	PATCH_END
 };
 
+// When the Ixupi is present in the Gods and Items intro room, the game tries to
+// play a sound using the play selector, but its arguments are only appropriate
+// for the fade selector.
+// If the badly constructed sound object from this call ends up receiving a
+// signal at any time in the future, the game will try to send to a number and
+// crash (because the third argument to play is supposed to be a client object,
+// but here it is a number instead). Other rooms make this same call with the
+// correct fade selector, so fix the selector here to match.
+// Applies to at least: English CD
+static const uint16 shiversGodsItemsIxupiPlaySoundSignature[] = {
+	SIG_MAGICDWORD,
+	0x39, SIG_SELECTOR8(play),     // pushi 33
+	0x38, SIG_UINT16(0x06),        // pushi 0006
+	SIG_END
+};
+
+static const uint16 shiversGodsItemsIxupiPlaySoundPatch[] = {
+	0x38, PATCH_SELECTOR16(fade),  // pushi 00f3
+	0x39, 0x06,                    // pushi 06
+	PATCH_END
+};
+
 //          script, description,                                      signature                        patch
 static const SciScriptPatcherEntry shiversSignatures[] = {
 	{  true, 35170, "fix CCTV joystick interaction",               1, shiversSignatureSuperCall,     shiversPatchSuperCall },
 	{  true,   990, "fix volume & brightness sliders",             2, shiversSignatureSuperCall,     shiversPatchSuperCall },
 	{  true, 64908, "disable video benchmarking",                  1, sci2BenchmarkSignature,        sci2BenchmarkPatch },
+	{  true, 23090, "fix play call in room 23090",                 1, shiversGodsItemsIxupiPlaySoundSignature, shiversGodsItemsIxupiPlaySoundPatch },
 	SCI_SIGNATUREENTRY_TERMINATOR
 };
 





More information about the Scummvm-git-logs mailing list