From 14c89c0f50dd04c1187819abcc24490fa975574e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 9 Apr 2011 20:00:06 +0300 Subject: Small fix to code style and compilation warning. --- src/graphics.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/graphics.cpp') diff --git a/src/graphics.cpp b/src/graphics.cpp index 1e2fc0fb4..9912a3e7b 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -620,7 +620,7 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect, } /* clip the source rectangle to the source surface */ - if(srcrect) + if (srcrect) { int maxw, maxh; @@ -650,7 +650,8 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect, } else { - srcx = srcy = 0; + srcx = 0; + srcy = 0; w = src->w; h = src->h; } @@ -661,29 +662,29 @@ int Graphics::SDL_FakeUpperBlit (SDL_Surface *src, SDL_Rect *srcrect, int dx, dy; dx = clip->x - dstrect->x; - if(dx > 0) + if (dx > 0) { w -= dx; dstrect->x += dx; srcx += dx; } dx = dstrect->x + w - clip->x - clip->w; - if(dx > 0) + if (dx > 0) w -= dx; dy = clip->y - dstrect->y; - if(dy > 0) + if (dy > 0) { h -= dy; dstrect->y += dy; srcy += dy; } dy = dstrect->y + h - clip->y - clip->h; - if(dy > 0) + if (dy > 0) h -= dy; } - if(w > 0 && h > 0) + if (w > 0 && h > 0) { srcrect->x = srcx; srcrect->y = srcy; -- cgit v1.2.3-60-g2f50