diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-29 20:52:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-29 20:52:59 +0300 |
commit | 5f6e0176cc64824a28391070ddb249a6efff0b7c (patch) | |
tree | b9199e1e235705e129b5f83cc91826ebd3ddb63c /src/resources/ambientlayer.h | |
parent | 83958df001482b940812080db776efd2cf3c2d91 (diff) | |
download | mv-5f6e0176cc64824a28391070ddb249a6efff0b7c.tar.gz mv-5f6e0176cc64824a28391070ddb249a6efff0b7c.tar.bz2 mv-5f6e0176cc64824a28391070ddb249a6efff0b7c.tar.xz mv-5f6e0176cc64824a28391070ddb249a6efff0b7c.zip |
Add memory counting into AbmientLayer.
Diffstat (limited to 'src/resources/ambientlayer.h')
-rw-r--r-- | src/resources/ambientlayer.h | 13 |
1 files changed, 11 insertions, 2 deletions
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; |