From 2003fd3534a312128c620e7e36902ac07045516e Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sat, 23 Jul 2005 16:29:49 +0000 Subject: Restored Being::setDestination, a pointer to the current map is now kept as a member in Being. --- src/being.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/being.h') 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 #include + #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); + 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; 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); }; /** Add a Being to the list */ -- cgit v1.2.3-70-g09d2