summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h40
1 files changed, 33 insertions, 7 deletions
diff --git a/src/being.h b/src/being.h
index 072cc9ae..ed6b4e31 100644
--- a/src/being.h
+++ b/src/being.h
@@ -38,6 +38,9 @@ struct PATH_NODE {
};
class Being {
+ private:
+ PATH_NODE *path;
+
public:
unsigned int id;
unsigned short job;
@@ -46,20 +49,46 @@ class Being {
unsigned char type;
unsigned char action;
unsigned char frame;
- PATH_NODE *path;
char *speech;
unsigned char speech_time;
int speech_color;
- unsigned short tick_time;
+ unsigned short walk_time;
unsigned short speed;
unsigned char emotion;
unsigned char emotion_time;
unsigned int text_x, text_y; // temp solution to fix speech position
unsigned short hair_style, hair_color;
unsigned short weapon;
-
+
+ /**
+ * Constructor.
+ */
Being();
- ~Being();
+
+ /**
+ * Destructor.
+ */
+ ~Being();
+
+ /**
+ * Removes all path nodes from this being.
+ */
+ void clearPath();
+
+ /**
+ * Sets the new path for this being.
+ */
+ void setPath(PATH_NODE *path);
+
+ /**
+ * Returns wether this being has a path to follow.
+ */
+ bool hasPath();
+
+ /**
+ * Makes this being take the next step of his path.
+ */
+ void nextStep();
};
/** Removes all beings from the list */
@@ -87,9 +116,6 @@ unsigned int find_monster(unsigned short x, unsigned short y);
/** Sort beings in vertical order */
void sort();
-/** Remove all path nodes from a being */
-void empty_path(Being *being);
-
extern Being *player_node;
extern std::list<Being*> beings;