summaryrefslogtreecommitdiff
path: root/src/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation.cpp')
-rw-r--r--src/animation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/animation.cpp b/src/animation.cpp
index cd716d78..1af8c616 100644
--- a/src/animation.cpp
+++ b/src/animation.cpp
@@ -104,26 +104,26 @@ Action::~Action()
}
Animation*
-Action::getAnimation(const std::string& direction) const
+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("default");
+ i = mAnimations.find(0);
}
return (i == mAnimations.end()) ? NULL : i->second;
}
void
-Action::setAnimation(const std::string& direction, Animation *animation)
+Action::setAnimation(int direction, Animation *animation)
{
// Set first direction as default direction
if (mAnimations.empty())
{
- mAnimations["default"] = animation;
+ mAnimations[0] = animation;
}
mAnimations[direction] = animation;