--- deliantra/server/include/define.h 2009/11/29 09:41:28 1.111 +++ deliantra/server/include/define.h 2010/04/04 04:58:46 1.120 @@ -1,9 +1,9 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * 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 + * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2003-2005 Mark Wedel & Crossfire Development Team + * Copyright (©) 1992 Frank Tore Johansen * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the @@ -51,6 +51,8 @@ #define MAX_STAT 30 /* The maximum legal value of any stat */ #define MIN_STAT 1 /* The minimum legal value of any stat */ +#define MAX_FOOD 999 + //TODO: not only use more reasonable values, also enforce them #define MIN_WC -120 #define MAX_WC 120 @@ -67,12 +69,6 @@ #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 -#define ARCHTABLE_TOO_SMALL 2 // unused -#define TOO_MANY_ERRORS 3 - /* TYPE DEFINES */ /* Only add new values to this list if somewhere in the program code, @@ -100,8 +96,8 @@ #define POISON 7 #define BOOK 8 #define CLOCK 9 -//10 -//11 +#define VEIN 10 // deliantra: mineral/ore/whatever vein +#define RANGED 11 // deliantra: other range item (skill based) //12 #define ARROW 13 #define BOW 14 @@ -403,8 +399,7 @@ #define FLAG_USE_SHIELD 7 /* Can this creature use a shield? */ #define FLAG_NO_PICK 8 /* Object can't be picked up */ - -/*#define FLAG_WALK_ON 9*//* Applied when it's walked upon */ +/*#define FLAG_WALK_ON 9*/ /*#define FLAG_NO_PASS 10*//* Nothing can pass (wall() is true) */ #define FLAG_ANIMATE 11 /* The object looks at archetype for faces */ @@ -527,7 +522,7 @@ #define FLAG_RANDOM_SPEED 104 /* speed_left should be randomised on instantiate */ #define FLAG_ACTIVATE_ON_PUSH 105 /* connected object is activated when 'pushed' */ #define FLAG_ACTIVATE_ON_RELEASE 106 /* connected object is activated when 'released' */ -#define FLAG_IS_WATER 107 +#define FLAG_IS_WATER 107 /* apparently not used inside the server for anything */ #define FLAG_CONTENT_ON_GEN 108 #define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */ #define FLAG_IS_BUILDABLE 110 /* Can build on item */ @@ -592,8 +587,8 @@ * 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; +#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) @@ -697,20 +692,20 @@ #define PREFER_LOW 0 /* Flags for apply_special() */ +GENCONST_IV(AP_) enum apply_flag { /* Basic flags/mode, always use one of these */ - AP_TOGGLE = 0, - AP_APPLY = 1, - AP_UNAPPLY = 2, - - AP_BASIC_FLAGS = 0x0f, + AP_TOGGLE = 0, + AP_APPLY = 0x01, + AP_UNAPPLY = 0x02, + AP_MODE = 0x03, /* Optional flags, for bitwise or with a basic flag */ AP_NO_MERGE = 0x10, AP_IGNORE_CURSE = 0x20, - AP_PRINT = 0x40, /* Print what to do, don't actually do it */ - AP_NO_READY = 0x80, // do not ready skill associated with skilltool. + AP_PRINT = 0x40, /* Print what to do, don't actually do it */ + AP_NO_SLOT = 0x80, // do not update the combat/ranged/current slots }; /* Bitmask values for 'can_apply_object()' return values. @@ -739,9 +734,10 @@ * could remove. * */ -#define CAN_APPLY_NEVER 0x1 -#define CAN_APPLY_RESTRICTION 0x2 -#define CAN_APPLY_NOT_MASK 0xf +#define CAN_APPLY_NEVER 0x01 +#define CAN_APPLY_RESTRICTION 0x02 +#define CAN_APPLY_NOT_MASK 0x0f + #define CAN_APPLY_UNAPPLY 0x10 #define CAN_APPLY_UNAPPLY_MULT 0x20 #define CAN_APPLY_UNAPPLY_CHOICE 0x40