summaryrefslogtreecommitdiff
path: root/src/resources/sdlimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-24 15:31:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commitb70bbf075a20524e6c1859fb18db0865c65182ca (patch)
treed5c4974d004da809b2e723b2b883faabfb95ae2f /src/resources/sdlimagehelper.cpp
parent8f670620dbf4c8092e9f834f9d65cbc607b81511 (diff)
downloadplus-b70bbf075a20524e6c1859fb18db0865c65182ca.tar.gz
plus-b70bbf075a20524e6c1859fb18db0865c65182ca.tar.bz2
plus-b70bbf075a20524e6c1859fb18db0865c65182ca.tar.xz
plus-b70bbf075a20524e6c1859fb18db0865c65182ca.zip
move surface combination into sdlimagehelper.
Diffstat (limited to 'src/resources/sdlimagehelper.cpp')
-rw-r--r--src/resources/sdlimagehelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index 7a1953444..7a7de1906 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -33,6 +33,7 @@
#include "resources/image.h"
+#include <SDL_gfxBlitFunc.h>
#include <SDL_image.h>
#include "debug.h"
@@ -295,4 +296,13 @@ SDL_Surface *SDLImageHelper::create32BitSurface(int width, int height) const
return SDL_CreateRGBSurface(SDL_SWSURFACE,
width, height, 32, rmask, gmask, bmask, amask);
}
+
+int SDLImageHelper::combineSurface(SDL_Surface *const src,
+ SDL_Rect *const srcrect,
+ SDL_Surface *const dst,
+ SDL_Rect *const dstrect)
+{
+ return SDL_gfxBlitRGBA(src, srcrect, dst, dstrect);
+}
+
#endif // USE_SDL2