diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-30 03:46:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-30 03:46:59 +0300 |
commit | ece00592ecd93f7a96db0ca82589d00846e2f938 (patch) | |
tree | c36bde1e1a46d11ee47438d0debaa8317cd0db6e /src/resources/itemdb.cpp | |
parent | d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a (diff) | |
parent | 2c3c118c03ece5cad2b73affffbcbbc5a5746c7a (diff) | |
download | mv-stripped1.1.10.30.tar.gz mv-stripped1.1.10.30.tar.bz2 mv-stripped1.1.10.30.tar.xz mv-stripped1.1.10.30.zip |
Merge branch 'master' into strippedstripped1.1.10.30
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 9ff80de22..74474e067 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -636,19 +636,20 @@ void loadReplaceSprite(ItemInfo *itemInfo, xmlNodePtr replaceNode) { case -1: { - for_each_xml_child_node(itemNode, replaceNode) + for (int f = 0; f < 9; f ++) { - if (xmlStrEqual(itemNode->name, BAD_CAST "item")) + std::map<int, int> *mapList + = itemInfo->addReplaceSprite( + parseSpriteName(removeSprite), f); + if (!mapList) + continue; + for_each_xml_child_node(itemNode, replaceNode) { - int from = XML::getProperty(itemNode, "from", 0); - int to = XML::getProperty(itemNode, "to", 1); - for (int f = 0; f < 9; f ++) + if (xmlStrEqual(itemNode->name, BAD_CAST "item")) { - std::map<int, int> *mapList - = itemInfo->addReplaceSprite( - parseSpriteName(removeSprite), f); - if (!mapList) - continue; + int from = XML::getProperty(itemNode, "from", 0); + int to = XML::getProperty(itemNode, "to", 1); + (*mapList)[from] = to; } } @@ -657,6 +658,13 @@ void loadReplaceSprite(ItemInfo *itemInfo, xmlNodePtr replaceNode) } case -2: { + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_DOWN); + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_DOWNLEFT); + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_DOWNRIGHT); + for_each_xml_child_node(itemNode, replaceNode) { if (xmlStrEqual(itemNode->name, BAD_CAST "item")) @@ -683,6 +691,13 @@ void loadReplaceSprite(ItemInfo *itemInfo, xmlNodePtr replaceNode) } case -3: { + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_UP); + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_UPLEFT); + itemInfo->addReplaceSprite(parseSpriteName( + removeSprite), DIRECTION_UPRIGHT); + for_each_xml_child_node(itemNode, replaceNode) { if (xmlStrEqual(itemNode->name, BAD_CAST "item")) |