--- deliantra/server/include/define.h 2007/10/07 15:52:05 1.76
+++ deliantra/server/include/define.h 2008/12/04 01:07:35 1.91
@@ -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,6 +77,8 @@
#define MAX_NAME 48
#define MAX_EXT_TITLE 98
+#define ATTUNE_REPELL 16 // levels diff for attune/repell
+
//TODO: remove all calls to fatal and replace them by cleanup
#define OUT_OF_MEMORY 0
#define MAP_ERROR 1
@@ -314,8 +303,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 */
@@ -396,9 +385,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 */
@@ -432,6 +423,7 @@
/*#define FLAG_SLOW_MOVE 12*//* Uses the stats.exp/1000 to slow down */
/*#define FLAG_FLYING 13*//* Not affected by WALK_ON or SLOW_MOVE) */
+#define FLAG_HIDDEN 13 /* hidden monster (not invisible), TODO: used how, what for? TODO: why not saved? */
#define FLAG_MONSTER 14 /* Will attack players */
#define FLAG_FRIENDLY 15 /* Will help players */
@@ -535,11 +527,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 */
@@ -601,8 +589,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
@@ -613,7 +599,7 @@
#define EXIT_ALT_Y(xyz) (xyz)->stats.maxsp
/* for use by the lighting code */
-#define MAX_LIGHT_RADII 4 /* max radii for 'light' object, really
+#define MAX_LIGHT_RADIUS 9 /* max radius for 'light' object, really
* large values allow objects that can
* slow down the game */
#define MAX_DARKNESS 5 /* maximum map darkness, there is no
@@ -774,12 +760,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
@@ -925,6 +905,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 */