summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-09 23:02:28 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-09 23:02:28 +0300
commit94a9a81d9c6aa9fa287616c8b4bfc5ea86214dcd (patch)
treea5fd9ec3c5844ce9b8d6b4c63c25c9ded803a6a0 /src/map.h
parent51169702a6fba4626eeae44faa35ebcbf40e5fed (diff)
downloadManaVerse-94a9a81d9c6aa9fa287616c8b4bfc5ea86214dcd.tar.gz
ManaVerse-94a9a81d9c6aa9fa287616c8b4bfc5ea86214dcd.tar.bz2
ManaVerse-94a9a81d9c6aa9fa287616c8b4bfc5ea86214dcd.tar.xz
ManaVerse-94a9a81d9c6aa9fa287616c8b4bfc5ea86214dcd.zip
Impliment air and water block types.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/map.h b/src/map.h
index 1116fef4d..7e0f50dce 100644
--- a/src/map.h
+++ b/src/map.h
@@ -210,14 +210,27 @@ class Map : public Properties, public ConfigListener
BLOCKTYPE_WALL,
BLOCKTYPE_CHARACTER,
BLOCKTYPE_MONSTER,
+ BLOCKTYPE_AIR,
+ BLOCKTYPE_WATER,
NB_BLOCKTYPES
};
+ enum CollisionTypes
+ {
+ COLLISION_EMPTY = 0,
+ COLLISION_WALL = 1,
+ COLLISION_AIR = 2,
+ COLLISION_WATER = 3,
+ COLLISION_MAX = 4
+ };
+
enum BlockMask
{
- BLOCKMASK_WALL = 0x80, // = bin 1000 0000
- BLOCKMASK_CHARACTER = 0x01, // = bin 0000 0001
- BLOCKMASK_MONSTER = 0x02 // = bin 0000 0010
+ BLOCKMASK_WALL = 0x80, // 1000 0000
+ BLOCKMASK_CHARACTER = 0x01, // 0000 0001
+ BLOCKMASK_MONSTER = 0x02, // 0000 0010
+ BLOCKMASK_AIR = 0x04, // 0000 0100
+ BLOCKMASK_WATER = 0x08, // 0000 1000
};
enum DebugType
@@ -297,7 +310,8 @@ class Map : public Properties, public ConfigListener
* without walkmask, only blocks against colliding tiles.
*/
bool getWalk(int x, int y,
- unsigned char walkmask = BLOCKMASK_WALL) const;
+ unsigned char walkmask = BLOCKMASK_WALL | BLOCKMASK_AIR
+ | BLOCKMASK_WATER) const;
/**
* Tells whether a tile is occupied by a being.
@@ -440,6 +454,12 @@ class Map : public Properties, public ConfigListener
void setActorsFix(int x, int y)
{ mActorFixX = x; mActorFixY = y; }
+ int getVersion()
+ { return mVersion; }
+
+ void setVersion(int n)
+ { mVersion = n; }
+
protected:
friend class Actor;
@@ -528,6 +548,7 @@ class Map : public Properties, public ConfigListener
int mIndexedTilesetsSize;
int mActorFixX;
int mActorFixY;
+ int mVersion;
SpecialLayer *mSpecialLayer;
SpecialLayer *mTempLayer;