summaryrefslogtreecommitdiff
path: root/src/being/being.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/being/being.cpp
parent77bb74bd2d944be1a1dc719027dbf37ad088b828 (diff)
downloadplus-10cf17f8d83d2d925641f722acc004828dba3094.tar.gz
plus-10cf17f8d83d2d925641f722acc004828dba3094.tar.bz2
plus-10cf17f8d83d2d925641f722acc004828dba3094.tar.xz
plus-10cf17f8d83d2d925641f722acc004828dba3094.zip
Move blockmask into separate file.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 386c07e92..c9af368b2 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1004,11 +1004,11 @@ std::string Being::getSitAction() const
if (mMap)
{
const unsigned char mask = mMap->getBlockMask(mX, mY);
- if (mask & Map::BLOCKMASK_GROUNDTOP)
+ if (mask & BlockMask::GROUNDTOP)
return SpriteAction::SITTOP;
- else if (mask & Map::BLOCKMASK_AIR)
+ else if (mask & BlockMask::AIR)
return SpriteAction::SITSKY;
- else if (mask & Map::BLOCKMASK_WATER)
+ else if (mask & BlockMask::WATER)
return SpriteAction::SITWATER;
}
return SpriteAction::SIT;
@@ -1027,9 +1027,9 @@ std::string Being::getMoveAction() const
if (mMap)
{
const unsigned char mask = mMap->getBlockMask(mX, mY);
- if (mask & Map::BLOCKMASK_AIR)
+ if (mask & BlockMask::AIR)
return SpriteAction::FLY;
- else if (mask & Map::BLOCKMASK_WATER)
+ else if (mask & BlockMask::WATER)
return SpriteAction::SWIM;
}
return SpriteAction::MOVE;
@@ -1050,9 +1050,9 @@ std::string Being::getWeaponAttackAction(const ItemInfo *const weapon) const
if (mMap)
{
const unsigned char mask = mMap->getBlockMask(mX, mY);
- if (mask & Map::BLOCKMASK_AIR)
+ if (mask & BlockMask::AIR)
return weapon->getSkyAttackAction();
- else if (mask & Map::BLOCKMASK_WATER)
+ else if (mask & BlockMask::WATER)
return weapon->getWaterAttackAction();
}
return weapon->getAttackAction();
@@ -1073,9 +1073,9 @@ std::string Being::getAttackAction(const Attack *const attack1) const
if (mMap)
{
const unsigned char mask = mMap->getBlockMask(mX, mY);
- if (mask & Map::BLOCKMASK_AIR)
+ if (mask & BlockMask::AIR)
return attack1->mSkyAction;
- else if (mask & Map::BLOCKMASK_WATER)
+ else if (mask & BlockMask::WATER)
return attack1->mWaterAction;
}
return attack1->mAction;
@@ -1094,9 +1094,9 @@ std::string Being::getAttackAction(const Attack *const attack1) const
if (mMap) \
{ \
const unsigned char mask = mMap->getBlockMask(mX, mY); \
- if (mask & Map::BLOCKMASK_AIR) \
+ if (mask & BlockMask::AIR) \
return SpriteAction::action##SKY; \
- else if (mask & Map::BLOCKMASK_WATER) \
+ else if (mask & BlockMask::WATER) \
return SpriteAction::action##WATER; \
} \
return SpriteAction::action; \