summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 802f2ee12..8f5ee1d2d 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -49,12 +49,12 @@ int Image::mTextureSize = 0;
bool Image::mEnableAlphaCache = false;
bool Image::mEnableAlpha = true;
-Image::Image(SDL_Surface *image, bool hasAlphaChannel, Uint8 *alphaChannel):
+Image::Image(SDL_Surface *image, bool hasAlphaChannel0, Uint8 *alphaChannel):
mAlpha(1.0f),
- mHasAlphaChannel(hasAlphaChannel),
+ mHasAlphaChannel(hasAlphaChannel0),
mSDLSurface(image),
mAlphaChannel(alphaChannel),
- mIsAlphaVisible(hasAlphaChannel),
+ mIsAlphaVisible(hasAlphaChannel0),
mIsAlphaCalculated(false)
{
#ifdef USE_OPENGL
@@ -336,7 +336,7 @@ bool Image::hasAlphaChannel()
SDL_Surface *Image::getByAlpha(float alpha)
{
- std::map<float, SDL_Surface*>::iterator it = mAlphaCache.find(alpha);
+ std::map<float, SDL_Surface*>::const_iterator it = mAlphaCache.find(alpha);
if (it != mAlphaCache.end())
return (*it).second;
return 0;
@@ -361,7 +361,7 @@ void Image::setAlpha(float alpha)
{
#ifdef DEBUG_ALPHA_CACHE
logger->log("cleanCache");
- for (std::map<float, SDL_Surface*>::iterator
+ for (std::map<float, SDL_Surface*>::const_iterator
i = mAlphaCache.begin(), i_end = mAlphaCache.end();
i != i_end; ++i)
{