From 5501c96d2c17f63e03b2e36d01d2b9cf64722f56 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Fri, 22 Apr 2005 19:53:22 +0000 Subject: Now you can attack with right mouse button, useful when using bow, need improvements though --- src/being.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 9e65793d..dc90942d 100644 --- a/src/being.h +++ b/src/being.h @@ -141,25 +141,43 @@ class Being { * Draws the speech text above the being. */ void drawSpeech(Graphics *graphics); + + /** + * Checks if the being is a player. + */ + bool isPlayer(); + + /** + * Checks if the being is a npc. + */ + bool isNpc(); + + /** + * Checks if the being is a monster. + */ + bool isMonster(); }; /** Add a Being to the list */ void add_node(Being *being); /** Return a specific id Being */ -Being *find_node(unsigned int id); +Being *findNode(unsigned int id); + +/** Return a being at specific coordinates */ +Being *findNode(unsigned short x, unsigned short y); /** Remove a Being */ void remove_node(unsigned int id); /** Find a NPC id based on its coordinates */ -unsigned int find_npc(unsigned short x, unsigned short y); +unsigned int findNpc(unsigned short x, unsigned short y); -/** Find a PC id based on its coordinates */ -unsigned int find_pc(unsigned short x, unsigned short y); +/** Find a PLAYER id based on its coordinates */ +unsigned int findPlayer(unsigned short x, unsigned short y); /** Find a MONSTER id based on its coordinates */ -unsigned int find_monster(unsigned short x, unsigned short y); +unsigned int findMonster(unsigned short x, unsigned short y); /** Sort beings in vertical order */ void sort(); -- cgit v1.2.3-70-g09d2