[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.120,2.121 scumm.h,1.135,1.136 scummvm.cpp,2.40,2.41

James Brown ender at users.sourceforge.net
Thu Jan 16 04:48:13 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv6113

Modified Files:
	script_v8.cpp scumm.h scummvm.cpp 
Log Message:
Some cleanup, implementation of setKeyScript (F1 now attempts to start the save/load menu, albiet fails due to a crash in BlastText)


Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.120
retrieving revision 2.121
diff -u -d -r2.120 -r2.121
--- script_v8.cpp	16 Jan 2003 11:40:47 -0000	2.120
+++ script_v8.cpp	16 Jan 2003 12:47:34 -0000	2.121
@@ -1466,7 +1466,8 @@
 		warning("o8_kernelSetFunctions: saveGameStampScreenshot(%d, %d, %d, %d, %d, %d)", args[1], args[2], args[3], args[4], args[5], args[6]);
 		break;
 	case 29:	// setKeyScript
-		warning("o8_kernelSetFunctions: setKeyScript(%d, %d)", args[1], args[2]);
+		keyScriptKey = args[1];
+		keyScriptNo = args[2];
 		break;
 	case 30:	// killAllScriptsButMe
 		warning("o8_kernelSetFunctions: killAllScriptsButMe()");
@@ -1515,8 +1516,19 @@
 	case 0x74:	// isPointInBox
 		push(checkXYInBoxBounds(args[3], args[1], args[2]));
 		break;
-	case 0xCE:		// getRGBSlot
 	case 0xD3:		// getKeyState
+		switch(args[1]) {
+			case 0x14B:	//	Left Arrow depressed?
+			case 0x14D:	//	Right Arrow depressed?
+				push(0);
+				break;
+			default:
+				warning("getKeyState(0x%X)\n", args[1]);
+				push(0);
+				break;
+		}
+		break;
+	case 0xCE:		// getRGBSlot
 	case 0xD7:		// getBox
 		push(0);
 		warning("o8_kernelGetFunctions: default case 0x%x (len = %d)", args[0], len);
@@ -1541,8 +1553,8 @@
 		break;
 	}
 	case 0xD9:		// actorHit
+		warning("actorHit(%d,%d,%d)", args[3], args[2], args[1]);
 		push(0);
-		warning("o8_kernelGetFunctions: default case 0x%x (len = %d)", args[0], len);
 		break;
 	case 0xDA:		// lipSyncWidth
 	case 0xDB:		// lipSyncHeight

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- scumm.h	16 Jan 2003 00:40:19 -0000	1.135
+++ scumm.h	16 Jan 2003 12:47:34 -0000	1.136
@@ -330,6 +330,8 @@
 	int checkKeyHit();
 	void convertKeysToClicks();
 
+	int keyScriptKey, keyScriptNo;
+
 	/* Random number generation */
 	RandomSource _rnd;
 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -d -r2.40 -r2.41
--- scummvm.cpp	16 Jan 2003 00:40:19 -0000	2.40
+++ scummvm.cpp	16 Jan 2003 12:47:34 -0000	2.41
@@ -1146,6 +1146,11 @@
 	if (!_lastKeyHit)
 		return;
 
+	if (keyScriptNo && (keyScriptKey = _lastKeyHit)) {
+		runScript(keyScriptNo, 0, 0, 0);
+		return;
+	}
+
 	if (_lastKeyHit == KEY_SET_OPTIONS) {
 		setOptions();
 		return;





More information about the Scummvm-git-logs mailing list