diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-09 20:00:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-09 20:00:06 +0300 |
commit | 14c89c0f50dd04c1187819abcc24490fa975574e (patch) | |
tree | cddff3ba490b5115c5c71d90a1898bb97f9ee06b /src/graphics.cpp | |
parent | 7e3bd20e9675202e30fac741f3d3acb4f19b109d (diff) | |
download | plus-14c89c0f50dd04c1187819abcc24490fa975574e.tar.gz plus-14c89c0f50dd04c1187819abcc24490fa975574e.tar.bz2 plus-14c89c0f50dd04c1187819abcc24490fa975574e.tar.xz plus-14c89c0f50dd04c1187819abcc24490fa975574e.zip |
Small fix to code style and compilation warning.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r-- | src/graphics.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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; |