00001 #ifndef HEADER_LAYEREDPICTURE_H
00002 #define HEADER_LAYEREDPICTURE_H
00003
00004 #include "Picture.h"
00005
00006 #include "SDL.h"
00007
00008
00009
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