diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-29 23:14:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-29 23:39:00 +0300 |
commit | ab7cbe78ea676d5932881152631e6a6eafa530de (patch) | |
tree | 47610db47cbaeb0a8e275f7dc35524b1e87b756c /src/render/safeopenglgraphics.cpp | |
parent | d02762b6dc35e1564e5d1cc7458458f824f251f9 (diff) | |
download | ManaVerse-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.gz ManaVerse-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.bz2 ManaVerse-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.xz ManaVerse-ab7cbe78ea676d5932881152631e6a6eafa530de.zip |
Remove useless bool return value from renderers.
Diffstat (limited to 'src/render/safeopenglgraphics.cpp')
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 53b842839..fc202df44 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -149,18 +149,18 @@ static inline void drawRescaledQuad(const Image *const image, } } -bool SafeOpenGLGraphics::drawImage(const Image *const image, +void SafeOpenGLGraphics::drawImage(const Image *const image, int dstX, int dstY) { - return drawImageInline(image, dstX, dstY); + drawImageInline(image, dstX, dstY); } -bool SafeOpenGLGraphics::drawImageInline(const Image *const image, +void SafeOpenGLGraphics::drawImageInline(const Image *const image, int dstX, int dstY) { FUNC_BLOCK("Graphics::drawImage", 1) if (!image) - return false; + return; setColorAlpha(image->mAlpha); bindTexture(OpenGLImageHelper::mTextureType, image->mGLImage); @@ -172,14 +172,12 @@ bool SafeOpenGLGraphics::drawImageInline(const Image *const image, drawQuad(image, bounds.x, bounds.y, dstX, dstY, bounds.w, bounds.h); glEnd(); - - return true; } -bool SafeOpenGLGraphics::copyImage(const Image *const image, +void SafeOpenGLGraphics::copyImage(const Image *const image, int dstX, int dstY) { - return drawImageInline(image, dstX, dstY); + drawImageInline(image, dstX, dstY); } void SafeOpenGLGraphics::testDraw() @@ -273,20 +271,23 @@ void SafeOpenGLGraphics::completeCache() { } -bool SafeOpenGLGraphics::drawRescaledImage(const Image *const image, +void SafeOpenGLGraphics::drawRescaledImage(const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight) { FUNC_BLOCK("Graphics::drawRescaledImage", 1) if (!image) - return false; + return; const SDL_Rect &imageRect = image->mBounds; // Just draw the image normally when no resizing is necessary, if (imageRect.w == desiredWidth && imageRect.h == desiredHeight) - return drawImageInline(image, dstX, dstY); + { + drawImageInline(image, dstX, dstY); + return; + } setColorAlpha(image->mAlpha); bindTexture(OpenGLImageHelper::mTextureType, image->mGLImage); @@ -297,8 +298,6 @@ bool SafeOpenGLGraphics::drawRescaledImage(const Image *const image, drawRescaledQuad(image, imageRect.x, imageRect.y, dstX, dstY, imageRect.w, imageRect.h, desiredWidth, desiredHeight); glEnd(); - - return true; } void SafeOpenGLGraphics::drawPattern(const Image *const image, @@ -570,7 +569,7 @@ SDL_Surface* SafeOpenGLGraphics::getScreenshot() return screenshot; } -bool SafeOpenGLGraphics::pushClipArea(const Rect &area) +void SafeOpenGLGraphics::pushClipArea(const Rect &area) { int transX = 0; int transY = 0; @@ -582,7 +581,7 @@ bool SafeOpenGLGraphics::pushClipArea(const Rect &area) transY = -clipArea.yOffset; } - const bool result = Graphics::pushClipArea(area); + Graphics::pushClipArea(area); const ClipRect &clipArea = mClipStack.top(); @@ -593,7 +592,6 @@ bool SafeOpenGLGraphics::pushClipArea(const Rect &area) (mRect.h - clipArea.y - clipArea.height) * mScale, clipArea.width * mScale, clipArea.height * mScale); - return result; } void SafeOpenGLGraphics::popClipArea() @@ -621,7 +619,7 @@ void SafeOpenGLGraphics::drawPoint(int x, int y) glEnd(); } -bool SafeOpenGLGraphics::drawNet(const int x1, const int y1, +void SafeOpenGLGraphics::drawNet(const int x1, const int y1, const int x2, const int y2, const int width, const int height) { @@ -645,8 +643,6 @@ bool SafeOpenGLGraphics::drawNet(const int x1, const int y1, static_cast<float>(y2) + 0.5F); } glEnd(); - - return true; } void SafeOpenGLGraphics::drawLine(int x1, int y1, int x2, int y2) |