--- deliantra/server/include/define.h 2007/01/17 12:36:31 1.41 +++ deliantra/server/include/define.h 2007/01/20 22:09:52 1.44 @@ -1,5 +1,5 @@ /* - * CrossFire, A Multiplayer game for X-windows + * CrossFire, A Multiplayer game * * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team * Copyright (C) 2003-2005 Mark Wedel & Crossfire Development Team @@ -34,25 +34,13 @@ #ifndef DEFINE_H #define DEFINE_H -/* - * Crossfire requires ANSI-C, but some compilers "forget" to define it. - * Thus the prototypes made by cextract don't get included correctly. - */ -#if !defined(__STDC__) - -/* Removed # from start of following line. makedepend was picking it up. - * The following should still hopefully result in an error. - */ -error - Your ANSI C compiler should be defining __STDC__; -#endif - #include #define FONTDIR "" #define FONTNAME "" /* Decstations have trouble with fabs()... */ -#define FABS(x) ((x)<0?-(x):(x)) +#define FABS(x) fabs (x) #ifdef __NetBSD__ # include @@ -589,7 +577,7 @@ #define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */ #define FLAG_IS_BUILDABLE 110 /* Can build on item */ #define FLAG_DESTROY_ON_DEATH 111 /* Object will be destroyed when env dies */ -#define FLAG_NO_SAVE 112 // item doesn't get saved with map +#define FLAG_NO_MAP_SAVE 112 // item doesn't get saved with map #define NUM_FLAGS 113 /* Should always be equal to the last * defined flag + 1. If you change this, @@ -947,8 +935,8 @@ * here. */ -#define RANDOM() random() -#define SRANDOM(xyz) srandom(xyz) +#define RANDOM() (rndm.next () & 0x7fffffffU) +#define SRANDOM(xyz) //TODO, get rid of /* Returns the weight of the given object. Note: it does not take the number of * items (nrof) into account.