summaryrefslogtreecommitdiff
path: root/src/resources/map/mapheights.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-29 21:47:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-29 21:47:59 +0300
commit0c97cbd3ab4a6f425e42c2413d7dfe06c2da014e (patch)
tree17c2ff6abcf8af8ae7550963e256323d6cb0b61e /src/resources/map/mapheights.cpp
parent10b7c4a1313395291a77c50189b31e9daf38a2b0 (diff)
downloadplus-0c97cbd3ab4a6f425e42c2413d7dfe06c2da014e.tar.gz
plus-0c97cbd3ab4a6f425e42c2413d7dfe06c2da014e.tar.bz2
plus-0c97cbd3ab4a6f425e42c2413d7dfe06c2da014e.tar.xz
plus-0c97cbd3ab4a6f425e42c2413d7dfe06c2da014e.zip
Add memory counting into MapHeights.
Diffstat (limited to 'src/resources/map/mapheights.cpp')
-rw-r--r--src/resources/map/mapheights.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/map/mapheights.cpp b/src/resources/map/mapheights.cpp
index b4347cd1f..5d5c30aa8 100644
--- a/src/resources/map/mapheights.cpp
+++ b/src/resources/map/mapheights.cpp
@@ -39,3 +39,9 @@ void MapHeights::setHeight(const int x, const int y, const uint8_t height)
{
mTiles[x + y * mWidth] = height;
}
+
+int MapHeights::calcMemoryLocal() const
+{
+ return sizeof(MapHeights) +
+ mWidth * mHeight;
+}