--- deliantra/server/include/define.h 2006/12/14 22:45:40 1.15 +++ deliantra/server/include/define.h 2006/12/18 02:35:01 1.18 @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - The authors can be reached via e-mail at crossfire-devel@real-time.com + The authors can be reached via e-mail at crossfire@schmorp.de */ /* This file is best viewed with a window width of about 100 character */ @@ -427,19 +427,9 @@ */ /* Basic routines to do above */ -#define SET_FLAG(xyz, p) \ - ((xyz)->flags[p/32] |= (1U << (p % 32))) -#define CLEAR_FLAG(xyz, p) \ - ((xyz)->flags[p/32] &= ~(1U << (p % 32))) -#define QUERY_FLAG(xyz, p) \ - ((xyz)->flags[p/32] & (1U << (p % 32))) -#define COMPARE_FLAGS(p,q) \ - ( \ - ((p)->flags[0] == (q)->flags[0]) && \ - ((p)->flags[1] == (q)->flags[1]) && \ - ((p)->flags[2] == (q)->flags[2]) && \ - ((p)->flags[3] == (q)->flags[3]) \ - ) +#define SET_FLAG(obj, flag) (obj)->flags[flag] = 1 +#define CLEAR_FLAG(obj, flag) (obj)->flags[flag] = 0 +#define QUERY_FLAG(obj, flag) (obj)->flags[flag] /* convenience macros to determine what kind of things we are dealing with */