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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Nov 22 01:20:01 CET 2010


Revision: 54414
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54414&view=rev
Author:   thebluegr
Date:     2010-11-22 00:20:00 +0000 (Mon, 22 Nov 2010)

Log Message:
-----------
SCI: Patched the QFG3 character import screen the same way as with QFG2

This prevents random crashes and slow refreshing, same as with QFG2

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-11-21 23:43:14 UTC (rev 54413)
+++ scummvm/trunk/engines/sci/engine/script_patches.cpp	2010-11-22 00:20:00 UTC (rev 54414)
@@ -747,11 +747,38 @@
 
 //    script, description,                                      magic DWORD,                                  adjust
 const SciScriptSignature qfg2Signatures[] = {
-	{    944, "import dialog continuous calls",                 1, PATCH_MAGICDWORD(0x20, 0x30, 0x0b, 0x00),    -1, qfg2SignatureImportDialog, qfg2PatchImportDialog },
+	{    944, "import dialog continuous calls",                 1, PATCH_MAGICDWORD(0x20, 0x30, 0x0b, 0x00),  -1, qfg2SignatureImportDialog, qfg2PatchImportDialog },
 	SCI_SIGNATUREENTRY_TERMINATOR
 };
 
 // ===========================================================================
+// Patch for the import screen in QFG3, same as the one for QFG2 above
+const byte qfg3SignatureImportDialog[] = {
+	15,
+	0x63, 0x2a,       // pToa text
+	0x31, 0x0b,       // bnt [next state]
+	0x7a,             // push2
+	0x39, 0x03,       // pushi 03
+	0x36,             // push
+	0x43, 0x72, 0x04, // callk Memory 4
+	0x35, 0x00,       // ldi 00
+	0x65, 0x2a,       // aTop text
+	0
+};
+
+const uint16 qfg3PatchImportDialog[] = {
+	PATCH_ADDTOOFFSET | +4,
+	0x48,             // ret
+	PATCH_END
+};
+
+//    script, description,                                      magic DWORD,                                  adjust
+const SciScriptSignature qfg3Signatures[] = {
+	{    944, "import dialog continuous calls",                 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a),  -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
+	SCI_SIGNATUREENTRY_TERMINATOR
+};
+
+// ===========================================================================
 //  script 298 of sq4/floppy has an issue. object "nest" uses another property
 //   which isn't included in property count. We return 0 in that case, the game
 //   adds it to nest::x. The problem is that the script also checks if x exceeds
@@ -975,6 +1002,9 @@
 	case GID_QFG2:
 		signatureTable = qfg2Signatures;
 		break;
+	case GID_QFG3:
+		signatureTable = qfg3Signatures;
+		break;
 	case GID_SQ4:
 		signatureTable = sq4Signatures;
 		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