From ec6bfe238af2f846a5948e95b1d725cf9abe9afb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Apr 2016 01:24:16 +0300 Subject: Add memory count functions into Action and Animation. --- src/resources/action.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/resources/action.h') diff --git a/src/resources/action.h b/src/resources/action.h index 82b5d8052..0f6288815 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -25,6 +25,8 @@ #include "enums/resources/spritedirection.h" +#include "resources/memorycounter.h" + #include #include "localconsts.h" @@ -34,7 +36,7 @@ class Animation; /** * An action consists of several animations, one for each direction. */ -class Action final +class Action final : public MemoryCounter { public: Action() noexcept; @@ -57,6 +59,10 @@ class Action final void setLastFrameDelay(const int delay) noexcept; + int calcMemoryLocal() override final; + + int calcMemoryChilds(const int level) override final; + protected: typedef std::map Animations; typedef Animations::iterator AnimationIter; -- cgit v1.2.3-70-g09d2