summaryrefslogtreecommitdiff
path: root/src/resources/db/itemdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 15:21:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 15:21:11 +0300
commitad3ee95f90bfd368a511407c13718b900e44be0f (patch)
treef3f41b9802d684d784b7cef05e0d6ae2383b5e5b /src/resources/db/itemdb.cpp
parentfba4289e53447a09dcf82211e2dab3563e2581f1 (diff)
downloadmanaplus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.gz
manaplus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.bz2
manaplus-ad3ee95f90bfd368a511407c13718b900e44be0f.tar.xz
manaplus-ad3ee95f90bfd368a511407c13718b900e44be0f.zip
Move spritedirection into separate file.
Diffstat (limited to 'src/resources/db/itemdb.cpp')
-rw-r--r--src/resources/db/itemdb.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 32b0ee67c..f20db0c76 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -690,40 +690,40 @@ int parseDirectionName(const std::string &name)
if (name == "down")
{
if (serverVersion > 0)
- id = DIRECTION_DOWN;
+ id = SpriteDirection::DOWN;
else
id = -2;
}
else if (name == "downleft" || name == "leftdown")
{
- id = DIRECTION_DOWNLEFT;
+ id = SpriteDirection::DOWNLEFT;
}
else if (name == "left")
{
- id = DIRECTION_LEFT;
+ id = SpriteDirection::LEFT;
}
else if (name == "upleft" || name == "leftup")
{
- id = DIRECTION_UPLEFT;
+ id = SpriteDirection::UPLEFT;
}
else if (name == "up")
{
if (serverVersion > 0)
- id = DIRECTION_UP;
+ id = SpriteDirection::UP;
else
id = -3;
}
else if (name == "upright" || name == "rightup")
{
- id = DIRECTION_UPRIGHT;
+ id = SpriteDirection::UPRIGHT;
}
else if (name == "right")
{
- id = DIRECTION_RIGHT;
+ id = SpriteDirection::RIGHT;
}
else if (name == "downright" || name == "rightdown")
{
- id = DIRECTION_DOWNRIGHT;
+ id = SpriteDirection::DOWNRIGHT;
}
else if (name == "downall")
{
@@ -848,11 +848,11 @@ void loadReplaceSprite(ItemInfo *const itemInfo,
case -2:
{
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_DOWN);
+ removeSprite), SpriteDirection::DOWN);
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_DOWNLEFT);
+ removeSprite), SpriteDirection::DOWNLEFT);
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_DOWNRIGHT);
+ removeSprite), SpriteDirection::DOWNRIGHT);
for_each_xml_child_node(itemNode, replaceNode)
{
@@ -861,17 +861,17 @@ void loadReplaceSprite(ItemInfo *const itemInfo,
const int from = XML::getProperty(itemNode, "from", 0);
const int to = XML::getProperty(itemNode, "to", 1);
std::map<int, int> *mapList = itemInfo->addReplaceSprite(
- parseSpriteName(removeSprite), DIRECTION_DOWN);
+ parseSpriteName(removeSprite), SpriteDirection::DOWN);
if (mapList)
(*mapList)[from] = to;
mapList = itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_DOWNLEFT);
+ removeSprite), SpriteDirection::DOWNLEFT);
if (mapList)
(*mapList)[from] = to;
mapList = itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_DOWNRIGHT);
+ removeSprite), SpriteDirection::DOWNRIGHT);
if (mapList)
(*mapList)[from] = to;
}
@@ -881,11 +881,11 @@ void loadReplaceSprite(ItemInfo *const itemInfo,
case -3:
{
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_UP);
+ removeSprite), SpriteDirection::UP);
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_UPLEFT);
+ removeSprite), SpriteDirection::UPLEFT);
itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_UPRIGHT);
+ removeSprite), SpriteDirection::UPRIGHT);
for_each_xml_child_node(itemNode, replaceNode)
{
@@ -894,17 +894,17 @@ void loadReplaceSprite(ItemInfo *const itemInfo,
const int from = XML::getProperty(itemNode, "from", 0);
const int to = XML::getProperty(itemNode, "to", 1);
std::map<int, int> *mapList = itemInfo->addReplaceSprite(
- parseSpriteName(removeSprite), DIRECTION_UP);
+ parseSpriteName(removeSprite), SpriteDirection::UP);
if (mapList)
(*mapList)[from] = to;
mapList = itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_UPLEFT);
+ removeSprite), SpriteDirection::UPLEFT);
if (mapList)
(*mapList)[from] = to;
mapList = itemInfo->addReplaceSprite(parseSpriteName(
- removeSprite), DIRECTION_UPRIGHT);
+ removeSprite), SpriteDirection::UPRIGHT);
if (mapList)
(*mapList)[from] = to;
}