summaryrefslogtreecommitdiff
path: root/src/render/sdl2graphics.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/sdl2graphics.cpp
parentd02762b6dc35e1564e5d1cc7458458f824f251f9 (diff)
downloadmanaverse-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/sdl2graphics.cpp')
-rw-r--r--src/render/sdl2graphics.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index fc9c8222d..b585d8467 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -141,17 +141,15 @@ SDLGraphics::~SDLGraphics()
{
}
-bool SDLGraphics::drawRescaledImage(const Image *const image,
+void SDLGraphics::drawRescaledImage(const Image *const image,
int dstX, int dstY,
const int desiredWidth,
const int desiredHeight)
{
FUNC_BLOCK("Graphics::drawRescaledImage", 1)
// Check that preconditions for blitting are met.
- if (!mWindow || !image)
- return false;
- if (!image->mTexture)
- return false;
+ if (!mWindow || !image || !image->mTexture)
+ return;
const ClipRect &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
@@ -170,27 +168,26 @@ bool SDLGraphics::drawRescaledImage(const Image *const image,
static_cast<int32_t>(desiredHeight)
};
- return (MSDL_RenderCopy(mRenderer, image->mTexture,
- &srcRect, &dstRect) < 0);
+ MSDL_RenderCopy(mRenderer, image->mTexture, &srcRect, &dstRect);
}
-bool SDLGraphics::drawImage(const Image *const image,
+void SDLGraphics::drawImage(const Image *const image,
int dstX, int dstY)
{
- return drawImageInline(image, dstX, dstY);
+ drawImageInline(image, dstX, dstY);
}
-bool SDLGraphics::drawImageInline(const Image *const image,
+void SDLGraphics::drawImageInline(const Image *const image,
int dstX, int dstY)
{
FUNC_BLOCK("Graphics::drawImage", 1)
// Check that preconditions for blitting are met.
if (!mWindow || !image || !image->mTexture)
- return false;
+ return;
const ClipRect &top = mClipStack.top();
if (!top.width || !top.height)
- return false;
+ return;
const SDL_Rect &bounds = image->mBounds;
const SDL_Rect srcRect =
@@ -209,13 +206,13 @@ bool SDLGraphics::drawImageInline(const Image *const image,
static_cast<int32_t>(bounds.h)
};
- return !MSDL_RenderCopy(mRenderer, image->mTexture, &srcRect, &dstRect);
+ MSDL_RenderCopy(mRenderer, image->mTexture, &srcRect, &dstRect);
}
-bool SDLGraphics::copyImage(const Image *const image,
+void SDLGraphics::copyImage(const Image *const image,
int dstX, int dstY)
{
- return drawImageInline(image, dstX, dstY);
+ drawImageInline(image, dstX, dstY);
}
void SDLGraphics::drawImageCached(const Image *const image,
@@ -672,14 +669,13 @@ void SDLGraphics::endDraw()
popClipArea();
}
-bool SDLGraphics::pushClipArea(const Rect &area)
+void SDLGraphics::pushClipArea(const Rect &area)
{
- const bool result = Graphics::pushClipArea(area);
+ Graphics::pushClipArea(area);
const ClipRect &carea = mClipStack.top();
defRectFromArea(rect, carea);
SDL_RenderSetClipRect(mRenderer, &rect);
- return result;
}
void SDLGraphics::popClipArea()