aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp26
-rw-r--r--backends/platform/symbian/src/SymbianActions.h2
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp38
-rw-r--r--backends/platform/symbian/src/SymbianOS.h1
4 files changed, 58 insertions, 9 deletions
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index cd52a9b5ec..484774ab37 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -48,17 +48,19 @@ const Common::String actionNames[] = {
"Swap character",
"Skip text",
"Pause",
- "Quit"
+ "Fast mode",
+ "Quit",
+ "Debugger"
};
#ifdef UIQ
-static const int ACTIONS_DEFAULT[ACTION_LAST] = { 0, 0, 0, 0, SDLK_F1, SDLK_F2, SDLK_F5, SDLK_PAGEDOWN, 0, 0, 0, SDLK_PAGEUP, 0, 0};
+static const int ACTIONS_DEFAULT[ACTION_LAST] = { 0, 0, 0, 0, SDLK_F1, SDLK_F2, SDLK_F5, SDLK_PAGEDOWN, 0, 0, 0, SDLK_PAGEUP, 0, 0, 0, 0};
#elif defined (S60)
-const int ACTIONS_DEFAULT[ACTION_LAST] = { 0, 0, 0, 0, 0, 0, '*', '#', '9',0,0,0,0,0};
+const int ACTIONS_DEFAULT[ACTION_LAST] = { 0, 0, 0, 0, 0, 0, '*', '#', '9', 0, 0, 0, 0, 0, 0, 0};
#elif defined (S90)
-const int ACTIONS_DEFAULT[ACTION_LAST] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, 0, 0, SDLK_MENU, SDLK_ESCAPE, 0, 0,0,0,0,0};
+const int ACTIONS_DEFAULT[ACTION_LAST] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, 0, 0, SDLK_MENU, SDLK_ESCAPE, 0, 0 , 0, 0, 0, 0, 0, 0};
#else
-const int ACTIONS_DEFAULT[ACTION_LAST] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, SDLK_F1, SDLK_F2, SDLK_MENU, SDLK_ESCAPE, 0, 0, 0, 0, 0, 0};
+const int ACTIONS_DEFAULT[ACTION_LAST] = { SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, SDLK_F1, SDLK_F2, SDLK_MENU, SDLK_ESCAPE, 0, 0, 0, 0, 0, 0, 0, 0};
#endif
// creator function according to Factory Pattern
@@ -138,9 +140,9 @@ void SymbianActions::initInstanceGame() {
// Initialize keys for different actions
// Save
- if (is_simon || is_sword2 || is_gob || is_kyra || is_touche)
+ if (is_simon || is_gob || is_kyra || is_touche)
_action_enabled[ACTION_SAVE] = false;
- else if (is_queen || is_saga) {
+ else if (is_queen) {
_action_enabled[ACTION_SAVE] = true;
_key_action[ACTION_SAVE].setAscii(SDLK_F1); // F1 key for FOTAQ
} else if (is_sky) {
@@ -157,6 +159,11 @@ void SymbianActions::initInstanceGame() {
_key_action[ACTION_SAVE].setAscii(SDLK_F5); // F5 key
}
+ // Enable fast mode
+ _action_enabled[ACTION_FASTMODE] = true;
+ _key_action[ACTION_FASTMODE].setAscii('f');
+ _key_action[ACTION_FASTMODE].setFlags(KMOD_CTRL);
+
// Swap character
_action_enabled[ACTION_SWAPCHAR] = true;
_key_action[ACTION_SWAPCHAR].setAscii('b'); // b
@@ -168,6 +175,11 @@ void SymbianActions::initInstanceGame() {
_action_enabled[ACTION_FT_CHEAT] = true;
_key_action[ACTION_FT_CHEAT].setAscii(86); // shift-V
+ // Enable debugger
+ _action_enabled[ACTION_DEBUGGER] = true;
+ _key_action[ACTION_DEBUGGER].setAscii('d');
+ _key_action[ACTION_DEBUGGER].setFlags(KMOD_CTRL);
+
// Skip text
if (!is_cine)
_action_enabled[ACTION_SKIP_TEXT] = true;
diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h
index 139bf79018..c1176d00b0 100644
--- a/backends/platform/symbian/src/SymbianActions.h
+++ b/backends/platform/symbian/src/SymbianActions.h
@@ -47,7 +47,9 @@ enum actionType {
ACTION_SWAPCHAR,
ACTION_SKIP_TEXT,
ACTION_PAUSE,
+ ACTION_FASTMODE,
ACTION_QUIT,
+ ACTION_DEBUGGER,
ACTION_LAST
};
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index f1f26cb51b..71303ff3ce 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -79,6 +79,21 @@ bool OSystem_SDL_Symbian::hasFeature(Feature f) {
}
}
+void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) {
+ switch(f) {
+ case kFeatureVirtualKeyboard:
+ if (enable) {
+ }
+ else {
+
+ }
+
+ return;
+ default:
+ OSystem_SDL::setFeatureState(f, enable);
+ }
+}
+
OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = {
{ 0, 0, 320, 145 },
{ 0, 145, 150, 55 },
@@ -335,11 +350,30 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) {
case GUI::ACTION_FT_CHEAT:
case GUI::ACTION_SKIP_TEXT:
case GUI::ACTION_PAUSE:
+ case GUI::ACTION_SWAPCHAR:
+ case GUI::ACTION_FASTMODE:
+ case GUI::ACTION_DEBUGGER:
{
GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop);
- ev.key.keysym.sym = (SDLKey)key.ascii();
+ ev.key.keysym.sym = (SDLKey) key.ascii();
ev.key.keysym.scancode= key.keycode();
- ev.key.keysym.mod = (SDLMod)key.flags();
+ ev.key.keysym.mod = (SDLMod) key.flags();
+
+ // Translate from SDL keymod event to Scummvm Key Mod Event.
+ // This codes is also present in GP32 backend and in SDL backend as a static function
+ // Perhaps it should be shared.
+ if(key.flags() != 0) {
+ event.kbd.flags = 0;
+
+ if (ev.key.keysym.mod & KMOD_SHIFT)
+ event.kbd.flags |= OSystem::KBD_SHIFT;
+
+ if (ev.key.keysym.mod & KMOD_ALT)
+ event.kbd.flags |= OSystem::KBD_ALT;
+
+ if (ev.key.keysym.mod & KMOD_CTRL)
+ event.kbd.flags |= OSystem::KBD_CTRL;
+ }
return false;
}
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index 28f579e412..bb3a992891 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -51,6 +51,7 @@ public:
bool setGraphicsMode(const char *name);
void quitWithErrorMsg(const char *msg);
virtual bool hasFeature(Feature f);
+ void setFeatureState(Feature f, bool enable);
// Set function that generates samples
//