diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-06 19:18:33 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-06 19:18:33 +0000 |
commit | 819c303db467086d714ad663b285b44cde6329cf (patch) | |
tree | c32af1bb58379bfc790fd27fe2e4889ffab36df5 /src/map.h | |
parent | 5ec4143bde0fd67c7aca841804a5d165c794bdf0 (diff) | |
download | mana-819c303db467086d714ad663b285b44cde6329cf.tar.gz mana-819c303db467086d714ad663b285b44cde6329cf.tar.bz2 mana-819c303db467086d714ad663b285b44cde6329cf.tar.xz mana-819c303db467086d714ad663b285b44cde6329cf.zip |
Mostly making map tile data dynamically allocated.
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -24,6 +24,8 @@ #ifndef _TMW_MAP_H #define _TMW_MAP_H +#include "being.h" + // Tile flags #define TILE_WALKABLE 1 #define TILE_ANIMATED 2 @@ -47,7 +49,17 @@ class Map { public: /** - * Loads a map file + * Constructor. + */ + Map(); + + /** + * Destructor. + */ + ~Map(); + + /** + * Loads a map file. */ bool load(char *mapFile); @@ -81,12 +93,14 @@ class Map */ int getHeight(); + /** + * Find a path from one location to the next. + */ + PATH_NODE *findPath(int startX, int startY, int destX, int destY); + private: - const static int width = 200; - const static int height = 200; - Tile tiles[width][height]; - char tileset[20]; - char bg_music[20]; + int width, height; + Tile *tiles; }; extern Map tiledMap; |