diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-25 13:19:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-25 14:03:36 +0300 |
commit | ba0815355ef7be8e5f46720be5a6911e466e1568 (patch) | |
tree | d464944cc5796535507461fa26b49f636e88a9bf /src/client.cpp | |
parent | 948d940d46240ff518ec9b1037503bebdb47196a (diff) | |
download | manaplus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.gz manaplus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.bz2 manaplus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.xz manaplus-ba0815355ef7be8e5f46720be5a6911e466e1568.zip |
add SurfaceImageHelper for loading/processing surfaces for SDL2.
For SDL1.2 used SDLImageHelper.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client.cpp b/src/client.cpp index 02719debc..72da13128 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -88,7 +88,7 @@ #include "resources/imagehelper.h" #include "resources/openglimagehelper.h" #include "resources/palettedb.h" -#include "resources/sdlimagehelper.h" +#include "resources/surfaceimagehelper.h" #include "resources/sounddb.h" #include "resources/itemdb.h" #include "resources/mapdb.h" @@ -565,13 +565,14 @@ void Client::gameInit() #ifdef USE_OPENGL openGLMode = config.getIntValue("opengl"); OpenGLImageHelper::setBlur(config.getBoolValue("blur")); - SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache") - && !openGLMode); + SurfaceImageHelper::SDLSetEnableAlphaCache( + config.getBoolValue("alphaCache") && !openGLMode); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f || openGLMode); #else openGLMode = 0; - SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache")); + SurfaceImageHelper::SDLSetEnableAlphaCache( + config.getBoolValue("alphaCache")); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); #endif logVars(); @@ -802,9 +803,9 @@ void Client::gameClear() delete mainGraphics; mainGraphics = nullptr; - if (imageHelper != sdlImageHelper) - delete sdlImageHelper; - sdlImageHelper = nullptr; + if (imageHelper != surfaceImageHelper) + delete surfaceImageHelper; + surfaceImageHelper = nullptr; delete imageHelper; imageHelper = nullptr; |