summaryrefslogtreecommitdiff
path: root/src/resources/action.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-26 01:24:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-26 01:24:16 +0300
commitec6bfe238af2f846a5948e95b1d725cf9abe9afb (patch)
tree0be19bc199cd66bd6949befe86c844dbad62de3b /src/resources/action.h
parent81dca73da50d8f421a74993de8cd5a9d61ef1e2a (diff)
downloadmanaplus-ec6bfe238af2f846a5948e95b1d725cf9abe9afb.tar.gz
manaplus-ec6bfe238af2f846a5948e95b1d725cf9abe9afb.tar.bz2
manaplus-ec6bfe238af2f846a5948e95b1d725cf9abe9afb.tar.xz
manaplus-ec6bfe238af2f846a5948e95b1d725cf9abe9afb.zip
Add memory count functions into Action and Animation.
Diffstat (limited to 'src/resources/action.h')
-rw-r--r--src/resources/action.h8
1 files changed, 7 insertions, 1 deletions
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 <map>
#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<SpriteDirection::Type, Animation*> Animations;
typedef Animations::iterator AnimationIter;