diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/image.cpp | 2 | ||||
-rw-r--r-- | src/resources/imagehelper.h | 3 | ||||
-rw-r--r-- | src/resources/openglimagehelper.cpp | 2 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.cpp | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index b060be6f4..3c5a2a97e 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -241,7 +241,7 @@ void Image::setAlpha(float alpha) mAlpha = alpha; - if (!hasAlphaChannel()) + if (!mHasAlphaChannel) { // Set the alpha value this image is drawn at SDL_SetAlpha(mSDLSurface, SDL_SRCALPHA, diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h index b0cbca7e6..c31feb322 100644 --- a/src/resources/imagehelper.h +++ b/src/resources/imagehelper.h @@ -39,6 +39,9 @@ struct Position; */ class ImageHelper { + friend class CompoundSprite; + friend class Image; + public: virtual ~ImageHelper() { } diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 1de5305c4..db75a7b0c 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -69,7 +69,7 @@ Resource *OpenGLImageHelper::load(SDL_RWops *rw, Dye const &dye) for (Uint32 *p_end = pixels + surf->w * surf->h; pixels != p_end; ++pixels) { - Uint8 *p = (Uint8 *)pixels; + Uint8 *p = reinterpret_cast<Uint8 *>(pixels); const int alpha = *p & 255; if (!alpha) continue; diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index 66e1bc823..a416a35d2 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -73,7 +73,7 @@ Resource *SDLImageHelper::load(SDL_RWops *rw, Dye const &dye) for (Uint32 *p_end = pixels + surf->w * surf->h; pixels != p_end; ++pixels) { - Uint8 *p = (Uint8 *)pixels; + Uint8 *p = reinterpret_cast<Uint8 *>(pixels); const int alpha = *p & 255; if (!alpha) continue; |