summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-03 22:27:31 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-03 22:27:31 +0000
commit2be6f298a1c39dff04070588f75a3bed0c495b8b (patch)
tree80ef9f32bfe5719b3a4fdda0f2e5d9dfc2891253 /src/being.h
parentded2bc689849760f1a7cec9f918520dd4598fba4 (diff)
downloadmana-2be6f298a1c39dff04070588f75a3bed0c495b8b.tar.gz
mana-2be6f298a1c39dff04070588f75a3bed0c495b8b.tar.bz2
mana-2be6f298a1c39dff04070588f75a3bed0c495b8b.tar.xz
mana-2be6f298a1c39dff04070588f75a3bed0c495b8b.zip
Use a std::list to store the beings (nodes).
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/being.h b/src/being.h
index a64e41e2..17572951 100644
--- a/src/being.h
+++ b/src/being.h
@@ -25,6 +25,7 @@
#define _TMW_BEING_H
#include "./net/protocol.h"
+#include <list>
#define ACTION_NODE 0
//#define PLAYER_NODE 1
@@ -50,7 +51,6 @@ struct NODE {
unsigned int id;
short job;
char coordinates[3];
- NODE *next;
unsigned char type;
unsigned char action;
unsigned char frame;
@@ -70,9 +70,6 @@ struct NODE {
/** Removes all beings from the list */
void empty();
-/** Returns the first node of the list */
-NODE *get_head();
-
/** Add a node to the list */
void add_node(NODE *node);
@@ -82,16 +79,10 @@ NODE *find_node(unsigned int id);
/** Remove a node */
void remove_node(unsigned int id);
-/** Returns number of beings in the list */
-unsigned int get_count();
-
PATH_NODE *calculate_path(
unsigned short src_x, unsigned short src_y,
unsigned short dest_x, unsigned short dest_y);
-/** Returns the id of a being in the list */
-unsigned int get_id(NODE *node);
-
/** Find a NPC id based on its coordinates */
unsigned int find_npc(unsigned short x, unsigned short y);
@@ -106,4 +97,6 @@ void empty_path(NODE *node);
extern NODE *player_node;
+extern std::list<NODE*> beings;
+
#endif