aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince
diff options
context:
space:
mode:
authorKostas Nakos2007-06-09 10:06:05 +0000
committerKostas Nakos2007-06-09 10:06:05 +0000
commit80432ef36a514065a190290a7bacc456996cc486 (patch)
tree8d16b8615886b4857dc4df990168488034fc2113 /backends/platform/wince
parent3e416bf6013ea3c26ccd979d3fcdc09c08419d86 (diff)
downloadscummvm-rg350-80432ef36a514065a190290a7bacc456996cc486.tar.gz
scummvm-rg350-80432ef36a514065a190290a7bacc456996cc486.tar.bz2
scummvm-rg350-80432ef36a514065a190290a7bacc456996cc486.zip
add nippon support
svn-id: r27244
Diffstat (limited to 'backends/platform/wince')
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp17
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp15
2 files changed, 29 insertions, 3 deletions
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index cfc029536e..81de8e779c 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -127,11 +127,12 @@ void CEActionsPocket::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;
// See if a "hide toolbar" mapping could be needed
@@ -157,6 +158,9 @@ void CEActionsPocket::initInstanceGame() {
} else if (is_agi) {
_action_enabled[POCKET_ACTION_SAVE] = true;
_key_action[POCKET_ACTION_SAVE].setAscii(SDLK_ESCAPE);
+ } else if (is_parallaction) {
+ _action_enabled[POCKET_ACTION_SAVE] = true;
+ _key_action[POCKET_ACTION_SAVE].setAscii(SDLK_s);
} else {
_action_enabled[POCKET_ACTION_SAVE] = true;
_key_action[POCKET_ACTION_SAVE].setAscii(319); // F5 key
@@ -164,7 +168,7 @@ void CEActionsPocket::initInstanceGame() {
// Quit
_action_enabled[POCKET_ACTION_QUIT] = true;
// Skip
- if (!is_cine)
+ if (!is_cine && !is_parallaction)
_action_enabled[POCKET_ACTION_SKIP] = true;
if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche)
_key_action[POCKET_ACTION_SKIP].setAscii(VK_ESCAPE);
@@ -233,6 +237,15 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
case POCKET_ACTION_SAVE:
case POCKET_ACTION_SKIP:
case POCKET_ACTION_MULTI:
+ if (action == POCKET_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].setAscii(SDLK_l);
+ else
+ _key_action[action].setAscii(SDLK_s);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case POCKET_ACTION_KEYBOARD:
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index 309aefd95d..e65af8fc53 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -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
@@ -140,6 +141,9 @@ void CEActionsSmartphone::initInstanceGame() {
} else if (is_agi) {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
_key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE);
+ } else if (is_parallaction) {
+ _action_enabled[SMARTPHONE_ACTION_SAVE] = true;
+ _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_s);
} else {
_action_enabled[SMARTPHONE_ACTION_SAVE] = true;
_key_action[SMARTPHONE_ACTION_SAVE].setAscii(319); // F5 key
@@ -194,6 +198,15 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
case SMARTPHONE_ACTION_SAVE:
case SMARTPHONE_ACTION_SKIP:
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].setAscii(SDLK_l);
+ else
+ _key_action[action].setAscii(SDLK_s);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case SMARTPHONE_ACTION_RIGHTCLICK: