From ac08acd4b4029a2519c81eecf938e1c03b51233c Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Tue, 7 Feb 2006 10:37:54 +0000 Subject: Made the being directions being stored in a bitfield. --- src/being.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 9b6596e5..45cfb15d 100644 --- a/src/being.h +++ b/src/being.h @@ -71,17 +71,13 @@ class Being : public Sprite DEAD = 15 }; - enum Direction { - DIR_NONE = -1, - SOUTH = 0, - SW = 1, - WEST = 2, - NW = 3, - NORTH = 4, - NE = 5, - EAST = 6, - SE = 7 - }; + /** + * Directions, to be used as bitmask values + */ + static const char DOWN = 1; + static const char LEFT = 2; + static const char UP = 4; + static const char RIGHT = 8; Uint16 job; /**< Job (player job, npc, monster, ) */ Uint16 x, y; /**< Tile coordinates */ -- cgit v1.2.3-70-g09d2