From f28e134247c2017c8a5d9df54a1f745dc7802028 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 19 Jun 2011 18:48:30 +0200 Subject: OPENGL: Formatting fixes. --- backends/graphics/opengl/opengl-graphics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'backends/graphics/opengl/opengl-graphics.cpp') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index c0551de386..9ec38dbbed 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -179,7 +179,7 @@ bool OpenGLGraphicsManager::setGraphicsMode(int mode) { } int OpenGLGraphicsManager::getGraphicsMode() const { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); return _videoMode.mode; } @@ -420,12 +420,12 @@ void OpenGLGraphicsManager::fillScreen(uint32 col) { } void OpenGLGraphicsManager::updateScreen() { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); internUpdateScreen(); } void OpenGLGraphicsManager::setShakePos(int shakeOffset) { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); _shakePos = shakeOffset; } @@ -440,7 +440,7 @@ void OpenGLGraphicsManager::clearFocusRectangle() { // void OpenGLGraphicsManager::showOverlay() { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); if (_overlayVisible) return; @@ -451,7 +451,7 @@ void OpenGLGraphicsManager::showOverlay() { } void OpenGLGraphicsManager::hideOverlay() { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); if (!_overlayVisible) return; @@ -483,7 +483,7 @@ void OpenGLGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) { } void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); if (_overlayTexture == NULL) return; -- cgit v1.2.3 From e0eb86826e5855bae1a8cc2ce81fa935b891d128 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 19 Jun 2011 19:03:10 +0200 Subject: OPENGL: Clarify OSD rect color in a comment. --- backends/graphics/opengl/opengl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics/opengl/opengl-graphics.cpp') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 9ec38dbbed..4c2c70daf2 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -1413,7 +1413,7 @@ void OpenGLGraphicsManager::updateOSD() { int dstX = (_osdSurface.w - width) / 2; int dstY = (_osdSurface.h - height) / 2; - // Draw a dark gray rect + // Draw a dark gray rect (R = 40, G = 40, B = 40) const uint16 color = 0x294B; _osdSurface.fillRect(Common::Rect(dstX, dstY, dstX + width, dstY + height), color); -- cgit v1.2.3 From 88913c0139ac6d1dfb356d3048702b7bc8ef4079 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 20 Jun 2011 00:59:48 +0200 Subject: ALL: Remove trailing whitespaces This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//' --- backends/graphics/opengl/opengl-graphics.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'backends/graphics/opengl/opengl-graphics.cpp') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 4c2c70daf2..046be4c669 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -642,7 +642,7 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uint num) { assert(colors); - + // Save the cursor palette memcpy(_cursorPalette + start * 3, colors, num * 3); @@ -1315,7 +1315,7 @@ bool OpenGLGraphicsManager::notifyEvent(const Common::Event &event) { bool OpenGLGraphicsManager::saveScreenshot(const char *filename) { int width = _videoMode.hardwareWidth; int height = _videoMode.hardwareHeight; - + // A line of a BMP image must have a size divisible by 4. // We calculate the padding bytes needed here. // Since we use a 3 byte per pixel mode, we can use width % 4 here, since @@ -1358,7 +1358,7 @@ bool OpenGLGraphicsManager::saveScreenshot(const char *filename) { out.writeUint32LE(0); out.writeUint32LE(0); out.writeUint32LE(0); - out.writeUint32LE(0); + out.writeUint32LE(0); // Write pixel data to BMP out.write(pixels, lineSize * height); @@ -1423,9 +1423,9 @@ void OpenGLGraphicsManager::updateOSD() { dstX, dstY + i * lineHeight + vOffset + lineSpacing, width, 0xFFFF, Graphics::kTextAlignCenter); } - + // Update the texture - _osdTexture->updateBuffer(_osdSurface.pixels, _osdSurface.pitch, 0, 0, + _osdTexture->updateBuffer(_osdSurface.pixels, _osdSurface.pitch, 0, 0, _osdSurface.w, _osdSurface.h); } #endif -- cgit v1.2.3