--- deliantra/server/include/define.h 2008/05/04 20:40:53 1.81 +++ deliantra/server/include/define.h 2008/12/27 02:31:19 1.95 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra 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 * @@ -77,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 @@ -383,15 +385,17 @@ * 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 */ /* * If any FLAG's are added or changed, make sure the flag_names structure in - * common/loader.l is updated. + * common/loader.C is updated. */ /* Basic routines to do above */ @@ -405,7 +409,7 @@ #define FLAG_WIZ 1 /* Object has special privilegies */ #define FLAG_REMOVED 2 /* Object is not in any map or invenory */ #define FLAG_FREED 3 /* Object is in the list of free objects */ -//#define FLAG_WAS_WIZ 4 /* Player was once a wiz */ +#define FLAG_WIZLOOK 4 /* disable los and lighting */ #define FLAG_APPLIED 5 /* Object is ready for use by living */ #define FLAG_UNPAID 6 /* Object hasn't been paid for yet */ #define FLAG_USE_SHIELD 7 /* Can this creature use a shield? */ @@ -419,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 */ @@ -522,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 */ @@ -564,7 +565,7 @@ /* Combo of fly_low and fly_high */ #define MOVE_SWIM 0x08 /* Swimming object */ #define MOVE_BOAT 0x10 /* Boats/sailing */ -#define MOVE_SHIP 0x20 /* boats suitable fro oceans */ +#define MOVE_SHIP 0x20 /* boats suitable for oceans */ #define MOVE_ALL 0x3f /* Mask of all movement types */ @@ -598,13 +599,19 @@ #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 * practical reason to exceed this */ +#define LOS_MAX 4 /* max. los value for non-blocked spaces */ +#define LOS_BLOCKED 100 /* fully blocked spaces */ #define BRIGHTNESS(xyz) (xyz)->glow_radius>MAX_LIGHT_RADII? \ MAX_LIGHT_RADII:(xyz)->glow_radius; +// player position in blocked_los code +#define LOS_X0 (MAP_CLIENT_X / 2 - 1) +#define LOS_Y0 (MAP_CLIENT_Y / 2 - 1) + #define F_BUY 0 #define F_SELL 1 @@ -757,8 +764,6 @@ // also make sure that this is a float, not double, constant #define MIN_ACTIVE_SPEED (1.f / 65536.f) -#define RANDOM() (rndm.next () & 0xffffffU) - /* * Warning! * If you add message types here, don't forget @@ -861,8 +866,8 @@ #define LOG_CHANNEL "log" // the plain and ugly standard server log #define INFO_CHANNEL "info" // lower_left box -#define SAY_CHANNEL "channel-say" -#define CHAT_CHANNEL "channel-chat" +#define SAY_CHANNEL "say" +#define CHAT_CHANNEL "chat" #define MSG_CHANNEL(name) ("c/" name) // predefined channel defined in lib/cf.pm %CHANNEL /* The following are the color flags passed to new_draw_info. @@ -904,6 +909,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 */