diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/image.cpp | 12 | ||||
-rw-r--r-- | src/resources/imageset.cpp | 4 | ||||
-rw-r--r-- | src/resources/imageset.h | 2 | ||||
-rw-r--r-- | src/resources/wallpaper.cpp | 3 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 4b5fa4f40..7cfb11822 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -51,15 +51,15 @@ Image::Image(SDL_Surface *image, bool hasAlphaChannel0, uint8_t *alphaChannel): mHasAlphaChannel(hasAlphaChannel0), mSDLSurface(image), mAlphaChannel(alphaChannel), + mUseAlphaCache(SDLImageHelper::mEnableAlphaCache), mIsAlphaVisible(hasAlphaChannel0), - mIsAlphaCalculated(false) -{ #ifdef USE_OPENGL - mGLImage = 0; + mIsAlphaCalculated(false), + mGLImage(0) +#else + mIsAlphaCalculated(false) #endif - - mUseAlphaCache = SDLImageHelper::mEnableAlphaCache; - +{ mBounds.x = 0; mBounds.y = 0; diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp index 9e3513e91..4b63d0883 100644 --- a/src/resources/imageset.cpp +++ b/src/resources/imageset.cpp @@ -32,6 +32,8 @@ ImageSet::ImageSet(Image *img, int width, int height, int margin, int spacing) : + mWidth(width), + mHeight(height), mOffsetX(0), mOffsetY(0) { @@ -47,8 +49,6 @@ ImageSet::ImageSet(Image *img, int width, int height, } } } - mWidth = width; - mHeight = height; } ImageSet::~ImageSet() diff --git a/src/resources/imageset.h b/src/resources/imageset.h index edfc4b123..aef4bf694 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -78,8 +78,8 @@ class ImageSet : public Resource private: std::vector<Image*> mImages; - int mHeight; /**< Height of the images in the image set. */ int mWidth; /**< Width of the images in the image set. */ + int mHeight; /**< Height of the images in the image set. */ int mOffsetX; int mOffsetY; }; diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 2f5fd9dca..316419627 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -33,6 +33,7 @@ #include <algorithm> #include <cstring> #include <time.h> +#include <iostream> #include "debug.h" @@ -84,7 +85,7 @@ bool wallpaperCompare(WallpaperData a, WallpaperData b) return (aa > ab || (aa == ab && a.width > b.width)); } -#include <iostream> + void Wallpaper::loadWallpapers() { wallpaperData.clear(); |