summaryrefslogtreecommitdiff
path: root/src/being/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 13:12:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 13:12:06 +0300
commit13baf331faa43913cb836661113ba63d3c2bc0a3 (patch)
tree03ddeb1936a712228c0514dc70926f2f74177a54 /src/being/actorsprite.cpp
parent7b4b302ffe79cdba0fa35b66741a9d6c3d9184f2 (diff)
downloadmv-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.gz
mv-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.bz2
mv-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.xz
mv-13baf331faa43913cb836661113ba63d3c2bc0a3.zip
Move targetcursortype into separate file.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r--src/being/actorsprite.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 6d5702da0..f52820f86 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -42,7 +42,8 @@
#include "debug.h"
-AnimatedSprite *ActorSprite::targetCursor[NUM_TCT][TargetCursorSize::NUM_TC];
+AnimatedSprite *ActorSprite::targetCursor[TargetCursorType::NUM_TCT]
+ [TargetCursorSize::NUM_TC];
bool ActorSprite::loaded = false;
ActorSprite::ActorSprite(const int id) :
@@ -136,9 +137,9 @@ void ActorSprite::controlParticle(Particle *const particle)
mChildParticleEffects.addLocally(particle);
}
-void ActorSprite::setTargetType(const TargetCursorType type)
+void ActorSprite::setTargetType(const TargetCursorType::Type type)
{
- if (type == TCT_NONE)
+ if (type == TargetCursorType::NONE)
{
untarget();
}
@@ -334,10 +335,10 @@ static const char *cursorType(const int type)
{
switch (type)
{
- case ActorSprite::TCT_IN_RANGE:
+ case TargetCursorType::IN_RANGE:
return "in-range";
default:
- case ActorSprite::TCT_NORMAL:
+ case TargetCursorType::NORMAL:
return "normal";
}
}
@@ -365,7 +366,9 @@ void ActorSprite::initTargetCursor()
size < TargetCursorSize::NUM_TC;
size ++)
{
- for (int type = TCT_NORMAL; type < NUM_TCT; type++)
+ for (int type = TargetCursorType::NORMAL;
+ type < TargetCursorType::NUM_TCT;
+ type ++)
{
targetCursor[type][size] = AnimatedSprite::load(
Theme::resolveThemePath(strprintf(
@@ -382,7 +385,9 @@ void ActorSprite::cleanupTargetCursors()
size < TargetCursorSize::NUM_TC;
size ++)
{
- for (int type = TCT_NORMAL; type < NUM_TCT; type++)
+ for (int type = TargetCursorType::NORMAL;
+ type < TargetCursorType::NUM_TCT;
+ type ++)
{
if (targetCursor[type][size])
delete2(targetCursor[type][size])