diff options
author | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
commit | 66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985 (patch) | |
tree | e27aadabecd8dd910884280e6559ff9c94c3d73c /backends/platform/symbian/src | |
parent | 278857698dc7b1623096fe1ad12511dc4c886c7e (diff) | |
download | scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.gz scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.bz2 scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.zip |
Removed trailing spaces.
svn-id: r30664
Diffstat (limited to 'backends/platform/symbian/src')
-rw-r--r-- | backends/platform/symbian/src/ScummApp.cpp | 4 | ||||
-rw-r--r-- | backends/platform/symbian/src/SymbianActions.cpp | 32 | ||||
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.cpp | 68 | ||||
-rw-r--r-- | backends/platform/symbian/src/main_features.inl | 2 | ||||
-rw-r--r-- | backends/platform/symbian/src/portdefs.h | 20 |
5 files changed, 63 insertions, 63 deletions
diff --git a/backends/platform/symbian/src/ScummApp.cpp b/backends/platform/symbian/src/ScummApp.cpp index 3c3c0dc065..cb08ccdd42 100644 --- a/backends/platform/symbian/src/ScummApp.cpp +++ b/backends/platform/symbian/src/ScummApp.cpp @@ -30,7 +30,7 @@ #if defined (__WINS__) && !defined (__SERIES60_30__) && !defined (UIQ3) extern "C" int _chkstk(int /*a*/) { _asm { - push ecx + push ecx cmp eax,_PAGESIZE_ lea ecx,[esp] + 8 jb short lastpage @@ -66,7 +66,7 @@ _asm { // this function is called automatically by the SymbianOS to deliver the new CApaApplication object #if !defined (UIQ3) && !defined (S60V3) -EXPORT_C +EXPORT_C #endif CApaApplication* NewApplication() { // Return pointer to newly created CQMApp diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp index 008bf3ccb5..8fc35e9f8d 100644 --- a/backends/platform/symbian/src/SymbianActions.cpp +++ b/backends/platform/symbian/src/SymbianActions.cpp @@ -35,10 +35,10 @@ namespace GUI { // SumthinWicked says: we either split our Actions like WinCE did with Pocket/Smartphone // or we put them in this file separated by #ifdefs, this one is up to you, AnotherGuest :) - -const Common::String actionNames[] = { - "Up", - "Down", + +const Common::String actionNames[] = { + "Up", + "Down", "Left", "Right", "Left Click", @@ -48,8 +48,8 @@ const Common::String actionNames[] = { "Zone", "Multi Function", "Swap character", - "Skip text", - "Pause", + "Skip text", + "Pause", "Fast mode", "Quit", "Debugger" @@ -100,7 +100,7 @@ SymbianActions::SymbianActions() void SymbianActions::initInstanceMain(OSystem *mainSystem) { Actions::initInstanceMain(mainSystem); - + // Mouse Up _action_enabled[ACTION_UP] = true; @@ -154,24 +154,24 @@ void SymbianActions::initInstanceGame() { _action_enabled[ACTION_SAVE] = false; else { _action_enabled[ACTION_SAVE] = true; - - if (is_queen) { + + if (is_queen) { _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F1 key for FOTAQ - } else if (is_sky) { - _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); - } else if (is_cine) { + } else if (is_sky) { + _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); + } else if (is_cine) { _key_action[ACTION_SAVE].setKey(Common::ASCII_F10, Common::KEYCODE_F10); // F10 - } else if (is_agi) { + } else if (is_agi) { _key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, Common::KEYCODE_ESCAPE); } else if (is_parallaction) { _key_action[ACTION_SAVE].setKey('s', Common::KEYCODE_s); - } else { + } else { _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F5 key } } // Quit _action_enabled[ACTION_QUIT] = true; - + // Skip text if (!is_cine && !is_parallaction) _action_enabled[ACTION_SKIP_TEXT] = true; @@ -184,7 +184,7 @@ void SymbianActions::initInstanceGame() { // Enable fast mode _action_enabled[ACTION_FASTMODE] = true; _key_action[ACTION_FASTMODE].setKey('f', Common::KEYCODE_f, KMOD_CTRL); - + // Swap character _action_enabled[ACTION_SWAPCHAR] = true; _key_action[ACTION_SWAPCHAR].setKey('b'); // b diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index bca7b86a07..e76f6a93df 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -47,7 +47,7 @@ namespace Symbian { // Show a simple Symbian Info win with Msg & exit void FatalError(const char *msg) { - TPtrC8 msgPtr((const TUint8 *)msg); + TPtrC8 msgPtr((const TUint8 *)msg); TBuf<512> msg16Bit; msg16Bit.Copy(msgPtr); #ifdef S60 @@ -60,7 +60,7 @@ void FatalError(const char *msg) { // make this easily available everywhere char* GetExecutablePath() { - return CSDLApp::GetExecutablePathCStr(); + return CSDLApp::GetExecutablePathCStr(); } } // namespace Symbian { @@ -89,12 +89,12 @@ bool OSystem_SDL_Symbian::hasFeature(Feature f) { } void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) { - switch(f) { - case kFeatureVirtualKeyboard: - if (enable) { + switch(f) { + case kFeatureVirtualKeyboard: + if (enable) { } else { - + } break; case kFeatureDisableKeyFiltering: @@ -123,15 +123,15 @@ void OSystem_SDL_Symbian::initBackend() { #endif ConfMan.setInt("joystick_num", 0); // Symbian OS should have joystick_num set to 0 in the ini file , but uiq devices might refuse opening the joystick ConfMan.flushToDisk(); - + GUI::Actions::init(); OSystem_SDL::initBackend(); - + // Initialize global key mapping for Smartphones GUI::Actions* actions = GUI::Actions::Instance(); - actions->initInstanceMain(this); + actions->initInstanceMain(this); actions->loadMapping(); initZones(); } @@ -157,7 +157,7 @@ bool OSystem_SDL_Symbian::setGraphicsMode(const char * /*name*/) { void OSystem_SDL_Symbian::quitWithErrorMsg(const char * /*aMsg*/) { CEikonEnv::Static()->AlertWin(_L("quitWithErrorMsg()")) ; - + if (g_system) g_system->quit(); } @@ -171,7 +171,7 @@ void OSystem_SDL_Symbian::quit() { bool OSystem_SDL_Symbian::setSoundCallback(SoundProc proc, void *param) { // First save the proc and param - _sound_proc_param = param; + _sound_proc_param = param; _sound_proc = proc; SDL_AudioSpec desired; SDL_AudioSpec obtained; @@ -267,11 +267,11 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { return false; for (TInt loop = 0; loop < GUI::ACTION_LAST; loop++) { - if (GUI::Actions::Instance()->getMapping(loop) == ev.key.keysym.sym && + if (GUI::Actions::Instance()->getMapping(loop) == ev.key.keysym.sym && GUI::Actions::Instance()->isEnabled(loop)) { // Create proper event instead switch(loop) { - case GUI::ACTION_UP: + case GUI::ACTION_UP: if (ev.type == SDL_KEYDOWN) { _km.y_vel = -1; _km.y_down_count = 1; @@ -282,7 +282,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { event.type = Common::EVENT_MOUSEMOVE; fillMouseEvent(event, _km.x, _km.y); - return true; + return true; case GUI::ACTION_DOWN: if (ev.type == SDL_KEYDOWN) { @@ -295,7 +295,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { event.type = Common::EVENT_MOUSEMOVE; fillMouseEvent(event, _km.x, _km.y); - return true; + return true; case GUI::ACTION_LEFT: if (ev.type == SDL_KEYDOWN) { @@ -337,8 +337,8 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { case GUI::ACTION_ZONE: if (ev.type == SDL_KEYDOWN) { - int i; - + int i; + for (i=0; i < TOTAL_ZONES; i++) if (_km.x >= _zones[i].x && _km.y >= _zones[i].y && _km.x <= _zones[i].x + _zones[i].width && _km.y <= _zones[i].y + _zones[i].height @@ -352,7 +352,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { _currentZone = 0; event.type = Common::EVENT_MOUSEMOVE; fillMouseEvent(event, _mouseXZone[_currentZone], _mouseYZone[_currentZone]); - SDL_WarpMouse(event.mouse.x, event.mouse.y); + SDL_WarpMouse(event.mouse.x, event.mouse.y); } return true; @@ -376,24 +376,24 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { ev.key.keysym.scancode = 0; ev.key.keysym.mod = (SDLMod) key.flags(); - // Translate from SDL keymod event to Scummvm Key Mod Common::Event. + // Translate from SDL keymod event to Scummvm Key Mod Common::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) { + // Perhaps it should be shared. + if (key.flags() != 0) { event.kbd.flags = 0; if (ev.key.keysym.mod & KMOD_SHIFT) event.kbd.flags |= Common::KBD_SHIFT; - + if (ev.key.keysym.mod & KMOD_ALT) event.kbd.flags |= Common::KBD_ALT; - + if (ev.key.keysym.mod & KMOD_CTRL) event.kbd.flags |= Common::KBD_CTRL; } return false; - } + } case GUI::ACTION_QUIT: { @@ -447,20 +447,20 @@ FILE* symbian_fopen(const char* name, const char* mode) { TInt modeLen = strlen(mode); TPtrC8 namePtr((unsigned char*) name, strlen(name)); - TFileName tempFileName; + TFileName tempFileName; tempFileName.Copy(namePtr); - + TInt fileMode = EFileRead; - + if (mode[0] == 'a') fileMode = EFileWrite; - + if (!((modeLen > 1 && mode[1] == 'b') || (modeLen > 2 && mode[2] == 'b'))) { fileMode |= EFileStreamText; } - + if ((modeLen > 1 && mode[1] == '+') || (modeLen > 2 && mode[2] == '+')) { - fileMode = fileMode| EFileWrite; + fileMode = fileMode| EFileWrite; } fileMode = fileMode| EFileShareAny; @@ -474,13 +474,13 @@ FILE* symbian_fopen(const char* name, const char* mode) { } } break; - case 'r': + case 'r': if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { delete fileEntry; fileEntry = NULL; } break; - + case 'w': if (fileEntry->iFileHandle.Replace(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) { delete fileEntry; @@ -502,7 +502,7 @@ size_t symbian_fread(const void* ptr, size_t size, size_t numItems, FILE* handle TPtr8 pointer( (unsigned char*) ptr, size*numItems); ((TSymbianFileEntry*)(handle))->iFileHandle.Read(pointer); - + return pointer.Length()/size; } @@ -552,7 +552,7 @@ int symbian_fseek(FILE* handle, long int offset, int whence) { case SEEK_END: seekMode = ESeekEnd; break; - + } return ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(seekMode, pos); diff --git a/backends/platform/symbian/src/main_features.inl b/backends/platform/symbian/src/main_features.inl index 66b0c4b200..8a44d0edf2 100644 --- a/backends/platform/symbian/src/main_features.inl +++ b/backends/platform/symbian/src/main_features.inl @@ -24,7 +24,7 @@ "Vibra " #endif "\n" - + // we want a list of supported engines visible in the program, // because we also release special builds with only one engine #ifndef DISABLE_SCUMM diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h index 4299eb59ad..cfaafe9ece 100644 --- a/backends/platform/symbian/src/portdefs.h +++ b/backends/platform/symbian/src/portdefs.h @@ -57,7 +57,7 @@ #define SIGND(fp) ((fp.l.upper) & SIGNBIT) #define HIDDEND_LL ((long long)1 << 52) #define MANTD_LL(fp) ((fp.ll & (HIDDEND_LL-1)) | HIDDEND_LL) - + union double_long { double d; struct { @@ -73,36 +73,36 @@ register union double_long dl1; register int exp; register long long l; - + dl1.d = a1; - + if (!dl1.l.upper && !dl1.l.lower) return (0); - + exp = EXPD (dl1) - EXCESSD - 64; l = MANTD_LL(dl1); - + if (exp > 0) { l = (long long)1<<63; if (!SIGND(dl1)) l--; return l; } - + /* shift down until exp = 0 or l = 0 */ if (exp < 0 && exp > -64 && l) l >>= -exp; else return (0); - + return (SIGND (dl1) ? -l : l); } - + /* okay, okay: I admit it: I absolutely have _NO_ idea why __fixdfdi does not get linked in by gcc from libgcc.a because I know it's in there: I checked with `ar x _fixdfdi.o libgcc.a` and the symbol is in there, so I'm lost and had to fix it this way. I tried all gcc and ld options I could find: no hope :( If someone can enlighten me: feel free to let me know at sumthinwicked@users.sf.net! Much obliged. - PS1. I think for __fixunsdfdi they have made a circumvention by having to add STATICLIBRARY EGCC.LIB + PS1. I think for __fixunsdfdi they have made a circumvention by having to add STATICLIBRARY EGCC.LIB PS2. http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg01596.html might have found out the same problem there */ @@ -117,7 +117,7 @@ return strlen(str); } - int inline scumm_vsnprintf (char *str, unsigned long /*n*/, char const *fmt, va_list valist) { + int inline scumm_vsnprintf (char *str, unsigned long /*n*/, char const *fmt, va_list valist) { vsprintf(str, fmt, valist); return strlen(str); } |