summaryrefslogtreecommitdiff
path: root/src/resources/ambientlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r--src/resources/ambientlayer.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 644c71578..389a2942d 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -31,7 +31,8 @@
#include "debug.h"
-AmbientLayer::AmbientLayer(Image *const img,
+AmbientLayer::AmbientLayer(const std::string &name,
+ Image *const img,
const float parallaxX,
const float parallaxY,
const float posX,
@@ -40,6 +41,8 @@ AmbientLayer::AmbientLayer(Image *const img,
const float speedY,
const bool keepRatio,
const int mask) :
+ MemoryCounter(),
+ mName(name),
mImage(img),
mParallaxX(parallaxX),
mParallaxY(parallaxY),
@@ -142,3 +145,9 @@ void AmbientLayer::draw(Graphics *const graphics, const int x,
* graphics->mHeight);
}
}
+
+int AmbientLayer::calcMemoryLocal() const
+{
+ return sizeof(AmbientLayer) +
+ mName.capacity();
+}