summaryrefslogtreecommitdiff
path: root/src/gui/viewport.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:03 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:56 +0100
commit0c43d04b438d41c277ae80402d4b4888db1a0b64 (patch)
tree3aaeb75ecd1bcbe85decedab5f1fa426fe0411e3 /src/gui/viewport.h
parenta7f5eaeb7f643658d356533a608f0f18d85b6d32 (diff)
parent401802c1d7a1b3d659bdc53a45d9a6292fc1121e (diff)
downloadmana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.gz
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.bz2
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.xz
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.zip
Merged the tmwserv client with the eAthena client
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
Diffstat (limited to 'src/gui/viewport.h')
-rw-r--r--src/gui/viewport.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 522ea734..a097a4ac 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -29,6 +29,7 @@
#include "../configlistener.h"
#include "../position.h"
+class Being;
class FloorItem;
class Graphics;
class ImageSet;
@@ -36,6 +37,9 @@ class Item;
class Map;
class PopupMenu;
+/** Delay between two mouse calls when dragging mouse and move the player */
+const int walkingMouseDelay = 500;
+
/**
* The viewport on the map. Displays the current map and handles mouse input
* and the popup menu.
@@ -94,6 +98,11 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
void mouseReleased(gcn::MouseEvent &event);
/**
+ * Handles mouse move on map.
+ */
+ void mouseMoved(gcn::MouseEvent &event);
+
+ /**
* Shows a popup for an item.
* TODO Find some way to get rid of Item here
*/
@@ -120,6 +129,17 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
void scrollBy(float x, float y) { mPixelViewX += x; mPixelViewY += y; }
private:
+ /**
+ * Finds a path from the player to the mouse, and draws it. This is for
+ * debug purposes.
+ */
+ void drawDebugPath(Graphics *graphics);
+
+ /**
+ * Draws the given path.
+ */
+ void drawPath(Graphics *graphics, const Path &path);
+
Map *mMap; /**< The current map. */
int mScrollRadius;
@@ -131,11 +151,18 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int mTileViewX; /**< Current viewpoint in tiles. */
int mTileViewY; /**< Current viewpoint in tiles. */
bool mShowDebugPath; /**< Show a path from player to pointer. */
+ bool mVisibleNames; /**< Show target names. */
bool mPlayerFollowMouse;
+#ifdef TMWSERV_SUPPORT
+ int mLocalWalkTime; /**< Timestamp before the next walk can be sent. */
+#else
int mWalkTime;
+#endif
PopupMenu *mPopupMenu; /**< Popup menu. */
+ Being *mSelectedBeing; /**< Current selected being. */
+
};
extern Viewport *viewport; /**< The viewport */