summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-29 18:43:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-29 18:45:18 +0300
commit373e404d20dd75e46b14451164c0914df100e236 (patch)
tree94686df259dc4b498175081a949d4fd4566185b4 /src/resources/mapreader.cpp
parent10fcab46c31bb5c5b44416e6b3bb497e9434f352 (diff)
downloadmanaverse-373e404d20dd75e46b14451164c0914df100e236.tar.gz
manaverse-373e404d20dd75e46b14451164c0914df100e236.tar.bz2
manaverse-373e404d20dd75e46b14451164c0914df100e236.tar.xz
manaverse-373e404d20dd75e46b14451164c0914df100e236.zip
Add name into MapLayer memory object.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 8fda33a9b..f37792fa2 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -896,7 +896,8 @@ void MapReader::readLayer(const XmlNodePtr node, Map *const map)
{
case MapLayer::TILES:
{
- layer = new MapLayer(offsetX, offsetY,
+ layer = new MapLayer(name,
+ offsetX, offsetY,
w, h,
isFringeLayer,
mask,
@@ -1177,9 +1178,19 @@ Map *MapReader::createEmptyMap(const std::string &restrict filename,
map->setProperty("_realfilename", filename);
updateMusic(map);
map->setCustom(true);
- MapLayer *layer = new MapLayer(0, 0, 300, 300, false, 1, -1);
+ MapLayer *layer = new MapLayer("nolayer",
+ 0, 0,
+ 300, 300,
+ false,
+ 1,
+ -1);
map->addLayer(layer);
- layer = new MapLayer(0, 0, 300, 300, true, 1, -1);
+ layer = new MapLayer("nolayer",
+ 0, 0,
+ 300, 300,
+ true,
+ 1,
+ -1);
map->addLayer(layer);
map->updateDrawLayersList();