summaryrefslogtreecommitdiff
path: root/src/resources/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/action.cpp')
-rw-r--r--src/resources/action.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index cbcf4f72b..8576ffab8 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -39,20 +39,21 @@ Action::~Action()
delete_all(mAnimations);
}
-const Animation *Action::getAnimation(SpriteDirection direction) const noexcept
+const Animation *Action::getAnimation(SpriteDirection::Type direction)
+ const noexcept
{
Animations::const_iterator i = mAnimations.find(direction);
if (i == mAnimations.end())
{
- if (direction == DIRECTION_UPLEFT || direction == DIRECTION_UPRIGHT)
+ if (direction == SpriteDirection::UPLEFT || direction == SpriteDirection::UPRIGHT)
{
- direction = DIRECTION_UP;
+ direction = SpriteDirection::UP;
}
- else if (direction == DIRECTION_DOWNLEFT
- || direction == DIRECTION_DOWNRIGHT)
+ else if (direction == SpriteDirection::DOWNLEFT
+ || direction == SpriteDirection::DOWNRIGHT)
{
- direction = DIRECTION_DOWN;
+ direction = SpriteDirection::DOWN;
}
i = mAnimations.find(direction);
@@ -65,7 +66,7 @@ const Animation *Action::getAnimation(SpriteDirection direction) const noexcept
return (i == mAnimations.end()) ? nullptr : i->second;
}
-void Action::setAnimation(const SpriteDirection direction,
+void Action::setAnimation(const SpriteDirection::Type direction,
Animation *const animation) noexcept
{
mAnimations[direction] = animation;