summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-02 17:23:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-02 17:23:32 +0300
commitf89de74b1ac1cd9a02a70dab9221d601296da8cd (patch)
tree444451eb017720bdc1d3457e6e7976a84e065351 /src/resources/db
parentc2748e2217f0ac69e2f06f39e6411f5e77c11974 (diff)
downloadmv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.gz
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.bz2
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.xz
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.zip
Add intmap defines.
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/itemdb.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index da3444c0e..9de6b307e 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -589,11 +589,10 @@ void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
itr_end = spriteToItems->end(); itr != itr_end; ++ itr)
{
const int remSprite = itr->first;
- const std::map<int, int> &itemReplacer = itr->second;
+ const IntMap &itemReplacer = itr->second;
logger->log("sprite: %d", remSprite);
- for (std::map<int, int>::const_iterator
- repIt = itemReplacer.begin(),
+ for (IntMapCIter repIt = itemReplacer.begin(),
repIt_end = itemReplacer.end();
repIt != repIt_end; ++ repIt)
{
@@ -934,8 +933,7 @@ static void loadReplaceSprite(ItemInfo *const itemInfo,
{ // replace only given sprites
for (int f = 0; f < 10; f ++)
{
- std::map<int, int> *const mapList
- = itemInfo->addReplaceSprite(
+ IntMap *const mapList = itemInfo->addReplaceSprite(
parseSpriteName(removeSprite), f);
if (!mapList)
continue;
@@ -969,7 +967,7 @@ static 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(
+ IntMap *mapList = itemInfo->addReplaceSprite(
parseSpriteName(removeSprite), SpriteDirection::DOWN);
if (mapList)
(*mapList)[from] = to;
@@ -1002,7 +1000,7 @@ static 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(
+ IntMap *mapList = itemInfo->addReplaceSprite(
parseSpriteName(removeSprite), SpriteDirection::UP);
if (mapList)
(*mapList)[from] = to;
@@ -1022,7 +1020,7 @@ static void loadReplaceSprite(ItemInfo *const itemInfo,
}
default:
{
- std::map<int, int> *const mapList = itemInfo->addReplaceSprite(
+ IntMap *const mapList = itemInfo->addReplaceSprite(
parseSpriteName(removeSprite), direction);
if (!mapList)
return;