summaryrefslogtreecommitdiff
path: root/src/render/surfacegraphics.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/surfacegraphics.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/surfacegraphics.cpp')
-rw-r--r--src/render/surfacegraphics.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp
index 8691274dd..f3e68ed25 100644
--- a/src/render/surfacegraphics.cpp
+++ b/src/render/surfacegraphics.cpp
@@ -42,13 +42,13 @@ SurfaceGraphics::~SurfaceGraphics()
{
}
-bool SurfaceGraphics::drawImage(const Image *const image,
+void SurfaceGraphics::drawImage(const Image *const image,
int dstX, int dstY)
{
FUNC_BLOCK("Graphics::drawImage", 1)
// Check that preconditions for blitting are met.
if (!mTarget || !image || !image->mSDLSurface)
- return false;
+ return;
const SDL_Rect &imageRect = image->mBounds;
SDL_Rect dstRect;
@@ -66,24 +66,23 @@ bool SurfaceGraphics::drawImage(const Image *const image,
#else
if (mBlitMode == BLIT_NORMAL)
{
- return !(SDL_BlitSurface(image->mSDLSurface, &srcRect,
- mTarget, &dstRect) < 0);
+ SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect);
}
else
{
- return !(SurfaceImageHelper::combineSurface(
- image->mSDLSurface, &srcRect, mTarget, &dstRect) < 0);
+ SurfaceImageHelper::combineSurface(image->mSDLSurface,
+ &srcRect, mTarget, &dstRect);
}
#endif
}
-bool SurfaceGraphics::copyImage(const Image *const image,
+void SurfaceGraphics::copyImage(const Image *const image,
int dstX, int dstY)
{
FUNC_BLOCK("Graphics::drawImage", 1)
// Check that preconditions for blitting are met.
if (!mTarget || !image || !image->mSDLSurface)
- return false;
+ return;
const SDL_Rect &imageRect = image->mBounds;
SDL_Rect dstRect;
@@ -97,11 +96,9 @@ bool SurfaceGraphics::copyImage(const Image *const image,
#ifdef USE_SDL2
// probably need change some flags
- return !(SDL_BlitSurface(image->mSDLSurface, &srcRect,
- mTarget, &dstRect) < 0);
+ SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect);
#else
- return !(SDL_BlitSurface(image->mSDLSurface, &srcRect,
- mTarget, &dstRect) < 0);
+ SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect);
#endif
}