--- deliantra/server/include/define.h 2006/12/18 02:35:01 1.18 +++ deliantra/server/include/define.h 2006/12/18 03:00:02 1.19 @@ -397,33 +397,9 @@ #define NROF_SOUNDS (23 + NROFREALSPELLS) /* Number of sounds */ -/* Flag structure now changed. - * Each flag is now a bit offset, starting at zero. The macros - * will update/read the appropriate flag element in the object - * structure. - * - * Hopefully, since these offsets are integer constants set at run time, - * the compiler will reduce the macros something as simple as the - * old system was. - * - * Flags now have FLAG as the prefix. This to be clearer, and also - * to make sure F_ names are not still being used anyplace. - * - * The macros below assume that the flag size for each element is 32 - * bits. IF it is smaller, bad things will happen. See structs.h - * for more info. - * - * All functions should use the macros below. In process of converting - * to the new system, I find several files that did not use the previous - * macros. - * - * If any FLAG's are or changed, make sure the flag_names structure in +/* + * If any FLAG's are added or changed, make sure the flag_names structure in * common/loader.l is updated. - * - * flags[0] is 0 to 31 - * flags[1] is 32 to 63 - * flags[2] is 64 to 95 - * flags[3] is 96 to 127 */ /* Basic routines to do above */ @@ -431,31 +407,6 @@ #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 */ - -#define IS_WEAPON(op) \ - (op->type == ARROW || op->type == BOW || op->type == WEAPON) - -#define IS_ARMOR(op) \ - (op->type == ARMOUR || op->type == SHIELD || op->type == HELMET || \ - op->type == CLOAK || op->type == BOOTS || op->type == GLOVES || \ - op->type == BRACERS || op->type == GIRDLE) - -#define IS_LIVE(op) \ - ((op->type == PLAYER || QUERY_FLAG(op, FLAG_MONSTER) || \ - (QUERY_FLAG(op, FLAG_ALIVE) && !QUERY_FLAG(op, FLAG_GENERATOR) && \ - !op->type == DOOR)) && (!QUERY_FLAG(op,FLAG_IS_A_TEMPLATE))) - -#define IS_ARROW(op) \ - (op->type==ARROW || \ - (op->type==SPELL_EFFECT && \ - (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE))) - -/* This return TRUE if object has still randomitems which - * could be expanded. - */ -#define HAS_RANDOM_ITEMS(op) (op->randomitems && (!QUERY_FLAG(op,FLAG_IS_A_TEMPLATE))) - /* the flags */ #define FLAG_ALIVE 0 /* Object can fight (or be fought) */