summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-01-09 01:01:17 +0200
committerBlue <bluesansdouze@gmail.com>2010-01-09 00:20:08 +0100
commitb5643b417e12308163802c3a11ac28f1abd239f9 (patch)
tree68318813f4760929a5c475a655e2113d9b8db8d4 /src/map.h
parent104266da0f92ab2a765598dde59bf2e7f6426484 (diff)
downloadmana-b5643b417e12308163802c3a11ac28f1abd239f9.tar.gz
mana-b5643b417e12308163802c3a11ac28f1abd239f9.tar.bz2
mana-b5643b417e12308163802c3a11ac28f1abd239f9.tar.xz
mana-b5643b417e12308163802c3a11ac28f1abd239f9.zip
Add special map mode.
This mode hide big map objects and show collisions.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/map.h b/src/map.h
index f69d3d33..0e4345b2 100644
--- a/src/map.h
+++ b/src/map.h
@@ -130,7 +130,8 @@ class MapLayer
int startX, int startY,
int endX, int endY,
int scrollX, int scrollY,
- const MapSprites &sprites) const;
+ const MapSprites &sprites,
+ int mDebugFlags) const;
private:
int mX, mY;
@@ -161,6 +162,13 @@ class Map : public Properties
BLOCKMASK_MONSTER = 0x02 // = bin 0000 0010
};
+ enum DebugType
+ {
+ MAP_NORMAL = 0,
+ MAP_DEBUG = 1,
+ MAP_SPECIAL = 2
+ };
+
/**
* Constructor, taking map and tile size as parameters.
*/
@@ -195,7 +203,8 @@ class Map : public Properties
/**
* Visualizes collision layer for debugging
*/
- void drawCollision(Graphics *graphics, int scrollX, int scrollY);
+ void drawCollision(Graphics *graphics, int scrollX, int scrollY,
+ int debugFlags);
/**
* Adds a layer to this map. The map takes ownership of the layer.
@@ -289,6 +298,10 @@ class Map : public Properties
void addAnimation(int gid, TileAnimation *animation)
{ mTileAnimations[gid] = animation; }
+ void setDebugFlags(int n) {mDebugFlags = n;}
+
+ int getDebugFlags() {return mDebugFlags;}
+
/**
* Gets the tile animation for a specific gid
*/
@@ -331,6 +344,9 @@ class Map : public Properties
Tilesets mTilesets;
MapSprites mSprites;
+ // debug flags
+ int mDebugFlags;
+
// Pathfinding members
int mOnClosedList, mOnOpenList;