From 13baf331faa43913cb836661113ba63d3c2bc0a3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 May 2014 13:12:06 +0300 Subject: Move targetcursortype into separate file. --- src/being/actorsprite.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/being/actorsprite.cpp') 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]) -- cgit v1.2.3-70-g09d2