summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-19 18:29:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-19 18:29:03 +0300
commit7b6b389fe156b8ff1fc1f35ee776a2e65f160921 (patch)
tree81e893b9e57ff483492df3dd4b645157a02173b3 /src/resources/map/map.cpp
parentf3fdd048e6265ab2c6e88ddff21dffd9409c03db (diff)
downloadmanaverse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.gz
manaverse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.bz2
manaverse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.tar.xz
manaverse-7b6b389fe156b8ff1fc1f35ee776a2e65f160921.zip
Move mapitemtype into separate file.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 6e7a7cec6..d6fc7db8e 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -43,6 +43,7 @@
#include "resources/ambientlayer.h"
#include "resources/image.h"
+#include "resources/mapitemtype.h"
#include "resources/resourcemanager.h"
#include "resources/subimage.h"
@@ -1031,18 +1032,18 @@ void Map::addExtraLayer()
if (comment.empty())
{
- if (type < MapItem::ARROW_UP
- || type > MapItem::ARROW_RIGHT)
+ if (type < MapItemType::ARROW_UP
+ || type > MapItemType::ARROW_RIGHT)
{
comment = "unknown";
}
}
- if (type == MapItem::PORTAL)
+ if (type == MapItemType::PORTAL)
{
updatePortalTile(comment, type, atoi(x.c_str()),
atoi(y.c_str()), false);
}
- else if (type == MapItem::HOME)
+ else if (type == MapItemType::HOME)
{
updatePortalTile(comment, type, atoi(x.c_str()),
atoi(y.c_str()));
@@ -1092,8 +1093,8 @@ void Map::saveExtraLayer() const
for (int y = 0; y < height; y ++)
{
const MapItem *const item = mSpecialLayer->getTile(x, y);
- if (item && item->mType != MapItem::EMPTY
- && item->mType != MapItem::HOME)
+ if (item && item->mType != MapItemType::EMPTY
+ && item->mType != MapItemType::HOME)
{
mapFile << x << " " << y << " "
<< static_cast<int>(item->mType) << " "