diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-11 16:44:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-11 16:44:15 +0300 |
commit | 77bb74bd2d944be1a1dc719027dbf37ad088b828 (patch) | |
tree | 0feb040a768eff20220835eb359e767dc43f113c /src/resources/map/map.h | |
parent | 835dd846af75ea2cfc91f0134156f9c6545dd8ce (diff) | |
download | plus-77bb74bd2d944be1a1dc719027dbf37ad088b828.tar.gz plus-77bb74bd2d944be1a1dc719027dbf37ad088b828.tar.bz2 plus-77bb74bd2d944be1a1dc719027dbf37ad088b828.tar.xz plus-77bb74bd2d944be1a1dc719027dbf37ad088b828.zip |
Move blocktype into separate file.
Diffstat (limited to 'src/resources/map/map.h')
-rw-r--r-- | src/resources/map/map.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/resources/map/map.h b/src/resources/map/map.h index dac1778c3..0085206a6 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -27,6 +27,7 @@ #include "being/actor.h" +#include "resources/map/blocktype.h" #include "resources/map/metatile.h" #include "resources/map/properties.h" @@ -66,19 +67,6 @@ typedef AmbientLayerVector::iterator AmbientLayerVectorIter; class Map final : public Properties, public ConfigListener { public: - enum BlockType - { - BLOCKTYPE_NONE = -1, - BLOCKTYPE_WALL, - BLOCKTYPE_CHARACTER, - BLOCKTYPE_MONSTER, - BLOCKTYPE_AIR, - BLOCKTYPE_WATER, - BLOCKTYPE_GROUND, - BLOCKTYPE_GROUNDTOP, - NB_BLOCKTYPES - }; - enum CollisionTypes { COLLISION_EMPTY = 0, // no collision @@ -175,7 +163,8 @@ class Map final : public Properties, public ConfigListener /** * Marks a tile as occupied. */ - void blockTile(const int x, const int y, const BlockType type); + void blockTile(const int x, const int y, + const BlockType::BlockType type); /** * Gets walkability for a tile with a blocking bitmask. When called @@ -399,7 +388,7 @@ class Map final : public Properties, public ConfigListener /** * Blockmasks for different entities */ - unsigned *mOccupation[NB_BLOCKTYPES]; + unsigned *mOccupation[BlockType::NB_BLOCKTYPES]; int mWidth; int mHeight; |