diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-01-15 14:42:12 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-01-15 14:42:12 +0000 |
commit | ffadd9c8accbdc8f1fedf089c79bd6ec54b73884 (patch) | |
tree | b4d43393bc2679781deb8b3cf86bcc50a522e728 /src/being.cpp | |
parent | 9171b9739dfb8a1ca0bf963c5041d0a801e4aa90 (diff) | |
download | mana-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.gz mana-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.bz2 mana-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.tar.xz mana-ffadd9c8accbdc8f1fedf089c79bd6ec54b73884.zip |
Cleaning
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/being.cpp b/src/being.cpp index 268f5e23..8091d7f8 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -30,7 +30,6 @@ Being *player_node = NULL; std::list<Being *> beings; - PATH_NODE::PATH_NODE(unsigned short x, unsigned short y): next(NULL) { @@ -45,21 +44,6 @@ PATH_NODE *calculate_path( return find_path(1, src_x, src_y, dest_x, dest_y); } -/*Being::Being(): - id(0), job(0), - action(0), frame(0), - path(NULL), - speech(NULL), speech_time(0), - tick_time(0), speed(150), - emotion(0), emotion_time(0), - text_x(0), text_y(0), - hair_style(1), hair_color(1), - weapon(0) -{ - memset(coordinates, 0, 3); - speech_color = makecol(0, 0, 0); -}*/ - void empty() { std::list<Being *>::iterator i; for (i = beings.begin(); i != beings.end(); i++) { @@ -68,8 +52,8 @@ void empty() { beings.clear(); } -void add_node(Being *Being) { - beings.push_back(Being); +void add_node(Being *being) { + beings.push_back(being); } void remove_node(unsigned int id) { @@ -123,7 +107,7 @@ Being *find_node(unsigned int id) { return NULL; } -class NODE_Compare { +class BeingCompare { public: bool operator() (const Being *a, const Being *b) const { return a->y < b->y; @@ -131,24 +115,22 @@ class NODE_Compare { }; void sort() { - beings.sort(NODE_Compare()); + beings.sort(BeingCompare()); } -void empty_path(Being *Being) { - if (Being) { - PATH_NODE *temp = Being->path; +void empty_path(Being *being) { + if (being) { + PATH_NODE *temp = being->path; PATH_NODE *next; while (temp) { next = temp->next; delete temp; temp = next; } - Being->path = NULL; + being->path = NULL; } } -// Beings restructuration - Being::Being() { id = 0; job = 0; action = 0; frame = 0; |