summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-06 19:18:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-06 19:18:33 +0000
commit819c303db467086d714ad663b285b44cde6329cf (patch)
treec32af1bb58379bfc790fd27fe2e4889ffab36df5 /src/map.h
parent5ec4143bde0fd67c7aca841804a5d165c794bdf0 (diff)
downloadmana-client-819c303db467086d714ad663b285b44cde6329cf.tar.gz
mana-client-819c303db467086d714ad663b285b44cde6329cf.tar.bz2
mana-client-819c303db467086d714ad663b285b44cde6329cf.tar.xz
mana-client-819c303db467086d714ad663b285b44cde6329cf.zip
Mostly making map tile data dynamically allocated.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/map.h b/src/map.h
index dc4ec5e2..79a3ea36 100644
--- a/src/map.h
+++ b/src/map.h
@@ -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;