summaryrefslogtreecommitdiff
path: root/src/animation.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2006-08-01 19:05:34 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2006-08-01 19:05:34 +0000
commit8714de88fe9715b5a4014f16d15bc55f8860cdcf (patch)
tree9bd100d9d50bcf1357be375ba7b61fd4d136ce54 /src/animation.cpp
parent7b599fad6cdbaa40f1cb496218dcd5546de7f520 (diff)
downloadmana-client-8714de88fe9715b5a4014f16d15bc55f8860cdcf.tar.gz
mana-client-8714de88fe9715b5a4014f16d15bc55f8860cdcf.tar.bz2
mana-client-8714de88fe9715b5a4014f16d15bc55f8860cdcf.tar.xz
mana-client-8714de88fe9715b5a4014f16d15bc55f8860cdcf.zip
animations and directions are now passed and stored as enums and no longer as strings.
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;