--- deliantra/server/include/define.h 2006/12/03 00:59:58 1.13 +++ 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 */ @@ -45,9 +45,7 @@ error - Your ANSI C compiler should be defining __STDC__; #endif -#ifndef WIN32 /* ---win32 exclude unix configuration part */ -# include -#endif +#include #define FONTDIR "" #define FONTNAME "" @@ -429,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 */ @@ -1034,22 +1022,8 @@ * here. */ -#ifdef HAVE_SRANDOM -# define RANDOM() random() -# define SRANDOM(xyz) srandom(xyz) -#else -# ifdef HAVE_SRAND48 -# define RANDOM() lrand48() -# define SRANDOM(xyz) srand48(xyz) -# else -# ifdef HAVE_SRAND -# define RANDOM() rand() -# define SRANDOM(xyz) srand(xyz) -# else -# error "Could not find a usable random routine" -# endif -# endif -#endif +#define RANDOM() random() +#define SRANDOM(xyz) srandom(xyz) /* Returns the weight of the given object. Note: it does not take the number of * items (nrof) into account.