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

OverviewMapImage Class Reference

the image for a TerrainType that is shown on the small map More...

#include <overviewmapimage.h>

List of all members.

Public Member Functions

 OverviewMapImage ()
 OverviewMapImage (const Surface &image)
bool valid () const
void create (const Surface &image)
void read (tnstream &stream)
void write (tnstream &stream) const
void blit (Surface &s, const SPoint &pos, int layer=0) const
int getMemoryFootprint () const

Static Public Member Functions

static SPoint map2surface (const MapCoordinate &pos)
static MapCoordinate surface2map (const SPoint &pos)
static void fill (Surface &s, const SPoint &pos, SDLmm::Color color)
static void fill (Surface &s, const SPoint &pos, SDL_Color color)
static void fillCenter (Surface &s, const SPoint &pos, SDLmm::Color color)
static void fillCenter (Surface &s, const SPoint &pos, SDL_Color color)
static void lighten (Surface &s, const SPoint &pos, float value)

Public Attributes

SDLmm::ColorRGBA segment [width][height]

Static Public Attributes

static const int width = 4
static const int height = 4


Detailed Description

the image for a TerrainType that is shown on the small map

Definition at line 27 of file overviewmapimage.h.


Constructor & Destructor Documentation

OverviewMapImage::OverviewMapImage  ) 
 

Definition at line 7 of file overviewmapimage.cpp.

OverviewMapImage::OverviewMapImage const Surface image  ) 
 

Definition at line 11 of file overviewmapimage.cpp.

References create().


Member Function Documentation

void OverviewMapImage::blit Surface s,
const SPoint pos,
int  layer = 0
const
 

Definition at line 136 of file overviewmapimage.cpp.

References assert, height, segment, PutPixel< pixelsize, ColorMerger >::set(), and width.

void OverviewMapImage::create const Surface image  ) 
 

Definition at line 67 of file overviewmapimage.cpp.

References IconRepository::getIcon(), height, Surface::isTransparent(), Surface::opaque, pal, segment, Surface::transparent, and width.

Referenced by OverviewMapImage().

void OverviewMapImage::fill Surface s,
const SPoint pos,
SDL_Color  color
[static]
 

Definition at line 153 of file overviewmapimage.cpp.

References fill().

void OverviewMapImage::fill Surface s,
const SPoint pos,
SDLmm::Color  color
[static]
 

Definition at line 158 of file overviewmapimage.cpp.

References height, and width.

Referenced by fill(), and OverviewMapHolder::updateField().

void OverviewMapImage::fillCenter Surface s,
const SPoint pos,
SDL_Color  color
[static]
 

Definition at line 167 of file overviewmapimage.cpp.

References fillCenter().

void OverviewMapImage::fillCenter Surface s,
const SPoint pos,
SDLmm::Color  color
[static]
 

Definition at line 172 of file overviewmapimage.cpp.

Referenced by fillCenter(), and OverviewMapHolder::updateField().

int OverviewMapImage::getMemoryFootprint  )  const
 

Definition at line 16 of file overviewmapimage.cpp.

Referenced by TerrainType::Weather::getMemoryFootprint().

void OverviewMapImage::lighten Surface s,
const SPoint pos,
float  value
[static]
 

Definition at line 180 of file overviewmapimage.cpp.

References height, lighten_Color(), and width.

Referenced by OverviewMapHolder::updateField().

SPoint OverviewMapImage::map2surface const MapCoordinate pos  )  [static]
 

Definition at line 23 of file overviewmapimage.cpp.

References MapCoordinate::x, and MapCoordinate::y.

Referenced by Weathercast::painter(), OverviewMapPanel::painter(), Weathercast::paintWeatherArea(), and OverviewMapHolder::updateField().

void OverviewMapImage::read tnstream stream  ) 
 

MapCoordinate OverviewMapImage::surface2map const SPoint pos  )  [static]
 

Definition at line 28 of file overviewmapimage.cpp.

Referenced by Weathercast::mouseClick(), and OverviewMapPanel::mouseClick().

bool OverviewMapImage::valid  )  const [inline]
 

Definition at line 37 of file overviewmapimage.h.

void OverviewMapImage::write tnstream stream  )  const
 


Member Data Documentation

const int OverviewMapImage::height = 4 [static]
 

Definition at line 31 of file overviewmapimage.h.

Referenced by blit(), create(), fill(), and lighten().

SDLmm::ColorRGBA OverviewMapImage::segment[width][height]
 

Definition at line 34 of file overviewmapimage.h.

Referenced by blit(), and create().

const int OverviewMapImage::width = 4 [static]
 

Definition at line 30 of file overviewmapimage.h.

Referenced by blit(), create(), fill(), and lighten().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:42 2008 for Advanced Strategic Command by  doxygen 1.4.2