diff options
author | Bertram <bertram@cegetel.net> | 2009-08-15 01:49:18 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-08-15 01:49:18 +0200 |
commit | b45392a7cde35aac471813beec94686a8ec240ca (patch) | |
tree | 060351f1e148b2787d52f2fdc89e621f0acc87aa /src/resources/image.h | |
parent | 9d1fbb5a538b3c5a1ba7d5ab55f39033ddb880f1 (diff) | |
download | mana-b45392a7cde35aac471813beec94686a8ec240ca.tar.gz mana-b45392a7cde35aac471813beec94686a8ec240ca.tar.bz2 mana-b45392a7cde35aac471813beec94686a8ec240ca.tar.xz mana-b45392a7cde35aac471813beec94686a8ec240ca.zip |
Mantis #783: Fixed window opacity breaks in software (SDL) mode.
Diffstat (limited to 'src/resources/image.h')
-rw-r--r-- | src/resources/image.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/resources/image.h b/src/resources/image.h index dfa319ab..9c0f9da7 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -118,7 +118,7 @@ class Image : public Resource /** * Tells if the image has got an alpha channel - * @return true if OpenGL, false if SDL. + * @return true if it's true, false otherwise. */ bool hasAlphaChannel(); @@ -163,6 +163,12 @@ class Image : public Resource */ Image *SDLmerge(Image *image, int x, int y); + /** + * Get the alpha Channel of a SDL surface. + */ + Uint8 *SDLgetAlphaChannel() const + { return mAlphaChannel; } + #ifdef USE_OPENGL // OpenGL only public functions @@ -194,13 +200,16 @@ class Image : public Resource // ----------------------- /** SDL Constructor */ - Image(SDL_Surface *image); + Image(SDL_Surface *image, bool hasAlphaChannel = false, + Uint8 *alphaChannel = NULL); /** SDL_Surface to SDL_Surface Image loader */ static Image *_SDLload(SDL_Surface *tmpImage); SDL_Surface *mSDLSurface; + /** Alpha Channel pointer used for 32bit based SDL surfaces */ + Uint8 *mAlphaChannel; // ----------------------- // OpenGL protected members |