Advanced Strategic Command
overviewmapimage.h
Go to the documentation of this file.
1 /***************************************************************************
2  overviewmapimage.h - description
3  -------------------
4  begin : Sat Apr 16 2005
5  copyright : (C) 2005 by Martin Bickel
6  email : bickel@asc-hq.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 
19 #ifndef overviewmapimageH
20 #define overviewmapimageH
21 
22 
23 #include "graphics/surface.h"
24 #include "typen.h"
25 
28  bool initialized;
29  public:
30  static const int width = 4;
31  static const int height = 4;
32  static SPoint map2surface( const MapCoordinate& pos );
33  static MapCoordinate surface2map( const SPoint& pos );
34  SDLmm::ColorRGBA segment[width][height];
36  OverviewMapImage( const Surface& image );
37  bool valid() const { return initialized;};
38  void create( const Surface& image );
39  void read( tnstream& stream );
40  void write ( tnstream& stream ) const;
41  void blit( Surface& s, const SPoint& pos, int layer = 0 ) const;
42  static void fill( Surface& s, const SPoint& pos, SDLmm::Color color );
43  static void fill( Surface& s, const SPoint& pos, SDL_Color color );
44  static void fillCenter( Surface& s, const SPoint& pos, SDLmm::Color color );
45  static void fillCenter( Surface& s, const SPoint& pos, SDL_Color color );
46  static void lighten( Surface& s, const SPoint& pos, float value );
47 
48  int getMemoryFootprint() const;
49 };
50 
51 #endif
static const int height
void read(tnstream &stream)
static void lighten(Surface &s, const SPoint &pos, float value)
void blit(Surface &s, const SPoint &pos, int layer=0) const
int getMemoryFootprint() const
static const int width
static SPoint map2surface(const MapCoordinate &pos)
The interface for all kinds of IO stream.
static void fill(Surface &s, const SPoint &pos, SDLmm::Color color)
bool valid() const
void create(const Surface &image)
Coordinate on the twodimensional map.
Definition: typen.h:202
SDLmm::Color Color
Definition: blitter.h:35
SDLmm::SPoint SPoint
Definition: surface.h:27
void write(tnstream &stream) const
static MapCoordinate surface2map(const SPoint &pos)
SDLmm::ColorRGBA segment[width][height]
the image for a TerrainType that is shown on the small map
static void fillCenter(Surface &s, const SPoint &pos, SDLmm::Color color)