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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sun Dec 27 20:16:06 CET 2009


Revision: 46656
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46656&view=rev
Author:   mthreepwood
Date:     2009-12-27 19:16:06 +0000 (Sun, 27 Dec 2009)

Log Message:
-----------
Implement kPlatform subfunctions 0 and 2, and stub 1 and 3 (CD speed and CD check). This fixes the DOS version of GK1 CD to play the SEQ's instead of the AVI's.

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

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2009-12-27 18:51:57 UTC (rev 46655)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2009-12-27 19:16:06 UTC (rev 46656)
@@ -241,6 +241,10 @@
 };
 
 enum kPlatformOps {
+	kPlatformUnk0 = 0,
+	kPlatformCDSpeed = 1,
+	kPlatformUnk2 = 2,
+	kPlatformCDCheck = 3,
 	kPlatformGetPlatform = 4,
 	kPlatformUnk5 = 5,
 	kPlatformIsHiRes = 6,
@@ -249,9 +253,24 @@
 
 reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
 	bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
-	uint16 operation = argv[0].toUint16();
 
+	// No arguments is the same as operation 0
+	uint16 operation = (argc == 1) ? argv[0].toUint16() : 0;
+
 	switch (operation) {
+	case kPlatformUnk0:
+		return make_reg(0, !isWindows);
+	case kPlatformCDSpeed:
+		// TODO: Returns CD Speed?
+		warning("STUB: kPlatform(CDSpeed)");
+		break;
+	case kPlatformUnk2:
+		// Always returns 2
+		return make_reg(0, 2);
+	case kPlatformCDCheck:
+		// TODO: Some sort of CD check?
+		warning("STUB: kPlatform(CDCheck)");
+		break;
 	case kPlatformGetPlatform:
 		return make_reg(0, (isWindows) ? kSciPlatformWindows : kSciPlatformDOS);
 	case kPlatformUnk5:
@@ -264,7 +283,7 @@
 	default:
 		warning("Unsupported kPlatform operation %d", operation);
 	}
-	
+
 	return NULL_REG;
 }
 


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