From ff11053f5f638749c3564c464dc41ebc474b4897 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 9 Jun 2012 22:46:34 +0300 Subject: Move static methods from Image class to ImageHelper class. Remove SDL merge method. It was very slow and unused. --- src/client.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 95317f682..35658f0f9 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -85,6 +85,7 @@ #include "resources/colordb.h" #include "resources/emotedb.h" #include "resources/image.h" +#include "resources/imagehelper.h" #include "resources/itemdb.h" #include "resources/mapdb.h" #include "resources/monsterdb.h" @@ -397,14 +398,14 @@ void Client::gameInit() } #if defined USE_OPENGL - Image::setBlur(config.getBoolValue("blur")); - Image::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache") + ImageHelper::setBlur(config.getBoolValue("blur")); + ImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache") && !config.getIntValue("opengl")); - Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f + ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f || config.getIntValue("opengl")); #else - Image::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache")); - Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); + ImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache")); + ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); #endif resman->addToSearchPath(PKG_DATADIR "data/perserver/default", false); @@ -1504,7 +1505,7 @@ void Client::optionChanged(const std::string &name) else if (name == "guialpha") { setGuiAlpha(config.getFloatValue("guialpha")); - Image::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); + ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); } else if (name == "gamma") { -- cgit v1.2.3-60-g2f50