Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

overviewmapimage.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           overviewmapimage.h  -  description
00003                              -------------------
00004     begin                : Sat Apr 16 2005
00005     copyright            : (C) 2005 by Martin Bickel
00006     email                : bickel@asc-hq.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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

Generated on Tue Jun 24 01:27:46 2008 for Advanced Strategic Command by  doxygen 1.4.2