#include <map.hpp>
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. | |
MetaTile * | getMetaTile (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. |
Definition at line 86 of file map.hpp.
void Map::setSize | ( | int | mWidth, | |
int | height | |||
) |