[Scummvm-cvs-logs] SF.net SVN: scummvm: [21815] scummvm/trunk/engines/cine

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Apr 11 16:32:01 CEST 2006


Revision: 21815
Author:   sev
Date:     2006-04-11 16:31:03 -0700 (Tue, 11 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21815&view=rev

Log Message:
-----------
Add F1-F10 keymappings like in original engine.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/main_loop.cpp
    scummvm/trunk/engines/cine/various.cpp
    scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp	2006-04-11 22:47:53 UTC (rev 21814)
+++ scummvm/trunk/engines/cine/main_loop.cpp	2006-04-11 23:31:03 UTC (rev 21815)
@@ -59,6 +59,59 @@
 		case OSystem::EVENT_QUIT:
 			g_system->quit();
 			break;
+		case OSystem::EVENT_KEYDOWN:
+			switch (event.kbd.keycode) {
+			case 282: // F1
+				if (allowPlayerInput) {
+					playerCommand = 0; // EXAMINE
+					makeCommandLine();
+				}
+				break;
+			case 283: // F2
+				if (allowPlayerInput) {
+					playerCommand = 1; // TAKE
+					makeCommandLine();
+				}
+				break;
+			case 284: // F3
+				if (allowPlayerInput) {
+					playerCommand = 2; // INVENTORY
+					makeCommandLine();
+				}
+				break;
+			case 285: // F4
+				if (allowPlayerInput) {
+					playerCommand = 3; // USE
+					makeCommandLine();
+				}
+				break;
+			case 286: // F5
+				if (allowPlayerInput) {
+					playerCommand = 4; // ACTIVATE
+					makeCommandLine();
+				}
+				break;
+			case 287: // F6
+				if (allowPlayerInput) {
+					playerCommand = 5; // SPEAK
+					makeCommandLine();
+				}
+				break;
+			case 290: // F9
+				if (allowPlayerInput) {
+					makeActionMenu();
+					makeCommandLine();
+				}
+				break;
+			case 291: // F10
+				if (allowPlayerInput) {
+					makeSystemMenu();
+				}
+				break;
+			default:
+				break;
+			}
+			break;
 		default:
 			break;
 		}

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2006-04-11 22:47:53 UTC (rev 21814)
+++ scummvm/trunk/engines/cine/various.cpp	2006-04-11 23:31:03 UTC (rev 21815)
@@ -1797,6 +1797,25 @@
 	gfxFuncGen2();
 }
 
+void makeActionMenu(void) {
+	uint16 mouseButton;
+	uint16 mouseX;
+	uint16 mouseY;
+
+	getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY);
+
+	if (gameType == Cine::GID_OS) {
+		playerCommand = makeMenuChoice2(defaultActionCommand, 6, mouseX, mouseY, 70);
+
+		if (playerCommand >= 8000) {
+			playerCommand -= 8000;
+			canUseOnObject = 1;
+		}
+	} else {
+		playerCommand =  makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
+	}
+}
+
 uint16 executePlayerInput(void) {
 	uint16 var_5E;
 	uint16 var_2;
@@ -1896,17 +1915,7 @@
 						makeSystemMenu();
 					}
 
-					if (gameType == Cine::GID_OS) {
-						playerCommand = makeMenuChoice2(defaultActionCommand, 6, mouseX, mouseY, 70);
-
-						if (playerCommand >= 8000) {
-							playerCommand -= 8000;
-							canUseOnObject = 1;
-						}
-					} else {
-						playerCommand =  makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
-					}
-
+					makeActionMenu();
 					makeCommandLine();
 				} else {
 					int16 objIdx;

Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h	2006-04-11 22:47:53 UTC (rev 21814)
+++ scummvm/trunk/engines/cine/various.h	2006-04-11 23:31:03 UTC (rev 21815)
@@ -40,6 +40,9 @@
 
 int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
 int16 makeMenuChoice2(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width);
+void makeCommandLine(void);
+void makeSystemMenu(void);
+void makeActionMenu(void);
 
 extern int16 allowSystemMenu;
 


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