summaryrefslogtreecommitdiff
path: root/src/render/normalopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-29 23:14:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-29 23:39:00 +0300
commitab7cbe78ea676d5932881152631e6a6eafa530de (patch)
tree47610db47cbaeb0a8e275f7dc35524b1e87b756c /src/render/normalopenglgraphics.cpp
parentd02762b6dc35e1564e5d1cc7458458f824f251f9 (diff)
downloadplus-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.gz
plus-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.bz2
plus-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.xz
plus-ab7cbe78ea676d5932881152631e6a6eafa530de.zip
Remove useless bool return value from renderers.
Diffstat (limited to 'src/render/normalopenglgraphics.cpp')
-rw-r--r--src/render/normalopenglgraphics.cpp36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 57f1d58cb..bbe6c8851 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -330,19 +330,18 @@ static inline void drawRescaledQuad(const Image *const image,
}
}
-bool NormalOpenGLGraphics::drawImage(const Image *const image,
+void NormalOpenGLGraphics::drawImage(const Image *const image,
int dstX, int dstY)
{
- return drawImageInline(image, dstX, dstY);
+ drawImageInline(image, dstX, dstY);
}
-bool NormalOpenGLGraphics::drawImageInline(const Image *const image,
+void NormalOpenGLGraphics::drawImageInline(const Image *const image,
int dstX, int dstY)
{
FUNC_BLOCK("Graphics::drawImage", 1)
if (!image)
- return false;
-
+ return;
setColorAlpha(image->mAlpha);
#ifdef DEBUG_BIND_TEXTURE
@@ -354,14 +353,12 @@ bool NormalOpenGLGraphics::drawImageInline(const Image *const image,
const SDL_Rect &imageRect = image->mBounds;
drawQuad(image, imageRect.x, imageRect.y,
dstX, dstY, imageRect.w, imageRect.h);
-
- return true;
}
-bool NormalOpenGLGraphics::copyImage(const Image *const image,
+void NormalOpenGLGraphics::copyImage(const Image *const image,
int dstX, int dstY)
{
- return drawImageInline(image, dstX, dstY);
+ drawImageInline(image, dstX, dstY);
}
void NormalOpenGLGraphics::testDraw()
@@ -594,20 +591,23 @@ void NormalOpenGLGraphics::completeCache()
mVpCached = 0;
}
-bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image,
+void NormalOpenGLGraphics::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);
#ifdef DEBUG_BIND_TEXTURE
@@ -619,8 +619,6 @@ bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image,
// Draw a textured quad.
drawRescaledQuad(image, imageRect.x, imageRect.y, dstX, dstY,
imageRect.w, imageRect.h, desiredWidth, desiredHeight);
-
- return true;
}
void NormalOpenGLGraphics::drawPattern(const Image *const image,
@@ -1318,7 +1316,7 @@ SDL_Surface* NormalOpenGLGraphics::getScreenshot()
return screenshot;
}
-bool NormalOpenGLGraphics::pushClipArea(const Rect &area)
+void NormalOpenGLGraphics::pushClipArea(const Rect &area)
{
int transX = 0;
int transY = 0;
@@ -1330,7 +1328,7 @@ bool NormalOpenGLGraphics::pushClipArea(const Rect &area)
transY = -clipArea.yOffset;
}
- const bool result = Graphics::pushClipArea(area);
+ Graphics::pushClipArea(area);
const ClipRect &clipArea = mClipStack.top();
transX += clipArea.xOffset;
@@ -1345,8 +1343,6 @@ bool NormalOpenGLGraphics::pushClipArea(const Rect &area)
(mRect.h - clipArea.y - clipArea.height) * mScale,
clipArea.width * mScale,
clipArea.height * mScale);
-
- return result;
}
void NormalOpenGLGraphics::popClipArea()
@@ -1484,7 +1480,7 @@ void NormalOpenGLGraphics::drawRectangle(const Rect& rect,
BLOCK_END("Graphics::drawRectangle")
}
-bool NormalOpenGLGraphics::drawNet(const int x1, const int y1,
+void NormalOpenGLGraphics::drawNet(const int x1, const int y1,
const int x2, const int y2,
const int width, const int height)
{
@@ -1533,8 +1529,6 @@ bool NormalOpenGLGraphics::drawNet(const int x1, const int y1,
if (vp > 0)
drawLineArrayf(vp);
-
- return true;
}
void NormalOpenGLGraphics::bindTexture(const GLenum target,