diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-11 17:00:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-11 17:00:44 +0300 |
commit | 10cf17f8d83d2d925641f722acc004828dba3094 (patch) | |
tree | 46a746d5bfe79e067cd25a3caca476ecbafa0af5 /src/being/being.cpp | |
parent | 77bb74bd2d944be1a1dc719027dbf37ad088b828 (diff) | |
download | manaplus-10cf17f8d83d2d925641f722acc004828dba3094.tar.gz manaplus-10cf17f8d83d2d925641f722acc004828dba3094.tar.bz2 manaplus-10cf17f8d83d2d925641f722acc004828dba3094.tar.xz manaplus-10cf17f8d83d2d925641f722acc004828dba3094.zip |
Move blockmask into separate file.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 22 |
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; \ |