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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jan 28 20:57:14 CET 2010


Revision: 47648
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47648&view=rev
Author:   thebluegr
Date:     2010-01-28 19:57:14 +0000 (Thu, 28 Jan 2010)

Log Message:
-----------
SCI2.1: Added a dummy function for kRobot (with some info on its parameters), assigned IsOnMe to OnMe (needs verification, but seems to be correct) and changed kSave(8) to return nonzero. The menu of the Phantasmagoria demo is now shown, together with its creepy music :)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kernel.h
    scummvm/trunk/engines/sci/engine/kernel32.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-01-28 19:28:56 UTC (rev 47647)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-01-28 19:57:14 UTC (rev 47648)
@@ -357,6 +357,9 @@
 	// SCI2.1 Kernel Functions
 	DEFUN("Save", kSave, ".*"),
 	DEFUN("List", kList, ".*"),
+	DEFUN("Robot", kRobot, ".*"),
+	DEFUN("IsOnMe", kOnMe, "iio.*"),	// TODO: this seems right, but verify...
+
 #endif
 
 	// its a stub, but its needed for Pharkas to work

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-01-28 19:28:56 UTC (rev 47647)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-01-28 19:57:14 UTC (rev 47648)
@@ -468,6 +468,7 @@
 // SCI2.1 Kernel Functions
 reg_t kSave(EngineState *s, int argc, reg_t *argv);
 reg_t kList(EngineState *s, int argc, reg_t *argv);
+reg_t kRobot(EngineState *s, int argc, reg_t *argv);
 
 #endif
 

Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-01-28 19:28:56 UTC (rev 47647)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp	2010-01-28 19:57:14 UTC (rev 47648)
@@ -634,6 +634,10 @@
 	case 2: // GetSaveDir
 		// Yay! Reusing the old kernel function!
 		return kGetSaveDir(s, argc - 1, argv + 1);
+	case 8:
+		// TODO
+		// This function has to return something other than 0 to proceed
+		return s->r_acc;
 	default:
 		warning("Unknown/unhandled kSave subop %d", argv[0].toUint16());
 	}

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-28 19:28:56 UTC (rev 47647)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-28 19:57:14 UTC (rev 47648)
@@ -1089,6 +1089,36 @@
 	return s->r_acc;
 }
 
+reg_t kRobot(EngineState *s, int argc, reg_t *argv) {
+
+	int16 subop = argv[0].toUint16();
+
+	switch (subop) {
+		case 0: { // init
+			int id = argv[1].toUint16();
+			reg_t obj = argv[2];
+			int16 flag = argv[3].toSint16();
+			int16 x = argv[4].toUint16();
+			int16 y = argv[5].toUint16();
+			warning("kRobot(init), id %d, obj %04x:%04x, flag %d, x=%d, y=%d", id, PRINT_REG(obj), flag, x, y);
+			}
+			break;
+		case 4: {	// start
+				int id = argv[1].toUint16();
+				warning("kRobot(start), id %d", id);
+			}
+			break;
+		case 8: // sync
+			//warning("kRobot(sync), obj %04x:%04x", PRINT_REG(argv[1]));
+			break;
+		default:
+			warning("kRobot(%d)", subop);
+			break;
+	}
+
+	return s->r_acc;
+}
+
 reg_t kSetVideoMode(EngineState *s, int argc, reg_t *argv) {
 	// This call is used for KQ6's intro. It has one parameter, which is
 	// 1 when the intro begins, and 0 when it ends. It is suspected that


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