--- deliantra/server/include/define.h 2007/09/10 10:43:10 1.75 +++ deliantra/server/include/define.h 2008/09/19 01:39:45 1.87 @@ -1,11 +1,11 @@ /* - * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. + * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team + * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2003-2005,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * - * Crossfire TRT is free software: you can redistribute it and/or modify + * Deliantra is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * The authors can be reached via e-mail to + * The authors can be reached via e-mail to */ /* This file is best viewed with a window width of about 100 character */ @@ -44,25 +44,12 @@ #ifdef __NetBSD__ # include #endif -#ifndef MIN -# define MIN(x,y) min (x, y) -#endif -#ifndef MAX -# define MAX(x,y) max (x, y) -#endif // maximum length of an object name in the protocol #define NAME_LEN 127 -/* MAX3 is basically like MAX, but instead does 3 values. */ -#ifndef MAX3 -# define MAX3(x,y, z) (MAX(x, MAX(y,z))) -#endif - -/* MIN3 is basically like MIN, but instead does 3 values. */ -#ifndef MIN3 -# define MIN3(x,y, z) (MIN(x, MIN(y,z))) -#endif +#undef MIN +#undef MAX #define MAX_STAT 30 /* The maximum legal value of any stat */ #define MIN_STAT 1 /* The minimum legal value of any stat */ @@ -90,7 +77,6 @@ #define MAX_NAME 48 #define MAX_EXT_TITLE 98 -/* Fatal variables: */ //TODO: remove all calls to fatal and replace them by cleanup #define OUT_OF_MEMORY 0 #define MAP_ERROR 1 @@ -315,8 +301,8 @@ #define NUM_SUBTYPES 64 /* Subtypes for BUILDER */ -#define ST_BD_BUILD 1 /* Builds an item */ -#define ST_BD_REMOVE 2 /* Removes an item */ +#define ST_BD_BUILD 1 /* Builds an item */ +#define ST_BD_REMOVE 2 /* Removes an item */ /* Subtypes for MATERIAL */ #define ST_MAT_FLOOR 1 /* Floor */ @@ -397,9 +383,11 @@ * 2 spaces, and the entire array (< SIZEOFFREE) is * three spaces */ -#define SIZEOFFREE1 8 +#define SIZEOFFREE0 0 +#define SIZEOFFREE1 8 #define SIZEOFFREE2 24 -#define SIZEOFFREE 49 +#define SIZEOFFREE3 48 +#define SIZEOFFREE 49 #define NROF_SOUNDS (23 + NROFREALSPELLS) /* Number of sounds */ @@ -536,11 +524,7 @@ #define FLAG_ONE_HIT 97 /* Monster can only hit once before going * away (replaces ghosthit) */ -#define FLAG_CLIENT_SENT 98 /* THIS IS A DEBUG FLAG ONLY. We use it to - * detect cases were the server is trying - * to send an upditem when we have not - * actually sent the item. - */ +#define FLAG_DEBUG 98 // formerly FLAG_CLIENT_SENT, not used except for debugging #define FLAG_BERSERK 99 /* monster will attack closest living object */ @@ -602,8 +586,6 @@ #define OB_TYPE_MOVE_BLOCK(ob1, type) \ ((type) && (ob1->move_type & type) == ob1->move_type) -#define SET_GENERATE_TYPE(xyz,va) (xyz)->stats.sp=(va) -#define GENERATE_TYPE(xyz) ((xyz)->stats.sp) #define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%) */ #define EXIT_PATH(xyz) (xyz)->slaying @@ -775,12 +757,6 @@ #define RANDOM() (rndm.next () & 0xffffffU) -/* Returns the weight of the given object. Note: it does not take the number of - * items (nrof) into account. - * (this looks rather bogus, schmorp) - */ -#define WEIGHT(op) ((op)->nrof ? (op)->weight : (op)->weight + (op)->carrying) - /* * Warning! * If you add message types here, don't forget @@ -926,6 +902,7 @@ #define NDI_UNIQUE 0x1000 /* Print this out immediately, don't buffer */ #define NDI_ALL 0x2000 /* Inform all players of this message */ #define NDI_DEF 0x4000 // ignore colour for channel protocol +#define NDI_VERBATIM 0x8000 // do not expand cfpod, send text verbatim #endif /* DEFINE_H */