Map Class Reference

A tile map. More...

#include <map.hpp>

List of all members.

Public Types

enum  BlockType {
  BLOCKTYPE_NONE = -1, BLOCKTYPE_WALL, BLOCKTYPE_CHARACTER, BLOCKTYPE_MONSTER,
  NB_BLOCKTYPES
}

Public Member Functions

 Map (int width=0, int height=0, int twidth=32, int theight=32)
 Constructor that takes initial map size as parameters.
 ~Map ()
 Destructor.
void setSize (int mWidth, int height)
 Sets the size of the map.
MetaTilegetMetaTile (int x, int y)
 Get tile reference.
void blockTile (int x, int y, BlockType type)
 Marks a tile as occupied.
void freeTile (int x, int y, BlockType type)
 Marks a tile as unoccupied.
bool getWalk (int x, int y, char walkmask) const
 Gets walkability for a tile with a blocking bitmask.
int getWidth () const
 Returns the width of this map.
int getHeight () const
 Returns the height of this map.
int getTileWidth () const
 Returns the tile width of this map.
int getTileHeight () const
 Returns the tile height used by this map.
const std::string & getProperty (const std::string &key) const
 Returns a general map property defined in the map file.
void setProperty (const std::string &key, const std::string &val)
 Sets a map property.
std::list< PATH_NODE > findPath (int startX, int startY, int destX, int destY, unsigned char walkmask, int maxCost=20)
 Find a path from one location to the next.


Detailed Description

A tile map.

Definition at line 86 of file map.hpp.


Member Function Documentation

void Map::setSize ( int  mWidth,
int  height 
)

Sets the size of the map.

This will destroy any existing map data.

Definition at line 68 of file map.cpp.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5