summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-11 14:42:25 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-11 14:42:25 +0000
commit041c6e3cb599d019d1e92d5087ec6726a5970902 (patch)
tree893e740d13cb564fce1b5512094a123e139049dd /src/being.h
parent851f567faff580834677d11b8fd45c6b344722a9 (diff)
downloadmana-041c6e3cb599d019d1e92d5087ec6726a5970902.tar.gz
mana-041c6e3cb599d019d1e92d5087ec6726a5970902.tar.bz2
mana-041c6e3cb599d019d1e92d5087ec6726a5970902.tar.xz
mana-041c6e3cb599d019d1e92d5087ec6726a5970902.zip
Switched NODE and PATH_NODE to use constructors.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h48
1 files changed, 26 insertions, 22 deletions
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);