aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base/BRenderSDL.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-22 14:10:08 +0200
committerEinar Johan Trøan Sømåen2012-06-22 14:10:08 +0200
commit4e33b8ea75719cbeaf9b62c527fd49e94abd6e3e (patch)
tree80108256f0cd627c6d17913fbce7aa8420fab987 /engines/wintermute/Base/BRenderSDL.cpp
parentb06f4ac72c2ea3d4b05ece81a60f699b0bf70086 (diff)
downloadscummvm-rg350-4e33b8ea75719cbeaf9b62c527fd49e94abd6e3e.tar.gz
scummvm-rg350-4e33b8ea75719cbeaf9b62c527fd49e94abd6e3e.tar.bz2
scummvm-rg350-4e33b8ea75719cbeaf9b62c527fd49e94abd6e3e.zip
WINTERMUTE: Run astyle on the source-files.
Diffstat (limited to 'engines/wintermute/Base/BRenderSDL.cpp')
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index 83adca59f3..54119d3a7a 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -145,7 +145,7 @@ HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) {
g_system->beginGFXTransaction();
g_system->initSize(_width, _height, &format);
OSystem::TransactionError gfxError = g_system->endGFXTransaction();
-
+
if (gfxError != OSystem::kTransactionSuccess) {
warning("Couldn't setup GFX-backend for %dx%dx%d", _width, _height, format.bytesPerPixel * 8);
return E_FAIL;
@@ -275,7 +275,7 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, Common::Rect *rect) {
warning("Implement CBRenderSDL::FadeToColor"); // TODO.
hasWarned = true;
}
-
+
Common::Rect fillRect;
if (rect) {
@@ -317,7 +317,7 @@ void CBRenderSDL::drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect
mirror |= TransparentSurface::FLIP_V;
if (mirrorY)
mirror |= TransparentSurface::FLIP_H;
- src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, srcRect, _colorMod, dstRect->width(), dstRect->height() );
+ src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, srcRect, _colorMod, dstRect->width(), dstRect->height());
}
void CBRenderSDL::drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY) {
@@ -332,31 +332,31 @@ void CBRenderSDL::drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *s
img = &src;
}
- int posX = dstRect->left;
+ int posX = dstRect->left;
int posY = dstRect->top;
-
+
// Handle off-screen clipping
if (posY < 0) {
img->h = MAX(0, (int)img->h - -posY);
img->pixels = (byte *)img->pixels + img->pitch * -posY;
posY = 0;
}
-
+
if (posX < 0) {
img->w = MAX(0, (int)img->w - -posX);
img->pixels = (byte *)img->pixels + (-posX * 4);
posX = 0;
}
-
+
img->w = CLIP((int)img->w, 0, (int)MAX((int)_renderSurface->w - posX, 0));
img->h = CLIP((int)img->h, 0, (int)MAX((int)_renderSurface->h - posY, 0));
-
+
for (int i = 0; i < img->h; i++) {
void *destPtr = _renderSurface->getBasePtr(posX, posY + i);
void *srcPtr = img->getBasePtr(0, i);
memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel * img->w);
}
-
+
if (imgScaled) {
imgScaled->pixels = savedPixels;
imgScaled->free();