summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-15 12:37:55 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-15 12:37:55 +0300
commit054ed0b25bffc50588ff8c11a0aef4ee74c8136d (patch)
treeec84f607d68cf22d911e7211d06134914ef21adf /src/resources/image.cpp
parenta970bdd2d4d7e695f82f854c1efc81881dfebb30 (diff)
downloadmv-054ed0b25bffc50588ff8c11a0aef4ee74c8136d.tar.gz
mv-054ed0b25bffc50588ff8c11a0aef4ee74c8136d.tar.bz2
mv-054ed0b25bffc50588ff8c11a0aef4ee74c8136d.tar.xz
mv-054ed0b25bffc50588ff8c11a0aef4ee74c8136d.zip
improve image class.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 407274459..21c492845 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -183,7 +183,7 @@ SDL_Surface *Image::getByAlpha(const float alpha)
return nullptr;
}
-void Image::setAlpha(float alpha)
+void Image::setAlpha(const float alpha)
{
if (mAlpha == alpha || !ImageHelper::mEnableAlpha)
return;
@@ -223,11 +223,8 @@ void Image::setAlpha(float alpha)
surface = getByAlpha(alpha);
if (surface)
{
-// logger->log("hit");
if (mSDLSurface == surface)
logger->log("bug");
-// else
-// SDL_FreeSurface(mSDLSurface);
mAlphaCache.erase(alpha);
mSDLSurface = surface;
mAlpha = alpha;
@@ -237,7 +234,6 @@ void Image::setAlpha(float alpha)
{
mSDLSurface = SDLImageHelper::SDLDuplicateSurface(mSDLSurface);
}
- // logger->log("miss");
}
mAlpha = alpha;