diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-19 15:21:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-19 15:21:11 +0300 |
commit | ad3ee95f90bfd368a511407c13718b900e44be0f (patch) | |
tree | f3f41b9802d684d784b7cef05e0d6ae2383b5e5b /src/resources/iteminfo.cpp | |
parent | fba4289e53447a09dcf82211e2dab3563e2581f1 (diff) | |
download | plus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.gz plus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.bz2 plus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.xz plus-ad3ee95f90bfd368a511407c13718b900e44be0f.zip |
Move spritedirection into separate file.
Diffstat (limited to 'src/resources/iteminfo.cpp')
-rw-r--r-- | src/resources/iteminfo.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index a79a678e3..6dbb90d2a 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -249,11 +249,11 @@ const SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(const int direction) SpriteToItemMap *const spMap = mSpriteToItemReplaceMap[direction]; if (spMap) return spMap; - if (direction == DIRECTION_UPLEFT || direction == DIRECTION_UPRIGHT) - return mSpriteToItemReplaceMap[DIRECTION_UP]; + if (direction == SpriteDirection::UPLEFT || direction == SpriteDirection::UPRIGHT) + return mSpriteToItemReplaceMap[SpriteDirection::UP]; - if (direction == DIRECTION_DOWNLEFT || direction == DIRECTION_DOWNRIGHT) - return mSpriteToItemReplaceMap[DIRECTION_DOWN]; + if (direction == SpriteDirection::DOWNLEFT || direction == SpriteDirection::DOWNRIGHT) + return mSpriteToItemReplaceMap[SpriteDirection::DOWN]; return nullptr; } @@ -276,16 +276,16 @@ void ItemInfo::setSpriteOrder(int *const ptr, } case -2: { - ptr[DIRECTION_DOWN] = n; - ptr[DIRECTION_DOWNLEFT] = n; - ptr[DIRECTION_DOWNRIGHT] = n; + ptr[SpriteDirection::DOWN] = n; + ptr[SpriteDirection::DOWNLEFT] = n; + ptr[SpriteDirection::DOWNRIGHT] = n; return; } case -3: { - ptr[DIRECTION_UP] = n; - ptr[DIRECTION_UPLEFT] = n; - ptr[DIRECTION_UPRIGHT] = n; + ptr[SpriteDirection::UP] = n; + ptr[SpriteDirection::UPLEFT] = n; + ptr[SpriteDirection::UPRIGHT] = n; return; } default: @@ -294,19 +294,19 @@ void ItemInfo::setSpriteOrder(int *const ptr, if (direction < 0 || direction >= 9) return; - if (direction == DIRECTION_UP) + if (direction == SpriteDirection::UP) { - if (ptr[DIRECTION_UPLEFT] == def) - ptr[DIRECTION_UPLEFT] = n; - if (ptr[DIRECTION_UPRIGHT] == def) - ptr[DIRECTION_UPRIGHT] = n; + if (ptr[SpriteDirection::UPLEFT] == def) + ptr[SpriteDirection::UPLEFT] = n; + if (ptr[SpriteDirection::UPRIGHT] == def) + ptr[SpriteDirection::UPRIGHT] = n; } - else if (direction == DIRECTION_DOWN) + else if (direction == SpriteDirection::DOWN) { - if (ptr[DIRECTION_DOWNLEFT] == def) - ptr[DIRECTION_DOWNLEFT] = n; - if (ptr[DIRECTION_DOWNRIGHT] == def) - ptr[DIRECTION_DOWNRIGHT] = n; + if (ptr[SpriteDirection::DOWNLEFT] == def) + ptr[SpriteDirection::DOWNLEFT] = n; + if (ptr[SpriteDirection::DOWNRIGHT] == def) + ptr[SpriteDirection::DOWNRIGHT] = n; } ptr[direction] = n; } |