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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sat Jan 2 04:44:40 CET 2010


Revision: 46874
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46874&view=rev
Author:   mthreepwood
Date:     2010-01-02 03:44:40 +0000 (Sat, 02 Jan 2010)

Log Message:
-----------
Fix the GK1 CD intro sequence (regression from r46839, which fixed a regression from r46656). kPlatform with no arguments is different in SCI32.

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

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-01-02 01:41:39 UTC (rev 46873)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-01-02 03:44:40 UTC (rev 46874)
@@ -252,18 +252,18 @@
 };
 
 reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
-	if (argc == 0) {
-		// This is called in KQ5CD with no parameters, where
-		// it seems to do some graphics driver check. This
-		// kernel function didn't have subfunctions then.
-		// If 0 is returned, the game functions normally,
-		// otherwise all the animations show up like a
-		// slideshow (e.g. in the intro). So we return 0 :)
+	bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
+
+	if (argc == 0 && getSciVersion() < SCI_VERSION_2) {
+		// This is called in KQ5CD with no parameters, where it seems to do some graphics
+		// driver check. This kernel function didn't have subfunctions then. If 0 is
+		// returned, the game functions normally, otherwise all the animations show up 
+		// like a slideshow (e.g. in the intro). So we return 0. However, the behavior
+		// changed for kPlatform with no parameters in SCI32.
 		return NULL_REG;
 	}
 
-	bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
-	uint16 operation = argv[0].toUint16();
+	uint16 operation = (argc == 0) ? 0 : argv[0].toUint16();
 
 	switch (operation) {
 	case kPlatformUnk0:


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