diff options
author | Johannes Schickel | 2009-05-24 15:17:42 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-24 15:17:42 +0000 |
commit | b3c6751b9b7fc1401fd5e87a034cdaec92b67b20 (patch) | |
tree | aa00dba58fb88ea2e095b886963370c7290c692b /backends/platform/iphone | |
parent | 7c1eb057146af11793c627327f3fefe309d27fbb (diff) | |
download | scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.gz scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.tar.bz2 scummvm-rg350-b3c6751b9b7fc1401fd5e87a034cdaec92b67b20.zip |
Strip trailing whitespaces in the whole code base.
svn-id: r40867
Diffstat (limited to 'backends/platform/iphone')
-rw-r--r-- | backends/platform/iphone/blit.cpp | 8 | ||||
-rw-r--r-- | backends/platform/iphone/iphone_common.h | 2 | ||||
-rw-r--r-- | backends/platform/iphone/iphone_video.h | 2 | ||||
-rw-r--r-- | backends/platform/iphone/osys_iphone.cpp | 64 | ||||
-rw-r--r-- | backends/platform/iphone/osys_iphone.h | 12 |
5 files changed, 44 insertions, 44 deletions
diff --git a/backends/platform/iphone/blit.cpp b/backends/platform/iphone/blit.cpp index 1a3352945d..c28f931983 100644 --- a/backends/platform/iphone/blit.cpp +++ b/backends/platform/iphone/blit.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -27,7 +27,7 @@ #include "blit_arm.h" void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src, int width, int height, int screenWidth, int screenHeight) -{ +{ for (int x = width; x > 0; x--) { for (int y = height; y > 0; y--) { *(dst++) = *src; @@ -47,5 +47,5 @@ void blitLandscapeScreenRect8bpp(uint16 *dst, byte *src, int width, int height, } dst -= screenHeight + height; src += 1 - height * screenWidth; - } + } } diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h index 57dc991e9d..90d9a50aad 100644 --- a/backends/platform/iphone/iphone_common.h +++ b/backends/platform/iphone/iphone_common.h @@ -66,7 +66,7 @@ void iPhone_updateScreenRect(unsigned short* screen, int x1, int y1, int x2, int void iPhone_initSurface(int width, int height); bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY); const char* iPhone_getDocumentsDir(); - + #ifdef __cplusplus } #endif diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h index 3d5715bb95..daa5e1d18e 100644 --- a/backends/platform/iphone/iphone_video.h +++ b/backends/platform/iphone/iphone_video.h @@ -47,7 +47,7 @@ int _fullHeight; int _widthOffset; int _heightOffset; - + EAGLContext* _context; GLuint _viewRenderbuffer; GLuint _viewFramebuffer; diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp index 192ea096ae..b72e8b65d5 100644 --- a/backends/platform/iphone/osys_iphone.cpp +++ b/backends/platform/iphone/osys_iphone.cpp @@ -88,7 +88,7 @@ int OSystem_IPHONE::timerHandler(int t) { void OSystem_IPHONE::initBackend() { #ifdef IPHONE_OFFICIAL - _savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir()); + _savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir()); #else _savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH); #endif @@ -159,7 +159,7 @@ void OSystem_IPHONE::initSize(uint width, uint height) { bzero(_fullscreen, fullSize); iPhone_initSurface(width, height); - + _fullScreenIsDirty = false; dirtyFullScreen(); _mouseVisible = false; @@ -300,9 +300,9 @@ void OSystem_IPHONE::internUpdateScreen() { Common::Rect dirtyRect = _dirtyRects.remove_at(_dirtyRects.size() - 1); //printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom); - + drawDirtyRect(dirtyRect); - + if (_overlayVisible) drawDirtyOverlayRect(dirtyRect); @@ -315,7 +315,7 @@ void OSystem_IPHONE::internUpdateScreen() { Common::Rect dirtyRect = _dirtyOverlayRects.remove_at(_dirtyOverlayRects.size() - 1); //printf("Drawing: (%i, %i) -> (%i, %i)\n", dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom); - + drawDirtyOverlayRect(dirtyRect); drawMouseCursorOnRectUpdate(dirtyRect, mouseRect); updateHardwareSurfaceForRect(dirtyRect); @@ -332,7 +332,7 @@ void OSystem_IPHONE::drawDirtyRect(const Common::Rect& dirtyRect) { for (int y = h; y > 0; y--) { for (int x = w; x > 0; x--) *dst++ = _palette[*src++]; - + dst += _screenWidth - w; src += _screenWidth - w; } @@ -392,7 +392,7 @@ void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect } void OSystem_IPHONE::updateHardwareSurfaceForRect(const Common::Rect& updatedRect) { - iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom ); + iPhone_updateScreenRect(_fullscreen, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom ); } Graphics::Surface *OSystem_IPHONE::lockScreen() { @@ -610,7 +610,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) { case kInputMouseDragged: if (!handleEvent_mouseDragged(event, x, y)) return false; - break; + break; case kInputMouseSecondDragged: if (!handleEvent_mouseSecondDragged(event, x, y)) return false; @@ -618,13 +618,13 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) { case kInputMouseSecondDown: _secondaryTapped = true; if (!handleEvent_secondMouseDown(event, x, y)) - return false; + return false; break; case kInputMouseSecondUp: _secondaryTapped = false; if (!handleEvent_secondMouseUp(event, x, y)) - return false; - break; + return false; + break; case kInputOrientationChanged: handleEvent_orientationChanged((int)xUnit); return false; @@ -781,30 +781,30 @@ bool OSystem_IPHONE::handleEvent_mouseDragged(Common::Event &event, int x, int y int deltaY = _lastPadY - y; _lastPadX = x; _lastPadY = y; - + mouseNewPosX = (int)(_mouseX - deltaX / 0.5f); mouseNewPosY = (int)(_mouseY - deltaY / 0.5f); - + if (mouseNewPosX < 0) mouseNewPosX = 0; else if (mouseNewPosX > _screenWidth) mouseNewPosX = _screenWidth; - + if (mouseNewPosY < 0) mouseNewPosY = 0; else if (mouseNewPosY > _screenHeight) mouseNewPosY = _screenHeight; - + } else { mouseNewPosX = x; mouseNewPosY = y; } - + event.type = Common::EVENT_MOUSEMOVE; event.mouse.x = mouseNewPosX; event.mouse.y = mouseNewPosY; warpMouse(mouseNewPosX, mouseNewPosY); - + return true; } @@ -812,27 +812,27 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x, if (_gestureStartX == -1 || _gestureStartY == -1) { return false; } - + int vecX = (x - _gestureStartX); int vecY = (y - _gestureStartY); int lengthSq = vecX * vecX + vecY * vecY; //printf("Lengthsq: %u\n", lengthSq); - + if (lengthSq > 15000) { // Long enough gesture to react upon. _gestureStartX = -1; _gestureStartY = -1; - + float vecLength = sqrt(lengthSq); float vecXNorm = vecX / vecLength; float vecYNorm = vecY / vecLength; - + //printf("Swipe vector: (%.2f, %.2f)\n", vecXNorm, vecYNorm); - + if (vecXNorm > -0.50 && vecXNorm < 0.50 && vecYNorm > 0.75) { // Swipe down event.type = Common::EVENT_KEYDOWN; _queuedInputEvent.type = Common::EVENT_KEYUP; - + event.kbd.flags = _queuedInputEvent.kbd.flags = 0; event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_F5; @@ -849,7 +849,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x, GUI::TimedMessageDialog dialog(dialogMsg, 1500); dialog.runModal(); return false; - + } else if (vecXNorm > 0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) { // Swipe right _touchpadModeEnabled = !_touchpadModeEnabled; @@ -861,12 +861,12 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x, GUI::TimedMessageDialog dialog(dialogMsg, 1500); dialog.runModal(); return false; - + } else if (vecXNorm < -0.75 && vecYNorm > -0.5 && vecYNorm < 0.5) { // Swipe left return false; } - } + } return false; } @@ -893,7 +893,7 @@ void OSystem_IPHONE::handleEvent_orientationChanged(int orientation) { if (_screenOrientation != newOrientation) { _screenOrientation = newOrientation; iPhone_initSurface(_screenWidth, _screenHeight); - + dirtyFullScreen(); if (_overlayVisible) dirtyFullOverlayScreen(); @@ -1231,7 +1231,7 @@ Common::SeekableReadStream *OSystem_IPHONE::createConfigReadStream() { strncat(buf, "/Preferences", 256 - strlen(buf) ); Common::FSNode file(buf); #else - Common::FSNode file(SCUMMVM_PREFS_PATH); + Common::FSNode file(SCUMMVM_PREFS_PATH); #endif return file.createReadStream(); } @@ -1241,10 +1241,10 @@ Common::WriteStream *OSystem_IPHONE::createConfigWriteStream() { char buf[256]; strncpy(buf, iPhone_getDocumentsDir(), 256); strncat(buf, "/Preferences", 256 - strlen(buf) ); - Common::FSNode file(buf); + Common::FSNode file(buf); #else - Common::FSNode file(SCUMMVM_PREFS_PATH); -#endif + Common::FSNode file(SCUMMVM_PREFS_PATH); +#endif return file.createWriteStream(); } @@ -1288,7 +1288,7 @@ void iphone_main(int argc, char *argv[]) { chdir("/var/mobile/"); #endif - + g_system = OSystem_IPHONE_create(); assert(g_system); diff --git a/backends/platform/iphone/osys_iphone.h b/backends/platform/iphone/osys_iphone.h index 140133fb90..ceb2102a5f 100644 --- a/backends/platform/iphone/osys_iphone.h +++ b/backends/platform/iphone/osys_iphone.h @@ -104,7 +104,7 @@ protected: TimerProc _timerCallback; Common::Array<Common::Rect> _dirtyRects; - Common::Array<Common::Rect> _dirtyOverlayRects; + Common::Array<Common::Rect> _dirtyOverlayRects; ScreenOrientation _screenOrientation; bool _fullScreenIsDirty; bool _fullScreenOverlayIsDirty; @@ -168,7 +168,7 @@ public: virtual void quit(); FilesystemFactory *getFilesystemFactory() { return _fsFactory; } - virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); + virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); virtual void getTimeAndDate(struct tm &t) const; virtual void setWindowCaption(const char *caption); @@ -186,13 +186,13 @@ public: protected: void internUpdateScreen(); void dirtyFullScreen(); - void dirtyFullOverlayScreen(); + void dirtyFullOverlayScreen(); void clipRectToScreen(int16 &x, int16 &y, int16 &w, int16 &h); void suspendLoop(); void drawDirtyRect(const Common::Rect& dirtyRect); - void drawDirtyOverlayRect(const Common::Rect& dirtyRect); + void drawDirtyOverlayRect(const Common::Rect& dirtyRect); void drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect, const Common::Rect& mouseRect); - void updateHardwareSurfaceForRect(const Common::Rect& updatedRect); + void updateHardwareSurfaceForRect(const Common::Rect& updatedRect); static void AQBufferCallback(void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB); static int timerHandler(int t); @@ -207,5 +207,5 @@ protected: bool handleEvent_secondMouseUp(Common::Event &event, int x, int y); bool handleEvent_mouseDragged(Common::Event &event, int x, int y); - bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y); + bool handleEvent_mouseSecondDragged(Common::Event &event, int x, int y); }; |