Advanced Strategic Command
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OverviewMapImage Class Reference

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

#include <overviewmapimage.h>

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 height, segment, and width.

Referenced by OverviewMapHolder::updateField().

void OverviewMapImage::create ( const Surface image)
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::fill ( Surface s,
const SPoint pos,
SDL_Color  color 
)
static

Definition at line 153 of file overviewmapimage.cpp.

References fill().

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().

void OverviewMapImage::fillCenter ( Surface s,
const SPoint pos,
SDL_Color  color 
)
static

Definition at line 167 of file overviewmapimage.cpp.

References fillCenter().

int OverviewMapImage::getMemoryFootprint ( ) const

Definition at line 16 of file overviewmapimage.cpp.

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
void OverviewMapImage::read ( tnstream stream)
MapCoordinate OverviewMapImage::surface2map ( const SPoint pos)
static

Definition at line 28 of file overviewmapimage.cpp.

References MapCoordinate::x.

Referenced by OverviewMapPanel::mouseClick(), and Weathercast::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: