diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-26 20:07:20 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-26 20:07:20 +0000 |
commit | 1c43b2cdee5a5508a6e771b477100517deae07e7 (patch) | |
tree | 5a5df16ea526daed5b8268f26d4e63c76017dec4 /src/being.h | |
parent | ea17e8e26173d641fc9b3710b65209c03af5aff3 (diff) | |
download | mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.gz mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.bz2 mana-1c43b2cdee5a5508a6e771b477100517deae07e7.tar.xz mana-1c43b2cdee5a5508a6e771b477100517deae07e7.zip |
Added Being::Type enumeration and type-aware findNode(). Fixed font not being reset after drawing speech. Target marker drawing moved into engine.
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/being.h b/src/being.h index ec933d90..3a68e0ac 100644 --- a/src/being.h +++ b/src/being.h @@ -46,6 +46,13 @@ struct PATH_NODE { class Being { public: + enum Type { + UNKNOWN, + PLAYER, + NPC, + MONSTER + }; + unsigned short job; /**< Job (player job, npc, monster, ) */ unsigned short x, y; /**< Tile coordinates */ unsigned char direction; /**< Facing direction */ @@ -142,19 +149,9 @@ class Being void drawSpeech(Graphics *graphics); /** - * Checks if the being is a player. - */ - bool isPlayer(); - - /** - * Checks if the being is a npc. + * Returns the type of the being. */ - bool isNpc(); - - /** - * Checks if the being is a monster. - */ - bool isMonster(); + Type getType(); // ACCES METHODS @@ -222,6 +219,9 @@ Being *findNode(unsigned int id); /** Return a being at specific coordinates */ Being *findNode(unsigned short x, unsigned short y); +/** Return a being at specific coordinates with specific type*/ +Being *findNode(unsigned short x, unsigned short y, Being::Type type); + /** Remove a Being */ void remove_node(unsigned int id); |