00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef overviewmapimageH
00020 #define overviewmapimageH
00021
00022
00023 #include "graphics/surface.h"
00024 #include "typen.h"
00025
00027 class OverviewMapImage {
00028 bool initialized;
00029 public:
00030 static const int width = 4;
00031 static const int height = 4;
00032 static SPoint map2surface( const MapCoordinate& pos );
00033 static MapCoordinate surface2map( const SPoint& pos );
00034 SDLmm::ColorRGBA segment[width][height];
00035 OverviewMapImage();
00036 OverviewMapImage( const Surface& image );
00037 bool valid() const { return initialized;};
00038 void create( const Surface& image );
00039 void read( tnstream& stream );
00040 void write ( tnstream& stream ) const;
00041 void blit( Surface& s, const SPoint& pos, int layer = 0 ) const;
00042 static void fill( Surface& s, const SPoint& pos, SDLmm::Color color );
00043 static void fill( Surface& s, const SPoint& pos, SDL_Color color );
00044 static void fillCenter( Surface& s, const SPoint& pos, SDLmm::Color color );
00045 static void fillCenter( Surface& s, const SPoint& pos, SDL_Color color );
00046 static void lighten( Surface& s, const SPoint& pos, float value );
00047
00048 int getMemoryFootprint() const;
00049 };
00050
00051 #endif