From 5f6e0176cc64824a28391070ddb249a6efff0b7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 Apr 2016 20:52:59 +0300 Subject: Add memory counting into AbmientLayer. --- src/resources/ambientlayer.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/resources/ambientlayer.h') diff --git a/src/resources/ambientlayer.h b/src/resources/ambientlayer.h index f8e140be9..9aabf0a91 100644 --- a/src/resources/ambientlayer.h +++ b/src/resources/ambientlayer.h @@ -22,13 +22,15 @@ #ifndef RESOURCES_AMBIENTLAYER_H #define RESOURCES_AMBIENTLAYER_H +#include "resources/memorycounter.h" + #include "localconsts.h" class Graphics; class Image; class Map; -class AmbientLayer final +class AmbientLayer final : public MemoryCounter { public: friend class Map; @@ -43,7 +45,8 @@ class AmbientLayer final * @param keepRatio rescale the image to keep * the same ratio than in 800x600 resolution mode. */ - AmbientLayer(Image *const img, + AmbientLayer(const std::string &name, + Image *const img, const float parallax, const float parallaxY, const float posX, @@ -65,7 +68,13 @@ class AmbientLayer final const int x, const int y) const A_NONNULL(2); + int calcMemoryLocal() const override; + + std::string getCounterName() const override final + { return mName; } + private: + const std::string mName; Image *mImage; float mParallaxX; float mParallaxY; -- cgit v1.2.3-70-g09d2