diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-29 20:26:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-29 20:26:10 +0300 |
commit | 3fca67011281a84d04b0b07dfea1206e964e42e9 (patch) | |
tree | 34ec295e5ad99f25596a4b19a4a158f3dc96b82c /src/resources/mapreader.cpp | |
parent | da8550ca0017883f20fcefb6dc47f082d30b4b86 (diff) | |
download | plus-3fca67011281a84d04b0b07dfea1206e964e42e9.tar.gz plus-3fca67011281a84d04b0b07dfea1206e964e42e9.tar.bz2 plus-3fca67011281a84d04b0b07dfea1206e964e42e9.tar.xz plus-3fca67011281a84d04b0b07dfea1206e964e42e9.zip |
Add partial support for memory counting in Map.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index f37792fa2..497817a7d 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -333,7 +333,9 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) logger->log("loading replace layer list"); loadLayers(path + "_replace.d"); - Map *const map = new Map(w, h, tilew, tileh); + Map *const map = new Map(path, + w, h, + tilew, tileh); const std::string fileName = path.substr(path.rfind("/") + 1); map->setProperty("shortName", fileName); @@ -1173,7 +1175,9 @@ Map *MapReader::createEmptyMap(const std::string &restrict filename, const std::string &restrict realFilename) { logger->log1("Creating empty map"); - Map *const map = new Map(300, 300, mapTileSize, mapTileSize); + Map *const map = new Map("empty map", + 300, 300, + mapTileSize, mapTileSize); map->setProperty("_filename", realFilename); map->setProperty("_realfilename", filename); updateMusic(map); |