summaryrefslogtreecommitdiff
path: root/src/gui/viewport.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-05-20 20:27:32 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-05-20 20:27:32 +0000
commite7c3c0ae918caf70f67b378743f0ede929285e42 (patch)
tree953cb01a89665e500e9a5ec0f711d31df0e27c7d /src/gui/viewport.h
parentc2b7b192b50a4696888ee92a8aa9abfa21eb057e (diff)
downloadmana-client-e7c3c0ae918caf70f67b378743f0ede929285e42.tar.gz
mana-client-e7c3c0ae918caf70f67b378743f0ede929285e42.tar.bz2
mana-client-e7c3c0ae918caf70f67b378743f0ede929285e42.tar.xz
mana-client-e7c3c0ae918caf70f67b378743f0ede929285e42.zip
Added different target cursor sizes for monsters. Graphics for small and large cursor are provisional until better versions based on the original SVG of the medium sized one are available.
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r--src/gui/viewport.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 84efeff3..a0f69407 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -29,9 +29,9 @@
#include "windowcontainer.h"
#include "../configlistener.h"
+#include "../being.h"
class Map;
-class Being;
class FloorItem;
class ImageSet;
class Item;
@@ -142,6 +142,13 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
void showPopup(int x, int y, Being *being);
/**
+ * Helper function for loading target cursors
+ */
+ void
+ loadTargetCursor(std::string filename, int width, int height,
+ bool outRange, Being::TargetCursorSize size);
+
+ /**
* Draws range based target cursor
*/
void
@@ -164,14 +171,10 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int mCameraY; /**< Current viewpoint in tiles. */
bool mShowDebugPath; /**< Show a path from player to pointer. */
- ImageSet *mInRangeImages; /**< Images of in range target cursor. */
- ImageSet *mOutRangeImages; /**< Images of out of range target cursor.*/
-
- /** Animated in range target cursor. */
- SimpleAnimation *mTargetCursorInRange;
-
- /** Animated out of range target cursor. */
- SimpleAnimation *mTargetCursorOutRange;
+ ImageSet *mInRangeImages[Being::NUM_TC]; /**< Images of in range target cursor. */
+ ImageSet *mOutRangeImages[Being::NUM_TC]; /**< Images of out of range target cursor.*/
+ SimpleAnimation *mTargetCursorInRange[Being::NUM_TC]; /**< Animated in range target cursor. */
+ SimpleAnimation *mTargetCursorOutRange[Being::NUM_TC];/**< Animated out of range target cursor. */
bool mPlayerFollowMouse;
int mWalkTime;