From 2be6f298a1c39dff04070588f75a3bed0c495b8b Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 3 Jan 2005 22:27:31 +0000 Subject: Use a std::list to store the beings (nodes). --- src/being.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/being.h') 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 #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 beings; + #endif -- cgit v1.2.3-70-g09d2