aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-15 02:21:08 +0100
committerJohannes Schickel2012-02-15 02:23:54 +0100
commit37e5b209a71af725456a42be2605dea28ffceb84 (patch)
treebb7c3bcf857ce5884567891dcc9764913d7ea362 /backends
parentb6f7d697090ca6f90d20f0f2d5661cc4c8b71bf2 (diff)
downloadscummvm-rg350-37e5b209a71af725456a42be2605dea28ffceb84.tar.gz
scummvm-rg350-37e5b209a71af725456a42be2605dea28ffceb84.tar.bz2
scummvm-rg350-37e5b209a71af725456a42be2605dea28ffceb84.zip
OPENGL: More formatting fixes.
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index b69764f7c5..cca8058625 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -81,8 +81,8 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() {
bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) {
return
- (f == OSystem::kFeatureAspectRatioCorrection) ||
- (f == OSystem::kFeatureCursorPalette);
+ (f == OSystem::kFeatureAspectRatioCorrection) ||
+ (f == OSystem::kFeatureCursorPalette);
}
void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
@@ -269,9 +269,9 @@ OSystem::TransactionError OpenGLGraphicsManager::endGFXTransaction() {
}
if (_videoMode.fullscreen == _oldVideoMode.fullscreen &&
- _videoMode.mode == _oldVideoMode.mode &&
- _videoMode.screenWidth == _oldVideoMode.screenWidth &&
- _videoMode.screenHeight == _oldVideoMode.screenHeight) {
+ _videoMode.mode == _oldVideoMode.mode &&
+ _videoMode.screenWidth == _oldVideoMode.screenWidth &&
+ _videoMode.screenHeight == _oldVideoMode.screenHeight) {
_oldVideoMode.setup = false;
}
@@ -420,7 +420,7 @@ void OpenGLGraphicsManager::setShakePos(int shakeOffset) {
_shakePos = shakeOffset;
}
-void OpenGLGraphicsManager::setFocusRectangle(const Common::Rect& rect) {
+void OpenGLGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
}
void OpenGLGraphicsManager::clearFocusRectangle() {
@@ -487,7 +487,8 @@ void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch
}
if (y < 0) {
- h += y; buf -= y * pitch;
+ h += y;
+ buf -= y * pitch;
y = 0;
}
@@ -611,7 +612,7 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int
// Allocate space for cursor data
if (_cursorData.w != w || _cursorData.h != h ||
- _cursorData.format.bytesPerPixel != _cursorFormat.bytesPerPixel)
+ _cursorData.format.bytesPerPixel != _cursorFormat.bytesPerPixel)
_cursorData.create(w, h, _cursorFormat);
// Save cursor data
@@ -715,7 +716,7 @@ void OpenGLGraphicsManager::refreshGameScreen() {
} else {
// Update the texture
_gameTexture->updateBuffer((byte *)_screenData.pixels + y * _screenData.pitch +
- x * _screenData.format.bytesPerPixel, _screenData.pitch, x, y, w, h);
+ x * _screenData.format.bytesPerPixel, _screenData.pitch, x, y, w, h);
}
_screenNeedsRedraw = false;
@@ -757,7 +758,7 @@ void OpenGLGraphicsManager::refreshOverlay() {
} else {
// Update the texture
_overlayTexture->updateBuffer((byte *)_overlayData.pixels + y * _overlayData.pitch +
- x * _overlayData.format.bytesPerPixel, _overlayData.pitch, x, y, w, h);
+ x * _overlayData.format.bytesPerPixel, _overlayData.pitch, x, y, w, h);
}
_overlayNeedsRedraw = false;
@@ -1041,10 +1042,10 @@ void OpenGLGraphicsManager::internUpdateScreen() {
// Draw the cursor
if (_overlayVisible)
_cursorTexture->drawTexture(_cursorState.x - _cursorState.rHotX,
- _cursorState.y - _cursorState.rHotY, _cursorState.rW, _cursorState.rH);
+ _cursorState.y - _cursorState.rHotY, _cursorState.rW, _cursorState.rH);
else
_cursorTexture->drawTexture(_cursorState.x - _cursorState.vHotX,
- _cursorState.y - _cursorState.vHotY, _cursorState.vW, _cursorState.vH);
+ _cursorState.y - _cursorState.vHotY, _cursorState.vW, _cursorState.vH);
glPopMatrix();
}
@@ -1168,23 +1169,23 @@ void OpenGLGraphicsManager::loadTextures() {
if (
#ifdef USE_RGB_COLOR
- _transactionDetails.formatChanged ||
+ _transactionDetails.formatChanged ||
#endif
- _oldVideoMode.screenWidth != _videoMode.screenWidth ||
- _oldVideoMode.screenHeight != _videoMode.screenHeight)
+ _oldVideoMode.screenWidth != _videoMode.screenWidth ||
+ _oldVideoMode.screenHeight != _videoMode.screenHeight)
_screenData.create(_videoMode.screenWidth, _videoMode.screenHeight,
#ifdef USE_RGB_COLOR
- _screenFormat
+ _screenFormat
#else
- Graphics::PixelFormat::createFormatCLUT8()
+ Graphics::PixelFormat::createFormatCLUT8()
#endif
- );
+ );
if (_oldVideoMode.overlayWidth != _videoMode.overlayWidth ||
- _oldVideoMode.overlayHeight != _videoMode.overlayHeight)
+ _oldVideoMode.overlayHeight != _videoMode.overlayHeight)
_overlayData.create(_videoMode.overlayWidth, _videoMode.overlayHeight,
- _overlayFormat);
+ _overlayFormat);
_screenNeedsRedraw = true;
_overlayNeedsRedraw = true;
@@ -1261,8 +1262,8 @@ uint OpenGLGraphicsManager::getAspectRatio() const {
// ratio correction is enabled, but it's better than the previous 4/3 mode
// mess at least...
if (_videoMode.aspectRatioCorrection
- && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200)
- || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400)))
+ && ((_videoMode.screenWidth == 320 && _videoMode.screenHeight == 200)
+ || (_videoMode.screenWidth == 640 && _videoMode.screenHeight == 400)))
return 13333;
else if (_videoMode.mode == OpenGL::GFX_NORMAL)
return _videoMode.hardwareWidth * 10000 / _videoMode.hardwareHeight;
@@ -1355,7 +1356,7 @@ const char *OpenGLGraphicsManager::getCurrentModeName() {
#ifdef USE_OSD
const Graphics::Font *OpenGLGraphicsManager::getFontOSD() {
- return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
+ return FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont);
}
void OpenGLGraphicsManager::updateOSD() {