summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-23 16:29:49 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-23 16:29:49 +0000
commit2003fd3534a312128c620e7e36902ac07045516e (patch)
treea98804c83f3d568756344943fbd580531195429b /src/being.h
parentb81f47c9b5fa2709af4d6e6e0669c604f3f273b1 (diff)
downloadmana-2003fd3534a312128c620e7e36902ac07045516e.tar.gz
mana-2003fd3534a312128c620e7e36902ac07045516e.tar.bz2
mana-2003fd3534a312128c620e7e36902ac07045516e.tar.xz
mana-2003fd3534a312128c620e7e36902ac07045516e.zip
Restored Being::setDestination, a pointer to the current map is now kept as a member in Being.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/being.h b/src/being.h
index bb5c5393..ec933d90 100644
--- a/src/being.h
+++ b/src/being.h
@@ -26,11 +26,14 @@
#include <list>
#include <string>
+
#include "graphics.h"
#define NR_HAIR_STYLES 5
#define NR_HAIR_COLORS 10
+class Map;
+
struct PATH_NODE {
/**
* Constructor.
@@ -74,9 +77,9 @@ class Being
void clearPath();
/**
- * Sets the new path for this being.
+ * Sets a new destination for this being to walk to.
*/
- void setPath(std::list<PATH_NODE> path);
+ void setDestination(int destX, int destY);
/**
* Puts a "speech balloon" above this being for the specified amount
@@ -186,9 +189,15 @@ class Being
*/
void setId(unsigned int id);
+ /**
+ * Set the map the being is on
+ */
+ void setMap(Map *map);
+
private:
unsigned short m_weapon;
unsigned int m_id; /**< Unique id */
+ Map *map;
std::list<PATH_NODE> path;
std::string speech;
@@ -197,6 +206,11 @@ class Being
unsigned int speech_time;
unsigned int damage_time;
bool showSpeech, showDamage;
+
+ /**
+ * Sets the new path for this being.
+ */
+ void setPath(std::list<PATH_NODE> path);
};
/** Add a Being to the list */