diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-13 13:12:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-13 13:12:06 +0300 |
commit | 13baf331faa43913cb836661113ba63d3c2bc0a3 (patch) | |
tree | 03ddeb1936a712228c0514dc70926f2f74177a54 /src/being/actorsprite.cpp | |
parent | 7b4b302ffe79cdba0fa35b66741a9d6c3d9184f2 (diff) | |
download | manaverse-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.gz manaverse-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.bz2 manaverse-13baf331faa43913cb836661113ba63d3c2bc0a3.tar.xz manaverse-13baf331faa43913cb836661113ba63d3c2bc0a3.zip |
Move targetcursortype into separate file.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r-- | src/being/actorsprite.cpp | 19 |
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]) |