From 041c6e3cb599d019d1e92d5087ec6726a5970902 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 11 Dec 2004 14:42:25 +0000 Subject: Switched NODE and PATH_NODE to use constructors. --- src/being.h | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 5fc88021..78cffcc4 100644 --- a/src/being.h +++ b/src/being.h @@ -32,35 +32,39 @@ #define MONSTER_NODE 3 struct PATH_NODE { - unsigned short x, y; - PATH_NODE *next; + PATH_NODE(unsigned short x, unsigned short y); + + unsigned short x, y; + PATH_NODE *next; }; struct NODE { - unsigned int id; - short job; - char coordinates[3]; - NODE *next; - unsigned char type; - unsigned char action; - unsigned char frame; - PATH_NODE *path; - char *speech; - unsigned char speech_time; - int speech_color; - short tick_time; - short speed; - unsigned char emotion; - unsigned char emotion_time; - int text_x, text_y; // temp solution to fix speech position - short hair_style, hair_color; - short weapon; + NODE(); + + unsigned int id; + short job; + char coordinates[3]; + NODE *next; + unsigned char type; + unsigned char action; + unsigned char frame; + PATH_NODE *path; + char *speech; + unsigned char speech_time; + int speech_color; + short tick_time; + short speed; + unsigned char emotion; + unsigned char emotion_time; + int text_x, text_y; // temp solution to fix speech position + short hair_style, hair_color; + short weapon; }; void empty(); NODE *get_head(); -NODE *create_node(); -PATH_NODE *create_path_node(unsigned short x, unsigned short y); +//NODE *create_node(); +//PATH_NODE *create_path_node(unsigned short x, unsigned short y); void add_node(NODE *node); NODE *find_node(unsigned int id); void remove_node(unsigned int id); -- cgit v1.2.3-70-g09d2