summaryrefslogtreecommitdiff
path: root/src/resources/map/objectslayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-29 21:03:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-29 21:03:25 +0300
commit10b7c4a1313395291a77c50189b31e9daf38a2b0 (patch)
tree8f0eea8bc2567b0431bb03d45126786cddddcf60 /src/resources/map/objectslayer.cpp
parent5f6e0176cc64824a28391070ddb249a6efff0b7c (diff)
downloadmv-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.gz
mv-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.bz2
mv-10b7c4a1313395291a77c50189b31e9daf38a2b0.tar.xz
mv-10b7c4a1313395291a77c50189b31e9daf38a2b0.zip
Add memory counting into ObjectsLayer.
Diffstat (limited to 'src/resources/map/objectslayer.cpp')
-rw-r--r--src/resources/map/objectslayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/map/objectslayer.cpp b/src/resources/map/objectslayer.cpp
index ea4f6a27f..7af758d7f 100644
--- a/src/resources/map/objectslayer.cpp
+++ b/src/resources/map/objectslayer.cpp
@@ -74,3 +74,9 @@ MapObjectList *ObjectsLayer::getAt(const unsigned x, const unsigned y) const
return nullptr;
return mTiles[x + y * mWidth];
}
+
+int ObjectsLayer::calcMemoryLocal() const
+{
+ return sizeof(ObjectsLayer) +
+ (sizeof(MapObjectList) + sizeof(MapObjectList*)) * mWidth * mHeight;
+}