diff options
| author | Christopher Page | 2008-08-04 22:34:07 +0000 | 
|---|---|---|
| committer | Christopher Page | 2008-08-04 22:34:07 +0000 | 
| commit | 4198ee962399305a4a158b1f43224c00e2e04a1b (patch) | |
| tree | eea375b5cb471509df2e2c5d9123d963a62403c6 /backends/platform/symbian/src | |
| parent | a51f45407659bba43254b466d20b6af2e8f17ffd (diff) | |
| parent | 4f5479ee744ac6b419cdf7ec1e96fbf7c83d36ef (diff) | |
| download | scummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.tar.gz scummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.tar.bz2 scummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.zip | |
Merged revisions 33188-33189,33191-33193,33196,33198,33202-33203,33206,33210,33212,33218-33220,33222,33224-33226,33229-33243,33246,33248-33250,33252,33258-33261,33263,33266,33270,33272-33283,33285,33287-33290,33295-33298,33321,33325-33330,33332-33335,33337-33340,33342,33345,33347,33349-33350,33352-33357,33359-33367,33369-33371,33373,33375-33377,33379-33380,33383-33385,33387-33389,33392-33394,33400-33402,33404-33405,33407-33410,33412-33416,33418-33419,33425-33427,33432,33436-33438,33444,33446,33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478,33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621 via svnmerge from 
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
 
svn-id: r33624
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 | 
