summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-27 01:32:22 +0000
committerIra Rice <irarice@gmail.com>2008-10-27 01:32:22 +0000
commit8119f4ec53b64adc427f683077f65ce8aec85582 (patch)
treeed95e9a85c4cfe412e391f95860866253d25b0a4 /src/localplayer.h
parentfe76762f26180fdbbbac6e16bfa02c8bde3be78b (diff)
downloadmana-client-8119f4ec53b64adc427f683077f65ce8aec85582.tar.gz
mana-client-8119f4ec53b64adc427f683077f65ce8aec85582.tar.bz2
mana-client-8119f4ec53b64adc427f683077f65ce8aec85582.tar.xz
mana-client-8119f4ec53b64adc427f683077f65ce8aec85582.zip
Merged the Tametomo branch back into trunk. Targeting has been removed
from the viewport, and is now located on the beings themselves. Eventually, this will be changed further so that the targets draw below the being, instead of maintaining the same logic, but baby steps first.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 757c70eb..c0627378 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -25,6 +25,7 @@
#define _TMW_LOCALPLAYER_H
#include "player.h"
+#include "simpleanimation.h"
// TODO move into some sane place...
#define MAX_SLOT 2
@@ -33,6 +34,7 @@
#define STORAGE_SIZE 301
class FloorItem;
+class ImageSet;
class Inventory;
class Item;
class Network;
@@ -214,6 +216,14 @@ class LocalPlayer : public Player
float mLastAttackTime; /**< Used to synchronize the charge dialog */
+ void drawTargetCursor(Graphics *graphics, int offsetX, int offsetY);
+
+ /** Animated in range target cursor. */
+ SimpleAnimation *mTargetCursorInRange[NUM_TC];
+
+ /** Animated out of range target cursor. */
+ SimpleAnimation *mTargetCursorOutRange[NUM_TC];
+
protected:
void walk(unsigned char dir);
@@ -233,6 +243,21 @@ class LocalPlayer : public Player
Inventory *mInventory;
Inventory *mStorage;
+
+ /**
+ * Helper function for loading target cursors
+ */
+ void loadTargetCursor(std::string filename, int width, int height,
+ bool outRange, Being::TargetCursorSize size);
+
+ /** Images of in range target cursor. */
+ ImageSet *mInRangeImages[NUM_TC];
+
+ /** Images of out of range target cursor. */
+ ImageSet *mOutRangeImages[NUM_TC];
+
+ // Load the target cursors into memory
+ void initTargetCursor();
};
extern LocalPlayer *player_node;