aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince/CEActionsSmartphone.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-06-23 18:51:33 +0000
committerDavid Corrales2007-06-23 18:51:33 +0000
commitcacd7a28fd51d960947de88abbf30c487e66529d (patch)
treef3baa59853bfb307e452b86b9d93c4737b1fa6ab /backends/platform/wince/CEActionsSmartphone.cpp
parent0ac96302fe9c04df79cb01a77d19535b45fe2db0 (diff)
parent90c2210dae8c91fa8babc6b05564e15c9d445d18 (diff)
downloadscummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.gz
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.tar.bz2
scummvm-rg350-cacd7a28fd51d960947de88abbf30c487e66529d.zip
Merged the FSNode branch with trunk r27031:27680
svn-id: r27681
Diffstat (limited to 'backends/platform/wince/CEActionsSmartphone.cpp')
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp48
1 files changed, 34 insertions, 14 deletions
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index 3d85ebc68e..227318d552 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -43,7 +43,7 @@ const String smartphoneActionNames[] = {
"Save",
"Skip",
"Zone",
- "FT Cheat",
+ "Multi Function",
"Bind Keys",
"Keyboard",
"Rotate",
@@ -117,11 +117,12 @@ void CEActionsSmartphone::initInstanceGame() {
bool is_cine = (gameid == "cine");
bool is_touche = (gameid == "touche");
bool is_agi = (gameid == "agi");
+ bool is_parallaction = (gameid == "parallaction");
GUI_Actions::initInstanceGame();
// See if a right click mapping could be needed
- if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche)
+ if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_cine || is_touche || is_parallaction)
_right_click_needed = true;
// Initialize keys for different actions
@@ -130,31 +131,41 @@ void CEActionsSmartphone::initInstanceGame() {
_action_enabled[SMARTPHONE_ACTION_SAVE] = false;
else if (is_queen) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(286); // F1 key for FOTAQ
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F1 key for FOTAQ
} else if (is_sky) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(63);
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5);
} else if (is_cine) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(291); //F10
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); //F10
} else if (is_agi) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE);
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE);
+ } else if (is_parallaction) {
+ _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey('s', SDLK_s);
} else {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
- _key_action[SMARTPHONE_ACTION_SAVE].setAscii(319); // F5 key
+ _key_action[SMARTPHONE_ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F5 key
}
// Skip
_action_enabled[SMARTPHONE_ACTION_SKIP] = true;
if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche)
- _key_action[SMARTPHONE_ACTION_SKIP].setAscii(VK_ESCAPE);
+ _key_action[SMARTPHONE_ACTION_SKIP].setKey(VK_ESCAPE);
else
- _key_action[SMARTPHONE_ACTION_SKIP].setAscii(KEY_ALL_SKIP);
+ _key_action[SMARTPHONE_ACTION_SKIP].setKey(KEY_ALL_SKIP);
// Zone
_action_enabled[SMARTPHONE_ACTION_ZONE] = true;
- // FT Cheat
- _action_enabled[SMARTPHONE_ACTION_FT_CHEAT] = true;
- _key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V
+ // Multi function key
+ _action_enabled[SMARTPHONE_ACTION_MULTI] = true;
+ if (is_agi)
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog
+ else if (is_gob)
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
+ else if (gameid == "atlantis")
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
+ else
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
// Bind keys
_action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
}
@@ -176,7 +187,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
return true;
case SMARTPHONE_ACTION_SAVE:
case SMARTPHONE_ACTION_SKIP:
- case SMARTPHONE_ACTION_FT_CHEAT:
+ case SMARTPHONE_ACTION_MULTI:
EventsBuffer::simulateKey(&_key_action[action], false);
return true;
}
@@ -186,7 +197,16 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
switch (action) {
case SMARTPHONE_ACTION_SAVE:
case SMARTPHONE_ACTION_SKIP:
- case SMARTPHONE_ACTION_FT_CHEAT:
+ case SMARTPHONE_ACTION_MULTI:
+ if (action == SMARTPHONE_ACTION_SAVE && ConfMan.get("gameid") == "parallaction") {
+ // FIXME: This is a temporary solution. The engine should handle its own menus.
+ // Note that the user can accomplish this via the virtual keyboard as well, this is just for convenience
+ GUI::MessageDialog alert("Do you want to load or save the game?", "Load", "Save");
+ if (alert.runModal() == GUI::kMessageOK)
+ _key_action[action].setKey(SDLK_l);
+ else
+ _key_action[action].setKey(SDLK_s);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case SMARTPHONE_ACTION_RIGHTCLICK: