[Scummvm-cvs-logs] SF.net SVN: scummvm:[55017] scummvm/trunk/engines/sci/engine/script_patches .cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Dec 22 23:18:22 CET 2010


Revision: 55017
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55017&view=rev
Author:   thebluegr
Date:     2010-12-22 22:18:21 +0000 (Wed, 22 Dec 2010)

Log Message:
-----------
SCI: Fixed bug #3037618 - "PQ2 : Restoring in Scuba Van causes Parser Issues"

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/script_patches.cpp

Modified: scummvm/trunk/engines/sci/engine/script_patches.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script_patches.cpp	2010-12-22 21:08:26 UTC (rev 55016)
+++ scummvm/trunk/engines/sci/engine/script_patches.cpp	2010-12-22 22:18:21 UTC (rev 55017)
@@ -719,6 +719,32 @@
 };
 
 // ===========================================================================
+// PQ2 does not call SetSynonyms in Game::replay() (i.e. when loading a game).
+// This results in invalid synonyms in some rooms. We patch Game::replay() to
+// call SetSynonyms properly, by replacing the kDoSoundResumeAfterRestore
+// kernel call, which is a stub in ScummVM. Fixes bug #3037618.
+const byte pq2SignatureReplay[] = {
+	6,
+	0x78,             // push1
+	0x39, 0x07,       // pushi 07
+	0x43, 0x31, 0x02, // callk DoSound[31] 02
+	0
+};
+
+const uint16 pq2PatchReplay[] = {
+	0x78,             // push1 (parameter count)
+	0x89, 0x06,       // lsg 06
+	0x43, 0x26, 0x02, // callk SetSynonyms[26] 02
+	PATCH_END
+};
+
+//    script, description,                                      magic DWORD,                                  adjust
+const SciScriptSignature pq2Signatures[] = {
+	{    994, "replay synonyms issue",                       1, PATCH_MAGICDWORD(0x39, 0x07, 0x43, 0x31),     -1, pq2SignatureReplay,    pq2PatchReplay },
+	SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
 //  script 215 of qfg1vga pointBox::doit actually processes button-presses
 //   during fighting with monsters. It strangely also calls kGetEvent. Because
 //   the main User::doit also calls kGetEvent it's pure luck, where the event
@@ -1196,6 +1222,9 @@
 	case GID_MOTHERGOOSE256:
 		signatureTable = mothergoose256Signatures;
 		break;
+	case GID_PQ2:
+		signatureTable = pq2Signatures;
+		break;
 	case GID_QFG1VGA:
 		signatureTable = qfg1vgaSignatures;
 		break;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list