diff options
Diffstat (limited to 'src/animation.cpp')
-rw-r--r-- | src/animation.cpp | 47 |
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(); - } -} |