From 07675230038a24dd251581591379c8fe5cc7bfd1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Apr 2016 20:11:07 +0300 Subject: Add memory count functions into MapLayer and SpecailLayer. Also change all memory count functions into const methods. --- src/resources/map/speciallayer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/resources/map/speciallayer.cpp') diff --git a/src/resources/map/speciallayer.cpp b/src/resources/map/speciallayer.cpp index 8700e3931..e53900134 100644 --- a/src/resources/map/speciallayer.cpp +++ b/src/resources/map/speciallayer.cpp @@ -148,3 +148,9 @@ void SpecialLayer::draw(Graphics *const graphics, int startX, int startY, } BLOCK_END("SpecialLayer::draw") } + +int SpecialLayer::calcMemoryLocal() const +{ + return sizeof(SpecialLayer) + + sizeof(MapItem) * mWidth * mHeight; +} -- cgit v1.2.3-60-g2f50