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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Nov 17 19:46:30 CET 2010


Revision: 54298
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54298&view=rev
Author:   thebluegr
Date:     2010-11-17 18:46:29 +0000 (Wed, 17 Nov 2010)

Log Message:
-----------
SCI: Fixed the speed in the intro of PQ2, version 1.002.011 (bug #3102071)

In version 1.002.011, global 3, used for timing, is incorrectly initialized
to 0, whereas it should be 6 (like in other versions). Initializing it to
the correct value fixes the speed in the intro. This has been based on the
patch for that version by NewRisingSun(NRS) / Belzorash

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

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-11-17 18:22:22 UTC (rev 54297)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-11-17 18:46:29 UTC (rev 54298)
@@ -258,6 +258,18 @@
 	if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1)
 		address += scr->getScriptSize();
 
+	// Bugfix for the intro speed in PQ2 version 1.002.011.
+	// This is taken from the patch by NewRisingSun(NRS) / Belzorash. Global 3
+	// is used for timing during the intro, and in the problematic version it's
+	// initialized to 0, whereas it's 6 in other versions. Thus, we assign it
+	// to 6 here, fixing the speed of the introduction. Refer to bug #3102071.
+	if (g_sci->getGameId() == GID_PQ2 && script == 200) {
+		if (s->variables[VAR_GLOBAL][3].isNull()) {
+			warning("Fixing speed in the intro of PQ2, version 1.002.011");
+			s->variables[VAR_GLOBAL][3] = make_reg(0, 6);
+		}
+	}
+
 	return make_reg(scriptSeg, address);
 }
 


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