[Scummvm-cvs-logs] SF.net SVN: scummvm: [26657] scummvm/trunk/backends/platform/wince

knakos at users.sourceforge.net knakos at users.sourceforge.net
Sat Apr 28 19:31:42 CEST 2007


Revision: 26657
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26657&view=rev
Author:   knakos
Date:     2007-04-28 10:31:41 -0700 (Sat, 28 Apr 2007)

Log Message:
-----------
cleanup, implement new default action mappings, bump action version, enable keybinding at launcher, fix quit dialog looks

Modified Paths:
--------------
    scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
    scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h

Modified: scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2007-04-28 17:28:43 UTC (rev 26656)
+++ scummvm/trunk/backends/platform/wince/CEActionsSmartphone.cpp	2007-04-28 17:31:41 UTC (rev 26657)
@@ -1,5 +1,5 @@
 /* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2006 The ScummVM project
+ * Copyright (C) 2001-2007 The ScummVM project
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -20,25 +20,15 @@
  *
  */
 
-//#define SIMU_SMARTPHONE 1
-
-//#ifdef WIN32_PLATFORM_WFSP
-
 #include "common/stdafx.h"
 #include "CEActionsSmartphone.h"
 #include "EventsBuffer.h"
-
 #include "gui/message.h"
-
 #include "scumm/scumm.h"
-
 #include "common/config-manager.h"
-
 #include "gui/KeysDialog.h"
 
-#ifdef _WIN32_WCE
 #define		KEY_ALL_SKIP	3457
-#endif
 
 const String smartphoneActionNames[] = {
 	"Up",
@@ -53,14 +43,11 @@
 	"FT Cheat",
 	"Bind Keys",
 	"Keyboard",
-	"Rotate"
+	"Rotate",
+	"Quit"
 };
 
-#ifdef SIMU_SMARTPHONE
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { 0x111, 0x112, 0x114, 0x113, 0x11a, 0x11b, VK_LWIN, VK_ESCAPE, VK_F8, 0, VK_RETURN, 0, 0 };
-#else
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { '4', '6', '8', '2', 0x11a, 0x11b, '0', VK_ESCAPE, '9', 0, VK_RETURN, 0, 0 };
-#endif
+const int ACTIONS_SMARTPHONE_DEFAULT[] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, SDLK_F1, SDLK_F2, SDLK_F3, SDLK_ESCAPE, SDLK_9, SDLK_8, SDLK_F4, SDLK_RETURN, SDLK_5, SDLK_0 };
 
 void CEActionsSmartphone::init() {
 	_instance = new CEActionsSmartphone();
@@ -98,22 +85,18 @@
 	_CESystem = static_cast<OSystem_WINCE3*>(mainSystem);
 
 	GUI_Actions::initInstanceMain(mainSystem);
-	// Mouse Up
+
+	// These actions are always on
 	_action_enabled[SMARTPHONE_ACTION_UP] = true;
-	// Mouse Down
 	_action_enabled[SMARTPHONE_ACTION_DOWN] = true;
-	// Mouse Left
 	_action_enabled[SMARTPHONE_ACTION_LEFT] = true;
-	// Mouse Right
 	_action_enabled[SMARTPHONE_ACTION_RIGHT] = true;
-	// Left Click
 	_action_enabled[SMARTPHONE_ACTION_LEFTCLICK] = true;
-	// Right Click
 	_action_enabled[SMARTPHONE_ACTION_RIGHTCLICK] = true;
-	// Show virtual keyboard
 	_action_enabled[SMARTPHONE_ACTION_KEYBOARD] = true;
-	// Rotate display
 	_action_enabled[SMARTPHONE_ACTION_ROTATE] = true;
+	_action_enabled[SMARTPHONE_ACTION_QUIT] = true;
+	_action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
 }
 
 void CEActionsSmartphone::initInstanceGame() {
@@ -239,9 +222,14 @@
 		case SMARTPHONE_ACTION_ROTATE:
 			_CESystem->smartphone_rotate_display();
 			return true;
+		case SMARTPHONE_ACTION_QUIT:
+			{
+				GUI::MessageDialog alert("   Are you sure you want to quit ?   ", "Yes", "No");
+				if (alert.runModal() == GUI::kMessageOK)
+					_mainSystem->quit();
+				return true;
+			}
 	}
 
 	return false;
 }
-
-//#endif

Modified: scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h
===================================================================
--- scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h	2007-04-28 17:28:43 UTC (rev 26656)
+++ scummvm/trunk/backends/platform/wince/CEActionsSmartphone.h	2007-04-28 17:31:41 UTC (rev 26657)
@@ -1,5 +1,5 @@
 /* ScummVM - Scumm Interpreter
- * Copyright (C) 2001-2006 The ScummVM project
+ * Copyright (C) 2001-2007 The ScummVM project
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -23,36 +23,32 @@
 #ifndef CEACTIONSSMARTPHONE
 #define CEACTIONSSMARTPHONE
 
-//#ifdef WIN32_PLATFORM_WFSP
-
 #include "common/stdafx.h"
 #include "common/scummsys.h"
 #include "common/system.h"
-
-
 #include "wince-sdl.h"
 #include "gui/Key.h"
-
 #include "gui/Actions.h"
 
-#define SMARTPHONE_ACTION_VERSION 4
+#define SMARTPHONE_ACTION_VERSION 5
 
 enum smartphoneActionType {
-        SMARTPHONE_ACTION_UP = 0,
-        SMARTPHONE_ACTION_DOWN,
-        SMARTPHONE_ACTION_LEFT,
-        SMARTPHONE_ACTION_RIGHT,
-        SMARTPHONE_ACTION_LEFTCLICK,
-        SMARTPHONE_ACTION_RIGHTCLICK,
-        SMARTPHONE_ACTION_SAVE,
-        SMARTPHONE_ACTION_SKIP,
-        SMARTPHONE_ACTION_ZONE,
-		SMARTPHONE_ACTION_FT_CHEAT,
-		SMARTPHONE_ACTION_BINDKEYS,
-		SMARTPHONE_ACTION_KEYBOARD,
-		SMARTPHONE_ACTION_ROTATE,
+	SMARTPHONE_ACTION_UP = 0,
+	SMARTPHONE_ACTION_DOWN,
+	SMARTPHONE_ACTION_LEFT,
+	SMARTPHONE_ACTION_RIGHT,
+	SMARTPHONE_ACTION_LEFTCLICK,
+	SMARTPHONE_ACTION_RIGHTCLICK,
+	SMARTPHONE_ACTION_SAVE,
+	SMARTPHONE_ACTION_SKIP,
+	SMARTPHONE_ACTION_ZONE,
+	SMARTPHONE_ACTION_FT_CHEAT,
+	SMARTPHONE_ACTION_BINDKEYS,
+	SMARTPHONE_ACTION_KEYBOARD,
+	SMARTPHONE_ACTION_ROTATE,
+	SMARTPHONE_ACTION_QUIT,
 
-		SMARTPHONE_ACTION_LAST
+	SMARTPHONE_ACTION_LAST
 };
 
 
@@ -78,5 +74,3 @@
 	};
 
 #endif
-
-//#endif


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