summaryrefslogtreecommitdiff
path: root/src/action.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-14 22:51:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-14 22:51:09 +0000
commit29bedd4da7e21b6dc644c8aa69d096db1516ea7b (patch)
treec33d35513bbf069e4e39c604bc2200ce100856e1 /src/action.cpp
parent82f587f2f3795898ed4fb7b125bf34b7e13de7cd (diff)
downloadmana-client-29bedd4da7e21b6dc644c8aa69d096db1516ea7b.tar.gz
mana-client-29bedd4da7e21b6dc644c8aa69d096db1516ea7b.tar.bz2
mana-client-29bedd4da7e21b6dc644c8aa69d096db1516ea7b.tar.xz
mana-client-29bedd4da7e21b6dc644c8aa69d096db1516ea7b.zip
Resolve Image* of animation phase at load time instead of storing just the
spriteset index and looking it up later (checking validity should still be added). Also calculate animation length during loading instead of summing it up each time it is requested.
Diffstat (limited to 'src/action.cpp')
-rw-r--r--src/action.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/action.cpp b/src/action.cpp
index 4abfa229..4a5a941a 100644
--- a/src/action.cpp
+++ b/src/action.cpp
@@ -29,15 +29,14 @@
#include "utils/dtor.h"
-Action::Action():
- mSpriteset(NULL)
+Action::Action()
{
}
Action::~Action()
{
- std::for_each(mAnimations.begin(), mAnimations.end(), make_dtor(mAnimations));
- mAnimations.clear();
+ std::for_each(mAnimations.begin(), mAnimations.end(),
+ make_dtor(mAnimations));
}
Animation*