[Scummvm-cvs-logs] CVS: scummvm/backends/wince CEActionsPocket.cpp,1.17,1.18 CEActionsPocket.h,1.8,1.9 CEActionsSmartphone.cpp,1.14,1.15 CEActionsSmartphone.h,1.8,1.9

Nicolas Bacca arisme at users.sourceforge.net
Sun Jan 29 15:24:04 CET 2006


Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1493

Modified Files:
	CEActionsPocket.cpp CEActionsPocket.h CEActionsSmartphone.cpp 
	CEActionsSmartphone.h 
Log Message:
Knakos patch & Smartphone fixes

Index: CEActionsPocket.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsPocket.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- CEActionsPocket.cpp	18 Jan 2006 17:39:33 -0000	1.17
+++ CEActionsPocket.cpp	29 Jan 2006 23:23:17 -0000	1.18
@@ -30,6 +30,8 @@
 
 #include "common/config-manager.h"
 
+#include "gui/KeysDialog.h"
+
 #ifdef _WIN32_WCE
 #define		KEY_ALL_SKIP	3457
 #endif
@@ -47,7 +49,8 @@
 	"Free look",
 	"Zoom up",
 	"Zoom down",
-	"FT Cheat"
+	"FT Cheat",
+	"Bind Keys"
 };
 
 void CEActionsPocket::init(GameDetector &detector) {
@@ -165,6 +168,8 @@
 	// FT Cheat
 	_action_enabled[POCKET_ACTION_FT_CHEAT] = true;
 	_key_action[POCKET_ACTION_FT_CHEAT].setAscii(86); // shift-V
+	// Key bind method
+	_action_enabled[POCKET_ACTION_BINDKEYS] = true;
 }
 
 
@@ -172,6 +177,8 @@
 }
 
 bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
+	static bool keydialogrunning = false;
+
 	if (!pushed) {
 		switch(action) {
 			case POCKET_ACTION_RIGHTCLICK:
@@ -220,9 +227,20 @@
 			_CESystem->swap_zoom_down();
 			return true;
 		case POCKET_ACTION_QUIT:
-			GUI::MessageDialog alert("Do you want to quit ?", "Yes", "No");
-			if (alert.runModal() == GUI::kMessageOK)
-				_mainSystem->quit();
+			{
+				GUI::MessageDialog alert("Do you want to quit ?", "Yes", "No");
+				if (alert.runModal() == GUI::kMessageOK)
+					_mainSystem->quit();
+				return true;
+			}
+		case POCKET_ACTION_BINDKEYS:
+			if (!keydialogrunning) {
+				keydialogrunning = true;
+				GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
+				keysDialog->runModal();
+				delete keysDialog;
+				keydialogrunning = false;
+			}
 			return true;
 	}
 	return false;

Index: CEActionsPocket.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsPocket.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CEActionsPocket.h	18 Jan 2006 17:39:33 -0000	1.8
+++ CEActionsPocket.h	29 Jan 2006 23:23:17 -0000	1.9
@@ -46,11 +46,12 @@
         POCKET_ACTION_RIGHTCLICK,
         POCKET_ACTION_CURSOR,
         POCKET_ACTION_FREELOOK,
-	POCKET_ACTION_ZOOM_UP,
-	POCKET_ACTION_ZOOM_DOWN,
-	POCKET_ACTION_FT_CHEAT,
+		POCKET_ACTION_ZOOM_UP,
+		POCKET_ACTION_ZOOM_DOWN,
+		POCKET_ACTION_FT_CHEAT,
+		POCKET_ACTION_BINDKEYS,
 
-	POCKET_ACTION_LAST
+		POCKET_ACTION_LAST
 };
 
 class CEActionsPocket : public GUI::Actions {

Index: CEActionsSmartphone.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsSmartphone.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CEActionsSmartphone.cpp	18 Jan 2006 17:39:33 -0000	1.14
+++ CEActionsSmartphone.cpp	29 Jan 2006 23:23:17 -0000	1.15
@@ -33,6 +33,8 @@
 
 #include "common/config-manager.h"
 
+#include "gui/KeysDialog.h"
+
 #ifdef _WIN32_WCE
 #define		KEY_ALL_SKIP	3457
 #endif
@@ -47,13 +49,14 @@
 	"Save",
 	"Skip",
 	"Zone",
-	"FT Cheat"
+	"FT Cheat",
+	"Bind Keys"
 };
 
 #ifdef SIMU_SMARTPHONE
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { 0x111, 0x112, 0x114, 0x113, 0x11a, 0x11b, VK_LWIN, VK_ESCAPE, VK_F8, 0 };
+const int ACTIONS_SMARTPHONE_DEFAULT[] = { 0x111, 0x112, 0x114, 0x113, 0x11a, 0x11b, VK_LWIN, VK_ESCAPE, VK_F8, 0, VK_RETURN };
 #else
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { '4', '6', '8', '2', 0x11a, 0x11b, '0', VK_ESCAPE, '9', 0 };
+const int ACTIONS_SMARTPHONE_DEFAULT[] = { '4', '6', '8', '2', 0x11a, 0x11b, '0', VK_ESCAPE, '9', 0, VK_RETURN };
 #endif
 
 void CEActionsSmartphone::init(GameDetector &detector) {
@@ -150,6 +153,8 @@
 	// FT Cheat
 	_action_enabled[SMARTPHONE_ACTION_FT_CHEAT] = true;
 	_key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V
+	// Bind keys
+	_action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
 }
 
 
@@ -157,6 +162,8 @@
 }
 
 bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
+	static bool keydialogrunning = false;
+
 	if (!pushed) {
 		switch (action) {
 			case SMARTPHONE_ACTION_RIGHTCLICK:
@@ -201,6 +208,15 @@
 		case SMARTPHONE_ACTION_ZONE:
 			_CESystem->switch_zone();
 			return true;
+		case SMARTPHONE_ACTION_BINDKEYS:
+			if (!keydialogrunning) {
+				keydialogrunning = true;
+				GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
+				keysDialog->runModal();
+				delete keysDialog;
+				keydialogrunning = false;
+			}
+			return true;
 	}
 
 	return false;

Index: CEActionsSmartphone.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsSmartphone.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CEActionsSmartphone.h	18 Jan 2006 17:39:33 -0000	1.8
+++ CEActionsSmartphone.h	29 Jan 2006 23:23:17 -0000	1.9
@@ -47,9 +47,10 @@
         SMARTPHONE_ACTION_SAVE,
         SMARTPHONE_ACTION_SKIP,
         SMARTPHONE_ACTION_ZONE,
-	SMARTPHONE_ACTION_FT_CHEAT,
+		SMARTPHONE_ACTION_FT_CHEAT,
+		SMARTPHONE_ACTION_BINDKEYS,
 
-	SMARTPHONE_ACTION_LAST
+		SMARTPHONE_ACTION_LAST
 };
 
 





More information about the Scummvm-git-logs mailing list