summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 17:00:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 17:00:44 +0300
commit10cf17f8d83d2d925641f722acc004828dba3094 (patch)
tree46a746d5bfe79e067cd25a3caca476ecbafa0af5 /src/resources/map/map.cpp
parent77bb74bd2d944be1a1dc719027dbf37ad088b828 (diff)
downloadmanaverse-10cf17f8d83d2d925641f722acc004828dba3094.tar.gz
manaverse-10cf17f8d83d2d925641f722acc004828dba3094.tar.bz2
manaverse-10cf17f8d83d2d925641f722acc004828dba3094.tar.xz
manaverse-10cf17f8d83d2d925641f722acc004828dba3094.zip
Move blockmask into separate file.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 99b27bce2..7f856d786 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -527,10 +527,10 @@ void Map::drawCollision(Graphics *const graphics,
int width = 0;
const int x0 = x;
- fillCollision(BLOCKMASK_WALL, COLLISION_HIGHLIGHT);
- fillCollision(BLOCKMASK_AIR, AIR_COLLISION_HIGHLIGHT);
- fillCollision(BLOCKMASK_WATER, WATER_COLLISION_HIGHLIGHT);
- fillCollision(BLOCKMASK_GROUNDTOP, GROUNDTOP_COLLISION_HIGHLIGHT);
+ fillCollision(BlockMask::WALL, COLLISION_HIGHLIGHT);
+ fillCollision(BlockMask::AIR, AIR_COLLISION_HIGHLIGHT);
+ fillCollision(BlockMask::WATER, WATER_COLLISION_HIGHLIGHT);
+ fillCollision(BlockMask::GROUNDTOP, GROUNDTOP_COLLISION_HIGHLIGHT);
}
}
}
@@ -636,25 +636,25 @@ void Map::blockTile(const int x, const int y,
switch (type)
{
case BlockType::WALL:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_WALL;
+ mMetaTiles[tileNum].blockmask |= BlockMask::WALL;
break;
case BlockType::CHARACTER:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_CHARACTER;
+ mMetaTiles[tileNum].blockmask |= BlockMask::CHARACTER;
break;
case BlockType::MONSTER:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_MONSTER;
+ mMetaTiles[tileNum].blockmask |= BlockMask::MONSTER;
break;
case BlockType::AIR:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_AIR;
+ mMetaTiles[tileNum].blockmask |= BlockMask::AIR;
break;
case BlockType::WATER:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_WATER;
+ mMetaTiles[tileNum].blockmask |= BlockMask::WATER;
break;
case BlockType::GROUND:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_GROUND;
+ mMetaTiles[tileNum].blockmask |= BlockMask::GROUND;
break;
case BlockType::GROUNDTOP:
- mMetaTiles[tileNum].blockmask |= BLOCKMASK_GROUNDTOP;
+ mMetaTiles[tileNum].blockmask |= BlockMask::GROUNDTOP;
break;
default:
case BlockType::NONE:
@@ -815,7 +815,7 @@ Path Map::findPath(const int startX, const int startY,
if (newTile->whichList == mOnClosedList ||
((newTile->blockmask & walkmask)
&& !(x == destX && y == destY))
- || (newTile->blockmask & BLOCKMASK_WALL))
+ || (newTile->blockmask & BlockMask::WALL))
{
continue;
}
@@ -831,7 +831,7 @@ Path Map::findPath(const int startX, const int startY,
// +++ here need check block must depend
// on player abilities.
- if (((t1->blockmask | t2->blockmask) & BLOCKMASK_WALL))
+ if (((t1->blockmask | t2->blockmask) & BlockMask::WALL))
continue;
}