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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Nov 19 19:54:06 CET 2006


Revision: 24747
          http://svn.sourceforge.net/scummvm/?rev=24747&view=rev
Author:   eriktorbjorn
Date:     2006-11-19 10:54:06 -0800 (Sun, 19 Nov 2006)

Log Message:
-----------
Don't allow the F9 and F10 keys to open menus if a menu is already open. (Might
need more testing.)

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-11-19 18:32:00 UTC (rev 24746)
+++ scummvm/trunk/engines/cine/main_loop.cpp	2006-11-19 18:54:06 UTC (rev 24747)
@@ -113,13 +113,13 @@
 				}
 				break;
 			case 290: // F9
-				if (allowPlayerInput) {
+				if (allowPlayerInput && !inMenu) {
 					makeActionMenu();
 					makeCommandLine();
 				}
 				break;
 			case 291: // F10
-				if (allowPlayerInput) {
+				if (allowPlayerInput && !inMenu) {
 					g_cine->makeSystemMenu();
 				}
 				break;
@@ -207,6 +207,7 @@
 	gfxFuncGen2();
 
 	quitFlag = 0;
+	inMenu = false;
 	allowPlayerInput = 0;
 	checkForPendingDataLoadSwitch = 0;
 

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2006-11-19 18:32:00 UTC (rev 24746)
+++ scummvm/trunk/engines/cine/various.cpp	2006-11-19 18:54:06 UTC (rev 24747)
@@ -36,6 +36,7 @@
 namespace Cine {
 
 int16 allowSystemMenu = 0;
+bool inMenu;
 
 int16 commandVar3[4];
 int16 commandVar1;
@@ -911,6 +912,8 @@
 	int16 systemCommand;
 
 	if (!allowSystemMenu) {
+		inMenu = true;
+
 		manageEvents();
 		getMouseData(mouseUpdateStatus, (uint16 *)&mouseButton,(uint16 *)&mouseX, (uint16 *)&mouseY);
 
@@ -1038,6 +1041,8 @@
 				break;
 			}
 		}
+
+		inMenu = false;
 	}
 }
 
@@ -1841,6 +1846,8 @@
 	uint16 mouseX;
 	uint16 mouseY;
 
+	inMenu = true;
+
 	getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY);
 
 	if (g_cine->getGameType() == Cine::GType_OS) {
@@ -1851,8 +1858,10 @@
 			canUseOnObject = 1;
 		}
 	} else {
-		playerCommand =  makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
+		playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70);
 	}
+
+	inMenu = false;
 }
 
 uint16 executePlayerInput(void) {

Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h	2006-11-19 18:32:00 UTC (rev 24746)
+++ scummvm/trunk/engines/cine/various.h	2006-11-19 18:54:06 UTC (rev 24747)
@@ -40,6 +40,7 @@
 void makeActionMenu(void);
 
 extern int16 allowSystemMenu;
+extern bool inMenu; 
 
 struct unk1Struct {
 	byte *ptr;


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