From 373e404d20dd75e46b14451164c0914df100e236 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 Apr 2016 18:43:33 +0300 Subject: Add name into MapLayer memory object. --- src/resources/map/maplayer.cpp | 4 +++- src/resources/map/maplayer.h | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/resources/map') diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 03901d00a..5d81cfb09 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -46,7 +46,8 @@ #include "debug.h" -MapLayer::MapLayer(const int x, +MapLayer::MapLayer(const std::string &name, + const int x, const int y, const int width, const int height, @@ -63,6 +64,7 @@ MapLayer::MapLayer(const int x, mDrawLayerFlags(MapType::NORMAL), mSpecialLayer(nullptr), mTempLayer(nullptr), + mName(name), mTempRows(), mMask(mask), mTileCondition(tileCondition), diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index dc48fc2ef..8aa692549 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -63,7 +63,8 @@ class MapLayer final: public MemoryCounter, public ConfigListener * fringe layer. The fringe layer is the layer that draws the actors. * There can be only one fringe layer per map. */ - MapLayer(const int x, + MapLayer(const std::string &name, + const int x, const int y, const int width, const int height, @@ -168,6 +169,9 @@ class MapLayer final: public MemoryCounter, public ConfigListener int calcMemoryChilds(const int level) const override final; + std::string getCounterName() const override final + { return mName; } + protected: static int getTileDrawWidth(const TileInfo *restrict img, const int endX, @@ -188,6 +192,7 @@ class MapLayer final: public MemoryCounter, public ConfigListener MapTypeT mDrawLayerFlags; const SpecialLayer *restrict mSpecialLayer; const SpecialLayer *restrict mTempLayer; + const std::string mName; typedef std::vector MapRows; MapRows mTempRows; int mMask; -- cgit v1.2.3-70-g09d2