Map Class Reference

#include <Map.h>

List of all members.


Detailed Description

Definition at line 10 of file Map.h.

Public Member Functions

void drawMinimap ()
void drawObjectLayer (Point offset)
void drawTerrainLayer (Point offset)
int getHeight () const
spMapTile getMouseOverTile ()
spMapTile getTile (int x, int y) const
int getWidth () const
void highlightMouseOverTile (Point offset)
bool load (istream &data)
 Map ()
void updateMouseOverTile (Point offset)
 ~Map ()

Private Member Functions

spMapTile getTile (Point position, Point offset)
bool makeTerrain (string terrain)
void populateTileNeighbors (spMapTile tile)

Private Attributes

int _height
vector< spMapTile_mapTiles
spMapTile _mouseOverTile
SDL_Surface * _tileMouseMap
int _width

Static Private Attributes

static map< string, TerrainTypeterrainMap


Constructor & Destructor Documentation

Map::Map (  ) 

Definition at line 12 of file Map.cpp.

References _tileMouseMap, GRASS, Singleton< T >::instance(), terrainMap, TILE_MOUSE_MAP, and WATER.

Here is the call graph for this function:

Map::~Map (  ) 

Definition at line 27 of file Map.cpp.

References _tileMouseMap.


Member Function Documentation

void Map::drawMinimap (  ) 

Definition at line 228 of file Map.cpp.

References _height, _width, Display::drawRect(), Display::getScreenHeight(), getTile(), GRASS, Singleton< T >::instance(), and WATER.

Here is the call graph for this function:

void Map::drawObjectLayer ( Point  offset  ) 

Definition at line 217 of file Map.cpp.

References _height, _width, and getTile().

Here is the call graph for this function:

void Map::drawTerrainLayer ( Point  offset  ) 

Definition at line 206 of file Map.cpp.

References _height, _width, and getTile().

Here is the call graph for this function:

int Map::getHeight (  )  const

Definition at line 269 of file Map.cpp.

References _height.

spMapTile Map::getMouseOverTile (  ) 

Definition at line 45 of file Map.cpp.

References _mouseOverTile.

spMapTile Map::getTile ( Point  position,
Point  offset 
) [private]

Definition at line 56 of file Map.cpp.

References _height, _mapTiles, _tileMouseMap, _width, MapTile::getHeight(), getTile(), MapTile::getWidth(), Point::x, and Point::y.

Here is the call graph for this function:

spMapTile Map::getTile ( int  x,
int  y 
) const

Definition at line 32 of file Map.cpp.

References _height, _mapTiles, and _width.

Referenced by drawMinimap(), drawObjectLayer(), drawTerrainLayer(), getTile(), populateTileNeighbors(), and updateMouseOverTile().

Here is the caller graph for this function:

int Map::getWidth (  )  const

Definition at line 274 of file Map.cpp.

References _width.

void Map::highlightMouseOverTile ( Point  offset  ) 

Definition at line 261 of file Map.cpp.

References _mouseOverTile.

bool Map::load ( istream &  data  ) 

Definition at line 120 of file Map.cpp.

References _height, _mapTiles, _width, MapTile::makeMapTile(), Direction::NE, NE, Direction::NW, NW, populateTileNeighbors(), Direction::SE, SE, Direction::SW, SW, and terrainMap.

Here is the call graph for this function:

bool Map::makeTerrain ( string  terrain  )  [private]

void Map::populateTileNeighbors ( spMapTile  tile  )  [private]

Definition at line 188 of file Map.cpp.

References Direction::getAllDirections(), and getTile().

Referenced by load().

Here is the call graph for this function:

Here is the caller graph for this function:

void Map::updateMouseOverTile ( Point  offset  ) 

Definition at line 50 of file Map.cpp.

References _mouseOverTile, getTile(), and Singleton< T >::instance().

Here is the call graph for this function:


Member Data Documentation

int Map::_height [private]

Definition at line 38 of file Map.h.

Referenced by drawMinimap(), drawObjectLayer(), drawTerrainLayer(), getHeight(), getTile(), and load().

vector<spMapTile> Map::_mapTiles [private]

Definition at line 40 of file Map.h.

Referenced by getTile(), and load().

spMapTile Map::_mouseOverTile [private]

Definition at line 45 of file Map.h.

Referenced by getMouseOverTile(), highlightMouseOverTile(), and updateMouseOverTile().

SDL_Surface* Map::_tileMouseMap [private]

Definition at line 44 of file Map.h.

Referenced by getTile(), Map(), and ~Map().

int Map::_width [private]

Definition at line 37 of file Map.h.

Referenced by drawMinimap(), drawObjectLayer(), drawTerrainLayer(), getTile(), getWidth(), and load().

map< string, TerrainType > Map::terrainMap [static, private]

Definition at line 42 of file Map.h.

Referenced by load(), and Map().


The documentation for this class was generated from the following files:
Generated on Fri Sep 22 06:00:27 2006 for X-CLONE by  doxygen 1.4.7