summaryrefslogtreecommitdiff
path: root/src/animation.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-14 21:40:40 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-14 21:40:40 +0000
commit82f587f2f3795898ed4fb7b125bf34b7e13de7cd (patch)
tree493f9591dac9f7e763a026b98b9860cab498eb13 /src/animation.cpp
parent81567749246fd4f3fb3a9c1fdbaae41327459612 (diff)
downloadmana-82f587f2f3795898ed4fb7b125bf34b7e13de7cd.tar.gz
mana-82f587f2f3795898ed4fb7b125bf34b7e13de7cd.tar.bz2
mana-82f587f2f3795898ed4fb7b125bf34b7e13de7cd.tar.xz
mana-82f587f2f3795898ed4fb7b125bf34b7e13de7cd.zip
Separated Action class to its own module.
Diffstat (limited to 'src/animation.cpp')
-rw-r--r--src/animation.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/animation.cpp b/src/animation.cpp
index 98a4abb8..bca4bb58 100644
--- a/src/animation.cpp
+++ b/src/animation.cpp
@@ -115,50 +115,3 @@ Animation::getLength()
}
return length;
}
-
-Action::Action():
- mSpriteset(NULL)
-{
-}
-
-Action::~Action()
-{
- std::for_each(mAnimations.begin(), mAnimations.end(), make_dtor(mAnimations));
- mAnimations.clear();
-}
-
-Animation*
-Action::getAnimation(int direction) const
-{
- Animations::const_iterator i = mAnimations.find(direction);
-
- // When the direction isn't defined, try the default
- if (i == mAnimations.end())
- {
- i = mAnimations.find(0);
- }
-
- return (i == mAnimations.end()) ? NULL : i->second;
-}
-
-void
-Action::setAnimation(int direction, Animation *animation)
-{
- // Set first direction as default direction
- if (mAnimations.empty())
- {
- mAnimations[0] = animation;
- }
-
- mAnimations[direction] = animation;
-}
-
-void
-Action::reset()
-{
- for (AnimationIterator i = mAnimations.begin();
- i != mAnimations.end(); ++i)
- {
- i->second->reset();
- }
-}