Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

LayeredPicture.h

Go to the documentation of this file.
00001 #ifndef HEADER_LAYEREDPICTURE_H
00002 #define HEADER_LAYEREDPICTURE_H
00003 
00004 #include "Picture.h"
00005 
00006 #include "SDL.h"
00007 
00008 /**
00009  * Picture with two layers and color mask.
00010  */
00011 class LayeredPicture : public Picture {
00012     private:
00013         static const Uint32 MASK_NO = static_cast<Uint32>(-1);
00014         SDL_Surface *m_lowerLayer;
00015         SDL_Surface *m_colorMask;
00016         Uint32 m_activeColor;
00017     public:
00018         LayeredPicture(const Path &bg_file, const V2 &loc,
00019                 const Path &lowerLayer, const Path &colorMask);
00020         ~LayeredPicture();
00021 
00022         void setNoActive() { m_activeColor = MASK_NO; }
00023         void setActiveMask(Uint32 color) { m_activeColor = color; }
00024 
00025         Uint32 getMaskAtWorld(const V2 &worldLoc);
00026         Uint32 getMaskAt(const V2 &loc);
00027         Uint32 getNoMask() const { return MASK_NO; }
00028 
00029         virtual void drawOn(SDL_Surface *screen);
00030 };
00031 
00032 #endif

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2