diff options
Diffstat (limited to 'backends/platform/symbian/src')
-rw-r--r-- | backends/platform/symbian/src/SymbianActions.cpp | 4 | ||||
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.cpp | 49 | ||||
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.h | 3 | ||||
-rw-r--r-- | backends/platform/symbian/src/main_features.inl | 39 | ||||
-rw-r--r-- | backends/platform/symbian/src/portdefs.h | 1 |
5 files changed, 71 insertions, 25 deletions
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 8fc35e9f8d..da127eaec6 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -140,6 +140,8 @@ void SymbianActions::initInstanceGame() { bool is_touche = (gameid == "touche"); bool is_agi = (gameid == "agi"); bool is_parallaction = (gameid == "parallaction"); + bool is_lure = (gameid == "lure"); + bool is_feeble = (gameid == "feeble"); Actions::initInstanceGame(); @@ -175,7 +177,7 @@ void SymbianActions::initInstanceGame() { // Skip text if (!is_cine && !is_parallaction) _action_enabled[ACTION_SKIP_TEXT] = true; - if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche) + if (is_simon || is_sky || is_sword2 || is_queen || is_sword1 || is_gob || is_saga || is_kyra || is_touche || is_lure || is_feeble) _key_action[ACTION_SKIP_TEXT].setKey(Common::KEYCODE_ESCAPE, Common::KEYCODE_ESCAPE); // Escape key else { _key_action[ACTION_SKIP_TEXT].setKey(SDLK_PERIOD); diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 660b0c69ed..0ce44d1704 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -30,6 +30,7 @@ #include "backends/platform/symbian/src/SymbianActions.h" #include "common/config-manager.h" #include "common/events.h" +#include "common/file.h" #include "gui/Actions.h" #include "gui/Key.h" #include "gui/message.h" @@ -42,6 +43,10 @@ #define SAMPLES_PER_SEC 16000 #endif + +#define DEFAULT_CONFIG_FILE "scummvm.ini" + + #define KInputBufferLength 128 // Symbian libc file functionality in order to provide shared file handles struct TSymbianFileEntry { @@ -122,6 +127,34 @@ FilesystemFactory *OSystem_SDL_Symbian::getFilesystemFactory() { return &SymbianFilesystemFactory::instance(); } +static Common::String getDefaultConfigFileName() { + char configFile[MAXPATHLEN]; + strcpy(configFile, Symbian::GetExecutablePath()); + strcat(configFile, DEFAULT_CONFIG_FILE); + return configFile; +} + +Common::SeekableReadStream *OSystem_SDL_Symbian::openConfigFileForReading() { + Common::File *confFile = new Common::File(); + assert(confFile); + if (!confFile->open(getDefaultConfigFileName())) { + delete confFile; + confFile = 0; + } + return confFile; +} + +Common::WriteStream *OSystem_SDL_Symbian::openConfigFileForWriting() { + Common::DumpFile *confFile = new Common::DumpFile(); + assert(confFile); + if (!confFile->open(getDefaultConfigFileName())) { + delete confFile; + confFile = 0; + } + return confFile; +} + + OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = { { 0, 0, 320, 145 }, { 0, 145, 150, 55 }, @@ -617,9 +650,13 @@ bool symbian_feof(FILE* handle) { long int symbian_ftell(FILE* handle) { TInt pos = 0; + TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle)); - ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(ESeekCurrent, pos); - + entry->iFileHandle.Seek(ESeekCurrent, pos); + if(entry->iInputPos != KErrNotFound) + { + pos+=(entry->iInputPos - entry->iInputBufferLen); + } return pos; } @@ -627,6 +664,7 @@ int symbian_fseek(FILE* handle, long int offset, int whence) { TSeek seekMode = ESeekStart; TInt pos = offset; + TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle)); switch(whence) { case SEEK_SET: @@ -634,6 +672,9 @@ int symbian_fseek(FILE* handle, long int offset, int whence) { break; case SEEK_CUR: seekMode = ESeekCurrent; + if(entry->iInputPos != KErrNotFound) { + pos+=(entry->iInputPos - entry->iInputBufferLen); + } break; case SEEK_END: seekMode = ESeekEnd; @@ -641,9 +682,9 @@ int symbian_fseek(FILE* handle, long int offset, int whence) { } - ((TSymbianFileEntry*)(handle))->iInputPos = KErrNotFound; + entry->iInputPos = KErrNotFound; - return ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(seekMode, pos); + return entry->iFileHandle.Seek(seekMode, pos); } void symbian_clearerr(FILE* /*handle*/) { diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h index 71d24f6286..68a6fb492f 100644 --- a/backends/platform/symbian/src/SymbianOS.h +++ b/backends/platform/symbian/src/SymbianOS.h @@ -71,6 +71,9 @@ protected: static void symbianMixCallback(void *s, byte *samples, int len); virtual FilesystemFactory *getFilesystemFactory(); + + virtual Common::SeekableReadStream *openConfigFileForReading(); + virtual Common::WriteStream *openConfigFileForWriting(); public: // vibration support #ifdef USE_VIBRA_SE_PXXX diff --git a/backends/platform/symbian/src/main_features.inl b/backends/platform/symbian/src/main_features.inl index f572ddb3dd..30bbbea52c 100644 --- a/backends/platform/symbian/src/main_features.inl +++ b/backends/platform/symbian/src/main_features.inl @@ -27,62 +27,61 @@ // we want a list of supported engines visible in the program, // because we also release special builds with only one engine -#ifndef DISABLE_SCUMM +#ifdef ENABLE_SCUMM "SCUMM " #endif -#ifndef DISABLE_AGOS +#ifdef ENABLE_AGOS "AGOS " #endif -#ifndef DISABLE_SKY +#ifdef ENABLE_SKY "Sky " #endif -#ifndef DISABLE_QUEEN +#ifdef ENABLE_QUEEN "Queen " #endif -#ifndef DISABLE_GOB +#ifdef ENABLE_GOB "Gob " #endif -#ifndef DISABLE_SAGA +#ifdef ENABLE_SAGA "Saga " #endif -#ifndef DISABLE_KYRA +#ifdef ENABLE_KYRA "Kyra " #endif -#ifndef DISABLE_SWORD1 +#ifdef ENABLE_SWORD1 "Sword1 " #endif -#ifndef DISABLE_SWORD2 +#ifdef ENABLE_SWORD2 "Sword2 " #endif -#ifndef DISABLE_CINE +#ifdef ENABLE_CINE "Cine " #endif -#ifndef DISABLE_LURE +#ifdef ENABLE_LURE "Lure " #endif -#ifndef DISABLE_AGI +#ifdef ENABLE_AGI "AGI " #endif -#ifndef DISABLE_TOUCHE +#ifdef ENABLE_TOUCHE "Touche " #endif -#ifndef DISABLE_DRASCULA +#ifdef ENABLE_DRASCULA "Drascula " #endif -#ifndef DISABLE_IGOR +#ifdef ENABLE_IGOR "Igor " #endif -#ifndef DISABLE_PARALLACTION +#ifdef ENABLE_PARALLACTION "Parallaction " #endif -#ifndef DISABLE_CRUISE +#ifdef ENABLE_CRUISE "Cruise " #endif -#ifndef DISABLE_MADE +#ifdef ENABLE_MADE "MADE " #endif - -#ifndef DISABLE_M4 +#ifdef ENABLE_M4 "M4 " #endif diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index 06a4cf374c..4577824b33 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -157,5 +157,6 @@ void inline *scumm_bsearch(const void *key, const void *base, size_t nmemb, size namespace Symbian { extern void FatalError(const char *msg); extern char* GetExecutablePath(); +#define DYNAMIC_MODULES 1 } #endif |