summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-10 16:54:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-10 17:25:07 +0300
commit3a28edfb7ac991ad70a7baf76f48218d9db89bcb (patch)
tree918e56537dd2f7c2ce94e97a297a83a55d6f6ea6 /src/compoundsprite.cpp
parentf199b9ba7da47cb6f9aa95f843c0628621899aa9 (diff)
downloadmv-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.gz
mv-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.bz2
mv-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.tar.xz
mv-3a28edfb7ac991ad70a7baf76f48218d9db89bcb.zip
Split ImageHelper to ImageHelper, SDLImageHelper, OpenGLImageHelper.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 41a53467e..fe6e6ba2a 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -34,6 +34,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
+#include "resources/openglimagehelper.h"
#include "utils/dtor.h"
@@ -396,12 +397,12 @@ void CompoundSprite::redraw() const
delete mImage;
delete mAlphaImage;
- mImage = ImageHelper::load(surface);
+ mImage = imageHelper->load(surface);
SDL_FreeSurface(surface);
if (ImageHelper::mEnableAlpha)
{
- mAlphaImage = ImageHelper::load(surfaceA);
+ mAlphaImage = imageHelper->load(surfaceA);
SDL_FreeSurface(surfaceA);
}
else
@@ -415,7 +416,8 @@ void CompoundSprite::setAlpha(float alpha)
if (alpha != mAlpha)
{
#ifdef USE_OPENGL
- if (mEnableAlphaFix && ImageHelper::mUseOpenGL == 0 && size() > 3)
+ if (mEnableAlphaFix && imageHelper->useOpenGL() == 0
+ && size() > 3)
#else
if (mEnableAlphaFix && size() > 3)
#endif
@@ -434,7 +436,7 @@ void CompoundSprite::setAlpha(float alpha)
void CompoundSprite::updateImages() const
{
#ifdef USE_OPENGL
- if (ImageHelper::mUseOpenGL)
+ if (imageHelper->useOpenGL())
return;
#endif