diff options
author | Kostas Nakos | 2007-02-24 20:50:56 +0000 |
---|---|---|
committer | Kostas Nakos | 2007-02-24 20:50:56 +0000 |
commit | 03e75235f0051af0237158ebb3449315c71c7938 (patch) | |
tree | ad7c066a67828d7b0ed1d50229a81e01d5754da2 | |
parent | ebfb2c57e14ebfd33876810705f5849a78656b14 (diff) | |
download | scummvm-rg350-03e75235f0051af0237158ebb3449315c71c7938.tar.gz scummvm-rg350-03e75235f0051af0237158ebb3449315c71c7938.tar.bz2 scummvm-rg350-03e75235f0051af0237158ebb3449315c71c7938.zip |
Add support for touche engine.
Also, since QVGA smartphones can run any game, updated the action mappings to account for all of them.
svn-id: r25830
-rw-r--r-- | backends/platform/wince/CEActionsPocket.cpp | 7 | ||||
-rw-r--r-- | backends/platform/wince/CEActionsSmartphone.cpp | 12 | ||||
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp index 7f9b353159..5508998ff8 100644 --- a/backends/platform/wince/CEActionsPocket.cpp +++ b/backends/platform/wince/CEActionsPocket.cpp @@ -128,11 +128,12 @@ void CEActionsPocket::initInstanceGame() { bool is_samnmax = (gameid == "samnmax"); bool is_fw = (gameid == "fw"); bool is_os = (gameid == "os"); + bool is_touche = (gameid == "touche"); 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_fw || is_os) + if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_fw || is_os || is_touche) _right_click_needed = true; // See if a "hide toolbar" mapping could be needed @@ -144,7 +145,7 @@ void CEActionsPocket::initInstanceGame() { _key_action[POCKET_ACTION_PAUSE].setAscii(VK_SPACE); _action_enabled[POCKET_ACTION_PAUSE] = true; // Save - if (is_simon || is_sword2 || is_gob || is_kyra) + if (is_simon || is_sword2 || is_gob || is_kyra || is_touche) _action_enabled[POCKET_ACTION_SAVE] = false; else if (is_queen || is_ite) { _action_enabled[POCKET_ACTION_SAVE] = true; @@ -164,7 +165,7 @@ void CEActionsPocket::initInstanceGame() { // Skip if (!is_fw && !is_os) _action_enabled[POCKET_ACTION_SKIP] = true; - if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_ite || is_kyra) + if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_ite || is_kyra || is_touche) _key_action[POCKET_ACTION_SKIP].setAscii(VK_ESCAPE); else _key_action[POCKET_ACTION_SKIP].setAscii(KEY_ALL_SKIP); diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index 0a2d1937e5..b1ef76cba4 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -119,8 +119,11 @@ void CEActionsSmartphone::initInstanceMain(OSystem *mainSystem) { void CEActionsSmartphone::initInstanceGame() { String gameid(ConfMan.get("gameid")); bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0); - bool is_sky = (gameid == "sky"); + bool is_sword1 = (gameid == "sword1"); + bool is_sword2 = (strcmp(gameid.c_str(), "sword2") == 0); bool is_queen = (gameid == "queen"); + bool is_sky = (gameid == "sky"); + bool is_comi = (strncmp(gameid.c_str(), "comi", 4) == 0); bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0); bool is_ite = ((strncmp(gameid.c_str(), "ite", 3) == 0) || (strncmp(gameid.c_str(), "ihnm", 4) == 0)); @@ -128,16 +131,17 @@ void CEActionsSmartphone::initInstanceGame() { bool is_samnmax = (gameid == "samnmax"); bool is_fw = (gameid == "fw"); bool is_os = (gameid == "os"); + bool is_touche = (gameid == "touche"); GUI_Actions::initInstanceGame(); // See if a right click mapping could be needed - if (is_sky || is_samnmax || is_gob || is_fw || is_os) + if (is_sword1 || is_sword2 || is_sky || is_queen || is_comi || is_gob || is_samnmax || is_fw || is_os || is_touche) _right_click_needed = true; // Initialize keys for different actions // Save - if (is_simon || is_gob) + if (is_simon || is_sword2 || is_gob || is_kyra || is_touche) _action_enabled[SMARTPHONE_ACTION_SAVE] = false; else if (is_queen || is_ite) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; @@ -154,7 +158,7 @@ void CEActionsSmartphone::initInstanceGame() { } // Skip _action_enabled[SMARTPHONE_ACTION_SKIP] = true; - if (is_simon || is_sky || is_gob || is_ite || is_kyra) + if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_ite || is_kyra || is_touche) _key_action[SMARTPHONE_ACTION_SKIP].setAscii(VK_ESCAPE); else _key_action[SMARTPHONE_ACTION_SKIP].setAscii(KEY_ALL_SKIP); diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index a619993663..ca78329b5e 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1173,6 +1173,8 @@ void OSystem_WINCE3::loadGFXMode() { // Always use full screen mode to have a "clean screen" displayWidth = _screenWidth * _scaleFactorXm / _scaleFactorXd; displayHeight = _screenHeight * _scaleFactorYm / _scaleFactorYd; + if (_screenHeight == 400) // touche engine fixup + displayHeight += 80 * _scaleFactorYm / _scaleFactorYd; // FIXME if (displayWidth <= GetSystemMetrics(SM_CXSCREEN)) { // no rotation |