From e35ba53b7e358e1ba4f29a9d0af75dee78f7acc9 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Thu, 7 Jun 2007 20:52:49 +0000 Subject: Symbian PORT updated with CE mappings svn-id: r27178 --- backends/platform/symbian/src/SymbianActions.cpp | 9 ++++++--- backends/platform/symbian/src/SymbianActions.h | 4 ++-- backends/platform/symbian/src/SymbianOS.cpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index cb2652eac4..2c67c06bba 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -47,7 +47,7 @@ const Common::String actionNames[] = { "Save", "Skip", "Zone", - "FT Cheat", + "Multi Function", "Swap character", "Skip text", "Pause", @@ -174,8 +174,11 @@ void SymbianActions::initInstanceGame() { _action_enabled[ACTION_ZONE] = true; // FT Cheat - _action_enabled[ACTION_FT_CHEAT] = true; - _key_action[ACTION_FT_CHEAT].setAscii(86); // shift-V + _action_enabled[ACTION_MULTI] = true; + if (is_agi) + _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); + else + _key_action[ACTION_MULTI].setAscii(86); // shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h index 0facde763c..cbd333e500 100644 --- a/backends/platform/symbian/src/SymbianActions.h +++ b/backends/platform/symbian/src/SymbianActions.h @@ -34,7 +34,7 @@ namespace GUI { -#define ACTION_VERSION 6 +#define ACTION_VERSION 7 enum actionType { ACTION_UP = 0, @@ -46,7 +46,7 @@ enum actionType { ACTION_SAVE, ACTION_SKIP, ACTION_ZONE, - ACTION_FT_CHEAT, + ACTION_MULTI, ACTION_SWAPCHAR, ACTION_SKIP_TEXT, ACTION_PAUSE, diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 737795182e..80f9491d2a 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -348,7 +348,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { case GUI::ACTION_SAVE: case GUI::ACTION_SKIP: - case GUI::ACTION_FT_CHEAT: + case GUI::ACTION_MULTI: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: case GUI::ACTION_SWAPCHAR: -- cgit v1.2.3 From a3e8f765a6be500357b99d693b21266dbc428137 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 18:09:24 +0000 Subject: Updated Symbian OS Prediction handling Updated AGI to only enable predictive input after dictionary was found. svn-id: r27206 --- backends/platform/symbian/src/SymbianOS.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 80f9491d2a..d5c869ac91 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -88,8 +88,10 @@ void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) { else { } - - return; + break; + case kFeatureDisableKeyFiltering: + GUI::Actions::Instance()->beginMapping(enable); + break;; default: OSystem_SDL::setFeatureState(f, enable); } @@ -345,16 +347,21 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { } return true; - + case GUI::ACTION_MULTI: { + GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); + // if key code is pause, then change event to interactive or just fall through + if(key.keycode() == SDLK_PAUSE) { + event.type = Common::EVENT_PREDICTIVE_DIALOG; + return true; + } + } case GUI::ACTION_SAVE: case GUI::ACTION_SKIP: - case GUI::ACTION_MULTI: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: case GUI::ACTION_SWAPCHAR: case GUI::ACTION_FASTMODE: - case GUI::ACTION_DEBUGGER: - { + case GUI::ACTION_DEBUGGER: { GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); ev.key.keysym.sym = (SDLKey) key.ascii(); ev.key.keysym.scancode= key.keycode(); -- cgit v1.2.3 From d0d4c4da34e142ea05e3b8984392630f3cf03a69 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 20:09:36 +0000 Subject: Added read file sharing by default. Required for Gob2. svn-id: r27213 --- backends/platform/symbian/src/SymbianOS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index d5c869ac91..4901480bf9 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -453,7 +453,9 @@ FILE* symbian_fopen(const char* name, const char* mode) { if ((modeLen > 1 && mode[1] == '+') || (modeLen > 2 && mode[2] == '+')) { fileMode = fileMode| EFileWrite; } - + + fileMode = fileMode| EFileShareReadersOnly; + switch(mode[0]) { case 'a': if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { -- cgit v1.2.3 From e1fbe5f02f0ebb26f3ca1e1710e581471f3c47bc Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 20:41:35 +0000 Subject: Updated actions for SymbianOS svn-id: r27215 --- backends/platform/symbian/src/SymbianActions.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 2c67c06bba..1b2e4e6aac 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -176,9 +176,13 @@ void SymbianActions::initInstanceGame() { // FT Cheat _action_enabled[ACTION_MULTI] = true; if (is_agi) - _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); + _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + else if (is_gob) + _key_action[ACTION_MULTI].setAscii(315); // bargon : F1 to start + else if (gameid == "atlantis") + _key_action[ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[ACTION_MULTI].setAscii(86); // shift-V + _key_action[ACTION_MULTI].setAscii(86); // FT cheat : shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; -- cgit v1.2.3 From 6c9e50c8a81315afe76246800962cdf4f15d5fb5 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 21:29:18 +0000 Subject: Updated filesharing mode to full sharing. Now scummvm.ini works again. svn-id: r27218 --- backends/platform/symbian/src/SymbianOS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 4901480bf9..0bb67c97b9 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -454,7 +454,7 @@ FILE* symbian_fopen(const char* name, const char* mode) { fileMode = fileMode| EFileWrite; } - fileMode = fileMode| EFileShareReadersOnly; + fileMode = fileMode| EFileShareAny; switch(mode[0]) { case 'a': -- cgit v1.2.3 From 62ca2f9d51543be39489977bc1f541f665e21156 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sat, 9 Jun 2007 21:13:47 +0000 Subject: Updated actions for paralall svn-id: r27256 --- backends/platform/symbian/src/SymbianActions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 1b2e4e6aac..2c13a407ed 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -138,7 +138,8 @@ void SymbianActions::initInstanceGame() { bool is_cine = (gameid == "cine"); bool is_touche = (gameid == "touche"); bool is_agi = (gameid == "agi"); - + bool is_parallaction = (gameid == "parallaction"); + Actions::initInstanceGame(); // Initialize keys for different actions @@ -156,6 +157,8 @@ void SymbianActions::initInstanceGame() { _key_action[ACTION_SAVE].setAscii(SDLK_F10); // F10 } else if (is_agi) { _key_action[ACTION_SAVE].setAscii(SDLK_ESCAPE); + } else if (is_parallaction) { + _key_action[ACTION_SAVE].setAscii(SDLK_s); } else { _key_action[ACTION_SAVE].setAscii(SDLK_F5); // F5 key } @@ -173,7 +176,7 @@ void SymbianActions::initInstanceGame() { // Zone _action_enabled[ACTION_ZONE] = true; - // FT Cheat + // Multi function key _action_enabled[ACTION_MULTI] = true; if (is_agi) _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog -- cgit v1.2.3 From a896ec3aad99f0f4ee930b808dc569de5d53c7f2 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Sun, 10 Jun 2007 19:43:48 +0000 Subject: Updated makefile scripts with correct documents. svn-id: r27329 --- backends/platform/symbian/src/SymbianOS.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 0bb67c97b9..8da3207dff 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -106,6 +106,10 @@ OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0) { } void OSystem_SDL_Symbian::initBackend() { + char predfile[256]; + strcpy(predfile, Symbian::GetExecutablePath()); + strcat(predfile, "pred.dic"); + ConfMan.set("predictive_dictionary", predfile); ConfMan.setBool("FM_high_quality", false); #if !defined(S60) || defined(S60V3) // S60 has low quality as default ConfMan.setBool("FM_medium_quality", true); @@ -145,7 +149,7 @@ bool OSystem_SDL_Symbian::setGraphicsMode(const char * /*name*/) { return OSystem_SDL::setGraphicsMode(getDefaultGraphicsMode()); } -void OSystem_SDL_Symbian::quitWithErrorMsg(const char *msg) { +void OSystem_SDL_Symbian::quitWithErrorMsg(const char * /*aMsg*/) { CEikonEnv::Static()->AlertWin(_L("quitWithErrorMsg()")) ; @@ -433,7 +437,7 @@ struct TSymbianFileEntry { FILE* symbian_fopen(const char* name, const char* mode) { TSymbianFileEntry* fileEntry = new TSymbianFileEntry; - + if (fileEntry != NULL) { TInt modeLen = strlen(mode); @@ -480,7 +484,6 @@ FILE* symbian_fopen(const char* name, const char* mode) { break; } } - return (FILE*) fileEntry; } -- cgit v1.2.3 From 86f433b3c41500a456dcbf523a0cb51b848966a9 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Mon, 11 Jun 2007 19:30:24 +0000 Subject: Include Kyra.dat and sky.cpt in the sis file. queen.tbl not included due to the size. svn-id: r27364 --- backends/platform/symbian/src/SymbianOS.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 8da3207dff..c992c97316 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -106,10 +106,7 @@ OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0) { } void OSystem_SDL_Symbian::initBackend() { - char predfile[256]; - strcpy(predfile, Symbian::GetExecutablePath()); - strcat(predfile, "pred.dic"); - ConfMan.set("predictive_dictionary", predfile); + ConfMan.set("extrapath", Symbian::GetExecutablePath()); ConfMan.setBool("FM_high_quality", false); #if !defined(S60) || defined(S60V3) // S60 has low quality as default ConfMan.setBool("FM_medium_quality", true); -- cgit v1.2.3 From f97cbb8294eb35fbd3af38fbe37ac35a82c64121 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Jun 2007 00:05:32 +0000 Subject: Update GUI::Key constructs svn-id: r27643 --- backends/platform/symbian/src/SymbianActions.cpp | 36 +++++++++++------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'backends/platform/symbian/src') diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 2c13a407ed..3809253032 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -122,7 +122,7 @@ void SymbianActions::initInstanceMain(OSystem *mainSystem) { // Skip _action_enabled[ACTION_SKIP] = true; - _key_action[ACTION_SKIP].setAscii(SDLK_ESCAPE); + _key_action[ACTION_SKIP].setKey(SDLK_ESCAPE); } void SymbianActions::initInstanceGame() { @@ -150,28 +150,27 @@ void SymbianActions::initInstanceGame() { _action_enabled[ACTION_SAVE] = true; if (is_queen) { - _key_action[ACTION_SAVE].setAscii(SDLK_F1); // F1 key for FOTAQ + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { - _key_action[ACTION_SAVE].setAscii(63); + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, SDLK_F5); } else if (is_cine) { - _key_action[ACTION_SAVE].setAscii(SDLK_F10); // F10 + _key_action[ACTION_SAVE].setKey(Common::ASCII_F10, SDLK_F10); // F10 } else if (is_agi) { - _key_action[ACTION_SAVE].setAscii(SDLK_ESCAPE); + _key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, SDLK_ESCAPE); } else if (is_parallaction) { - _key_action[ACTION_SAVE].setAscii(SDLK_s); + _key_action[ACTION_SAVE].setKey('s', SDLK_s); } else { - _key_action[ACTION_SAVE].setAscii(SDLK_F5); // F5 key + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, 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); + _key_action[ACTION_FASTMODE].setKey('f', SDLK_f, KMOD_CTRL); // Swap character _action_enabled[ACTION_SWAPCHAR] = true; - _key_action[ACTION_SWAPCHAR].setAscii('b'); // b + _key_action[ACTION_SWAPCHAR].setKey('b'); // b // Zone _action_enabled[ACTION_ZONE] = true; @@ -179,31 +178,30 @@ void SymbianActions::initInstanceGame() { // Multi function key _action_enabled[ACTION_MULTI] = true; if (is_agi) - _key_action[ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog + _key_action[ACTION_MULTI].setKey(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[ACTION_MULTI].setAscii(315); // bargon : F1 to start + _key_action[ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start else if (gameid == "atlantis") - _key_action[ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch + _key_action[ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch else - _key_action[ACTION_MULTI].setAscii(86); // FT cheat : shift-V + _key_action[ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V // Enable debugger _action_enabled[ACTION_DEBUGGER] = true; - _key_action[ACTION_DEBUGGER].setAscii('d'); - _key_action[ACTION_DEBUGGER].setFlags(KMOD_CTRL); + _key_action[ACTION_DEBUGGER].setKey('d', SDLK_d, KMOD_CTRL); // Skip text if (!is_cine) _action_enabled[ACTION_SKIP_TEXT] = true; if (is_queen) { - _key_action[ACTION_SKIP_TEXT].setAscii(SDLK_SPACE); + _key_action[ACTION_SKIP_TEXT].setKey(SDLK_SPACE); } else { - _key_action[ACTION_SKIP_TEXT].setAscii(SDLK_PERIOD); + _key_action[ACTION_SKIP_TEXT].setKey(SDLK_PERIOD); } // Pause - _key_action[ACTION_PAUSE].setAscii(' '); + _key_action[ACTION_PAUSE].setKey(' '); _action_enabled[ACTION_PAUSE] = true; // Quit -- cgit v1.2.3