summaryrefslogtreecommitdiff
path: root/src/resources/animation/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/animation/animation.cpp')
-rw-r--r--src/resources/animation/animation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/animation/animation.cpp b/src/resources/animation/animation.cpp
index ac7e4a146..e52b55737 100644
--- a/src/resources/animation/animation.cpp
+++ b/src/resources/animation/animation.cpp
@@ -86,3 +86,15 @@ void Animation::setLastFrameDelay(const int delay) noexcept
}
}
}
+
+int Animation::calcMemoryLocal()
+{
+ int sz = sizeof(Animation);
+ FOR_EACH (FramesIter, it, mFrames)
+ {
+ Frame &frame = *it;
+ sz += sizeof(Frame) +
+ frame.nextAction.capacity();
+ }
+ return sz;
+}