diff options
Diffstat (limited to 'src/actorsprite.h')
-rw-r--r-- | src/actorsprite.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/actorsprite.h b/src/actorsprite.h index b5c402eb..a56be125 100644 --- a/src/actorsprite.h +++ b/src/actorsprite.h @@ -53,6 +53,14 @@ public: NUM_TC }; + enum TargetCursorType + { + TCT_NONE = -1, + TCT_NORMAL = 0, + TCT_IN_RANGE, + NUM_TCT + }; + ActorSprite(int id); ~ActorSprite(); @@ -73,6 +81,8 @@ public: virtual void logic(); + static void actorLogic(); + void setMap(Map* map); /** @@ -95,7 +105,7 @@ public: /** * Sets the target animation for this actor. */ - void setTargetAnimation(SimpleAnimation *animation); + void setTargetType(TargetCursorType type); /** * Untargets the actor. @@ -140,6 +150,10 @@ public: virtual float getAlpha() const { return CompoundSprite::getAlpha(); } + static void load(); + + static void unload(); + protected: /** * Trigger visual effect, with components @@ -185,6 +199,24 @@ private: /** Reset particle status effects on next redraw? */ bool mMustResetParticles; + /** Load the target cursors into memory */ + static void initTargetCursor(); + + /** Remove the target cursors from memory */ + static void cleanupTargetCursors(); + + /** + * Helper function for loading target cursors + */ + static void loadTargetCursor(const std::string &filename, + int width, int height, int type, int size); + + /** Images of the target cursor. */ + static ImageSet *targetCursorImages[NUM_TCT][NUM_TC]; + + /** Animated target cursors. */ + static SimpleAnimation *targetCursor[NUM_TCT][NUM_TC]; + /** Target cursor being used */ SimpleAnimation *mUsedTargetCursor; }; |