Crossfire Server, Branches 1.12  R18729
define.h File Reference
#include <autoconf.h>
+ Include dependency graph for define.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  typedata
 

Macros

#define ALLRUN   6
 
#define ALTAR   18
 
#define AMULET   39
 
#define AP_APPLY   1
 
#define AP_BASIC_FLAGS   15
 
#define AP_IGNORE_CURSE   32
 
#define AP_NO_MERGE   16
 
#define AP_NOPRINT   128
 
#define AP_NULL   0
 
#define AP_PRINT   64
 
#define AP_UNAPPLY   2
 
#define ARMOUR   16
 
#define ARMOUR_IMPROVER   123
 
#define ARMOUR_SPEED(xyz)   (xyz)->last_sp
 
#define ARMOUR_SPELLS(xyz)   (xyz)->gen_sp_armour
 
#define ARROW   13
 
#define BATTLEGROUND   58
 
#define BIG_NAME   32
 
#define BLANK_FACE_NAME   "blank.111"
 
#define BLINDNESS   49
 
#define BOOK   8
 
#define BOOTS   99
 
#define BOW   14
 
#define BRACERS   104
 
#define BUILDER   160
 
#define BUTTON   92
 
#define CAN_APPLY_NEVER   0x1
 
#define CAN_APPLY_NOT_MASK   0xf
 
#define CAN_APPLY_RESTRICTION   0x2
 
#define CAN_APPLY_UNAPPLY   0x10
 
#define CAN_APPLY_UNAPPLY_CHOICE   0x40
 
#define CAN_APPLY_UNAPPLY_MULT   0x20
 
#define CF_HANDLE   93
 
#define CHECK_INV   64
 
#define CIRCLE1   32
 
#define CIRCLE2   48
 
#define CLASS   37
 
#define CLEAR_FLAG(xyz, p)   ((xyz)->flags[p/32] &= ~(1U<<(p%32)))
 
#define CLOAK   87
 
#define CLOCK   9
 
#define CLOSE_CON   121
 
#define COMPARE_FLAGS(p, q)
 
#define CONTAINER   122
 
#define CONVERTER   103
 
#define CORPSE   157
 
#define CREATOR   42
 
#define DEAD_OBJECT   53
 
#define DEEP_SWAMP   138
 
#define DESCRIBE_ABILITY(retbuf, variable, name)
 
#define DESCRIBE_ABILITY_SAFE(retbuf, variable, name, len, maxlen)
 
#define DESCRIBE_PATH(retbuf, variable, name)
 
#define DESCRIBE_PATH_SAFE(retbuf, variable, name, len, maxlen)
 
#define DETECTOR   51
 
#define DIRECTOR   112
 
#define DIRX(xyz)   freearr_x[(xyz)->direction]
 
#define DIRY(xyz)   freearr_y[(xyz)->direction]
 
#define DISEASE   158
 
#define DISTATT   1
 
#define DISTHIT   7
 
#define DOOR   23
 
#define DRINK   54
 
#define DUPLICATOR   83
 
#define EARTHWALL   45
 
#define EMPTY_FACE_NAME   "empty.111"
 
#define ENCOUNTER   67
 
#define EVENT_CONNECTOR   116
 
#define EXIT   66
 
#define EXIT_ALT_X(xyz)   (xyz)->stats.maxhp
 
#define EXIT_ALT_Y(xyz)   (xyz)->stats.maxsp
 
#define EXIT_LEVEL(xyz)   (xyz)->stats.food
 
#define EXIT_PATH(xyz)   (xyz)->slaying
 
#define EXIT_X(xyz)   (xyz)->stats.hp
 
#define EXIT_Y(xyz)   (xyz)->stats.sp
 
#define EXPERIENCE   44
 
#define F_APPROX   32
 
#define F_BUY   0
 
#define F_IDENTIFIED   8
 
#define F_NO_BARGAIN   4
 
#define F_NOT_CURSED   16
 
#define F_SELL   1
 
#define F_SHOP   64
 
#define F_TRUE   2
 
#define FABS(x)   ((x) < 0 ? -(x) : (x))
 
#define FAST_STRCAT(buf__, buf2__)   { memcpy(buf__, buf2__, strlen(buf2__)); buf__ += strlen(buf2__); }
 
#define FAST_STRNCAT(buf__, buf2__, size__)   { memcpy(buf__, buf2__, size__); buf__ += size__; }
 
#define FINISH_FASTCAT(buf__)   buf__[0] = '\0';
 
#define FIREWALL   62
 
#define FLAG_ACTIVATE_ON_PUSH   105
 
#define FLAG_ACTIVATE_ON_RELEASE   106
 
#define FLAG_AFK   111
 
#define FLAG_ALIVE   0
 
#define FLAG_ANIMATE   11
 
#define FLAG_APPLIED   5
 
#define FLAG_AUTO_APPLY   18
 
#define FLAG_BEEN_APPLIED   80
 
#define FLAG_BERSERK   99
 
#define FLAG_BLESSED   112
 
#define FLAG_BLIND   92
 
#define FLAG_BLOCKSVIEW   35
 
#define FLAG_CAN_ROLL   22
 
#define FLAG_CAN_USE_SKILL   79
 
#define FLAG_CAST_SPELL   52
 
#define FLAG_CHANGING   31
 
#define FLAG_CLIENT_ANIM_RANDOM   10
 
#define FLAG_CLIENT_ANIM_SYNC   9
 
#define FLAG_CLIENT_SENT   98
 
#define FLAG_CONFUSED   70
 
#define FLAG_CONTENT_ON_GEN   108
 
#define FLAG_CURSED   74
 
#define FLAG_DAMNED   75
 
#define FLAG_DIALOG_PARSED   12
 
#define FLAG_FREED   3
 
#define FLAG_FRIENDLY   15
 
#define FLAG_GENERATOR   16
 
#define FLAG_HITBACK   33
 
#define FLAG_IDENTIFIED   29
 
#define FLAG_INV_LOCKED   86
 
#define FLAG_IS_A_TEMPLATE   109
 
#define FLAG_IS_BUILDABLE   110
 
#define FLAG_IS_CAULDRON   94
 
#define FLAG_IS_FLOOR   63
 
#define FLAG_IS_HILLY   88
 
#define FLAG_IS_LIGHTABLE   43
 
#define FLAG_IS_LINKED   73
 
#define FLAG_IS_THROWN   17
 
#define FLAG_IS_TURNABLE   24
 
#define FLAG_IS_USED_UP   28
 
#define FLAG_IS_WATER   107
 
#define FLAG_IS_WOODED   87
 
#define FLAG_KNOWN_BLESSED   113
 
#define FLAG_KNOWN_CURSED   78
 
#define FLAG_KNOWN_MAGICAL   77
 
#define FLAG_LIFESAVE   64
 
#define FLAG_MAKE_INVIS   85
 
#define FLAG_MONSTER   14
 
#define FLAG_NEUTRAL   100
 
#define FLAG_NO_APPLY   62
 
#define FLAG_NO_ATTACK   101
 
#define FLAG_NO_DAMAGE   102
 
#define FLAG_NO_DROP   50
 
#define FLAG_NO_FIX_PLAYER   42
 
#define FLAG_NO_MAGIC   41
 
#define FLAG_NO_PICK   8
 
#define FLAG_NO_SKILL_IDENT   91
 
#define FLAG_NO_STEAL   96
 
#define FLAG_NO_STRENGTH   65
 
#define FLAG_OBJ_ORIGINAL   103
 
#define FLAG_ONE_HIT   97
 
#define FLAG_ONLY_ATTACK   69
 
#define FLAG_OVERLAY_FLOOR   23
 
#define FLAG_PLAYER_SOLD   20
 
#define FLAG_RANDOM_MOVE   68
 
#define FLAG_READY_BOW   60
 
#define FLAG_READY_RANGE   59
 
#define FLAG_READY_SCROLL   81
 
#define FLAG_READY_SKILL   89
 
#define FLAG_READY_WEAPON   90
 
#define FLAG_REFL_MISSILE   39
 
#define FLAG_REFL_SPELL   40
 
#define FLAG_REFLECTING   30
 
#define FLAG_REMOVED   2
 
#define FLAG_RUN_AWAY   45
 
#define FLAG_SCARED   37
 
#define FLAG_SEE_ANYWHERE   76
 
#define FLAG_SEE_IN_DARK   93
 
#define FLAG_SEE_INVISIBLE   21
 
#define FLAG_SLEEP   66
 
#define FLAG_SPLITTING   32
 
#define FLAG_STAND_STILL   67
 
#define FLAG_STARTEQUIP   34
 
#define FLAG_STEALTH   71
 
#define FLAG_TEAR_DOWN   44
 
#define FLAG_TREASURE   19
 
#define FLAG_UNAGGRESSIVE   38
 
#define FLAG_UNDEAD   36
 
#define FLAG_UNIQUE   49
 
#define FLAG_UNPAID   6
 
#define FLAG_USE_ARMOUR   56
 
#define FLAG_USE_BOW   55
 
#define FLAG_USE_HORN   84
 
#define FLAG_USE_RANGE   54
 
#define FLAG_USE_RING   58
 
#define FLAG_USE_ROD   82
 
#define FLAG_USE_SCROLL   53
 
#define FLAG_USE_SHIELD   7
 
#define FLAG_USE_WEAPON   57
 
#define FLAG_WAS_WIZ   4
 
#define FLAG_WIZ   1
 
#define FLAG_WIZCAST   51
 
#define FLAG_WIZPASS   72
 
#define FLAG_XRAYS   61
 
#define FLESH   72
 
#define FLOOR   71
 
#define FOOD   6
 
#define FORCE   114
 
#define GATE   91
 
#define GEM   60
 
#define GENERATE_SPEED(xyz)   ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */
 
#define GENERATE_TYPE(xyz)   ((xyz)->stats.sp)
 
#define GIRDLE   113
 
#define GLOVES   100
 
#define GOD   50
 
#define GOLEM   46
 
#define GRIMREAPER   28
 
#define HAS_RANDOM_ITEMS(op)   (op->randomitems && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))
 
#define HELMET   34
 
#define HI4   240
 
#define HITRUN   3
 
#define HOLE   94 /* When open, objects fall through */
 
#define HOLY_ALTAR   56
 
#define HORN   35
 
#define HUGE_BUF   4096
 
#define IDENTIFY_ALTAR   139
 
#define INORGANIC   73
 
#define IS_ARMOR(op)
 
#define IS_ARROW(op)
 
#define IS_LIVE(op)
 
#define IS_SHIELD(op)   (op->type == SHIELD)
 
#define IS_WEAPON(op)   (op->type == ARROW || op->type == BOW || op->type == WEAPON)
 
#define KEY   24
 
#define LAMP   82
 
#define LIGHTER   75
 
#define LO4   15
 
#define LOCKED_DOOR   20
 
#define MAGIC_EAR   29
 
#define MAP   22
 
#define MARKER   55
 
#define MATERIAL   161
 
#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define MAX_ANIMATIONS   256
 
#define MAX_BUF   256
 
#define MAX_DARKNESS   5
 
#define MAX_LIGHT_RADII   4
 
#define MAX_NAME   48
 
#define MAX_STAT   30
 
#define MAX_WEAPON_ITEM_POWER   100
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define MIN_ACTIVE_SPEED   0.00001
 
#define MIN_STAT   1
 
#define MISC_OBJECT   79
 
#define MONEY   36
 
#define MONSTER   80
 
#define MOOD_FLOOR   65
 
#define MOVE_ALL   0x1f
 
#define MOVE_BLOCK_DEFAULT   MOVE_SWIM
 
#define MOVE_BOAT   0x10
 
#define MOVE_FLY_HIGH   0x4
 
#define MOVE_FLY_LOW   0x2
 
#define MOVE_FLYING   0x6
 
#define MOVE_SWIM   0x8
 
#define MOVE_WALK   0x1
 
#define NAME_MAX   255
 
#define NROF_SOUNDS   (23+NROFREALSPELLS) /* Number of sounds */
 
#define NROFNEWOBJS(xyz)   ((xyz)->stats.food)
 
#define NUM_FLAGS   113
 
#define OB_MOVE_BLOCK(ob1, ob2)   ((ob1->move_type&ob2->move_block) == ob1->move_type)
 
#define OB_TYPE_MOVE_BLOCK(ob1, type)   ((type != 0) && (ob1->move_type&type) == ob1->move_type)
 
#define OBJECT_TYPE_MAX   162
 
#define PACEH   64
 
#define PACEH2   80
 
#define PACEV   128
 
#define PACEV2   144
 
#define PEACEMAKER   59
 
#define PEDESTAL   17
 
#define PETMOVE   16
 
#define PLAYER   1
 
#define PLAYER_CHANGER   57
 
#define PLAYERMOVER   40
 
#define POISON   7
 
#define POISONING   105
 
#define POTION   5
 
#define POTION_EFFECT   115
 
#define POWER_CRYSTAL   156
 
#define PREFER_HIGH   1
 
#define PREFER_LOW   0
 
#define PREPARE_FASTCAT(buf__)   buf__+strlen(buf__)
 
#define PU_ALLWEAPON   0x00020000
 
#define PU_ARMOUR   0x00000800
 
#define PU_ARROW   0x00000100
 
#define PU_BOOTS   0x00001000
 
#define PU_BOW   0x00000080
 
#define PU_CLOAK   0x00004000
 
#define PU_DEBUG   0x10000000
 
#define PU_DRINK   0x00000020
 
#define PU_FLESH   0x04000000
 
#define PU_FOOD   0x00000010
 
#define PU_GLOVES   0x00002000
 
#define PU_HELMET   0x00000200
 
#define PU_INHIBIT   0x20000000
 
#define PU_JEWELS   0x02000000
 
#define PU_KEY   0x00008000
 
#define PU_MAGIC_DEVICE   0x00800000
 
#define PU_MAGICAL   0x00040000
 
#define PU_MISSILEWEAPON   0x00010000
 
#define PU_NEWMODE   0x80000000
 
#define PU_NOT_CURSED   0x01000000
 
#define PU_NOTHING   0x00000000
 
#define PU_POTION   0x00080000
 
#define PU_RATIO   0x0000000F
 
#define PU_READABLES   0x00400000
 
#define PU_SHIELD   0x00000400
 
#define PU_SKILLSCROLL   0x00200000
 
#define PU_SPELLBOOK   0x00100000
 
#define PU_STOP   0x40000000
 
#define PU_VALUABLES   0x00000040
 
#define QUERY_FLAG(xyz, p)   ((xyz)->flags[p/32]&(1U<<(p%32)))
 
#define RANDO   96
 
#define RANDO2   112
 
#define RING   70
 
#define ROD   3
 
#define RUNATT   2
 
#define RUNE   154
 
#define RUSH   5
 
#define SAVEBED   106
 
#define SCROLL   111
 
#define SET_FLAG(xyz, p)   ((xyz)->flags[p/32] |= (1U<<(p%32)))
 
#define SET_GENERATE_TYPE(xyz, va)   (xyz)->stats.sp = (va)
 
#define SHIELD   33
 
#define SHOP_FLOOR   68
 
#define SHOP_INVENTORY   150
 
#define SHOP_MAT   69
 
#define SIGN   98
 
#define SIZEOFFREE   49
 
#define SIZEOFFREE1   8
 
#define SIZEOFFREE2   24
 
#define SKILL   43
 
#define SKILL_TOOL   74
 
#define SKILLSCROLL   130
 
#define SMOOTH_FACE_NAME   "default_smoothed.111"
 
#define SPECIAL_KEY   21
 
#define SPELL   101
 
#define SPELL_EFFECT   102
 
#define SPELLBOOK   85
 
#define SPINNER   90
 
#define ST_BD_BUILD   1
 
#define ST_BD_REMOVE   2
 
#define ST_CHANGE_CLASS   3
 
#define ST_CHANGE_PASSWORD_CONFIRM   13
 
#define ST_CHANGE_PASSWORD_NEW   12
 
#define ST_CHANGE_PASSWORD_OLD   11
 
#define ST_CONFIRM_PASSWORD   8
 
#define ST_CONFIRM_QUIT   4
 
#define ST_GET_NAME   6
 
#define ST_GET_PARTY_PASSWORD   10
 
#define ST_GET_PASSWORD   7
 
#define ST_MAT_FLOOR   1
 
#define ST_MAT_ITEM   3
 
#define ST_MAT_WALL   2
 
#define ST_MAT_WINDOW   4
 
#define ST_PLAY_AGAIN   1
 
#define ST_PLAYING   0
 
#define ST_ROLL_STAT   2
 
#define SYMPTOM   159
 
#define TELEPORTER   41
 
#define THROWN_OBJ   48
 
#define TIMED_GATE   26
 
#define TRANSPORT   2
 
#define TRAP   155
 
#define TRAPDOOR   95
 
#define TREASURE   4
 
#define TRIGGER   27
 
#define TRIGGER_ALTAR   31
 
#define TRIGGER_BUTTON   30
 
#define TRIGGER_MARKER   52
 
#define TRIGGER_PEDESTAL   32
 
#define VERY_BIG_BUF   1024
 
#define WAIT2   8
 
#define WAITATT   4
 
#define WALL   77
 
#define WAND   109
 
#define WEAP_BLUD   8
 
#define WEAP_CLEAVE   3
 
#define WEAP_CRUSH   7
 
#define WEAP_HIT   0
 
#define WEAP_PIERCE   2
 
#define WEAP_SLASH   1
 
#define WEAP_SLICE   4
 
#define WEAP_STAB   5
 
#define WEAP_WHIP   6
 
#define WEAPON   15
 
#define WEAPON_IMPROVER   124
 
#define WEAPON_SPEED(xyz)   (xyz)->last_sp
 
#define WEIGHT(op)   (op->nrof ? op->weight : op->weight+op->carrying)
 
#define OUT_OF_MEMORY   0
 
#define MAP_ERROR   1
 
#define ARCHTABLE_TOO_SMALL   2
 

Typedefs

typedef unsigned char MoveType
 
typedef struct typedata typedata
 

Functions

static void safe_strcat (char *dest, const char *orig, size_t *curlen, size_t maxlen)
 

Variables

error Your ANSI C compiler
should be defining 
__STDC__
 

Detailed Description

Core defines: object types, flags, etc.

This file is really too large. With all the .h files around, this file should be better split between them - things that deal with objects should be in objects.h, things dealing with players in player.h, etc. As it is, everything just seems to be dumped in here.

This file is best viewed with a window width of about 100 character.

Definition in file define.h.

Macro Definition Documentation

#define ARCHTABLE_TOO_SMALL   2

Definition at line 96 of file define.h.

Referenced by add_arch().

#define ARMOUR_SPEED (   xyz)    (xyz)->last_sp

Definition at line 788 of file define.h.

Referenced by describe_item(), fix_object(), improve_armour(), and set_abs_magic().

#define ARMOUR_SPELLS (   xyz)    (xyz)->gen_sp_armour

Definition at line 789 of file define.h.

Referenced by describe_item().

#define BIG_NAME   32

Definition at line 88 of file define.h.

Referenced by check_score(), copy_score(), get_score(), kill_object(), and poison_type_apply().

#define BLANK_FACE_NAME   "blank.111"

Definition at line 900 of file define.h.

Referenced by read_bmap_names().

#define DESCRIBE_ABILITY (   retbuf,
  variable,
  name 
)
Value:
if (variable) { \
int i, j = 0; \
strcat(retbuf, "(" name ": "); \
for (i = 0; i < NROFATTACKS; i++) \
if (variable&(1<<i)) { \
if (j) \
strcat(retbuf, ", "); \
else \
j = 1; \
strcat(retbuf, attacks[i]); \
} \
strcat(retbuf, ")"); \
}
#define NROFATTACKS
Definition: attack.h:45
const char *const attacks[NROFATTACKS]
Definition: living.c:220

Definition at line 956 of file define.h.

Referenced by dump_gods().

#define DESCRIBE_ABILITY_SAFE (   retbuf,
  variable,
  name,
  len,
  maxlen 
)
Value:
if (variable) { \
int i, j = 0; \
safe_strcat(retbuf, "(" name ": ", len, maxlen); \
for (i = 0; i < NROFATTACKS; i++) \
if (variable&(1<<i)) { \
if (j) \
safe_strcat(retbuf, ", ", len, maxlen); \
else \
j = 1; \
safe_strcat(retbuf, attacks[i], len, maxlen); \
} \
safe_strcat(retbuf, ")", len, maxlen); \
}
static void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen)
Definition: define.h:924
#define NROFATTACKS
Definition: attack.h:45
const char *const attacks[NROFATTACKS]
Definition: living.c:220

Definition at line 939 of file define.h.

Referenced by describe_item(), and describe_monster().

#define DESCRIBE_PATH (   retbuf,
  variable,
  name 
)
Value:
if (variable) { \
int i, j = 0; \
strcat(retbuf, "(" name ": "); \
for (i = 0; i < NRSPELLPATHS; i++) \
if (variable&(1<<i)) { \
if (j) \
strcat(retbuf, ", "); \
else \
j = 1; \
strcat(retbuf, spellpathnames[i]); \
} \
strcat(retbuf, ")"); \
}
const char *const spellpathnames[NRSPELLPATHS]
Definition: init.c:126
#define NRSPELLPATHS
Definition: spells.h:68

Definition at line 971 of file define.h.

Referenced by dump_gods().

#define DESCRIBE_PATH_SAFE (   retbuf,
  variable,
  name,
  len,
  maxlen 
)
Value:
if (variable) { \
int i, j = 0; \
safe_strcat(retbuf, "(" name ": ", len, maxlen); \
for (i = 0; i < NRSPELLPATHS; i++) \
if (variable&(1<<i)) { \
if (j) \
safe_strcat(retbuf, ", ", len, maxlen); \
else \
j = 1; \
safe_strcat(retbuf, spellpathnames[i], len, maxlen); \
} \
safe_strcat(retbuf, ")", len, maxlen); \
}
static void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen)
Definition: define.h:924
const char *const spellpathnames[NRSPELLPATHS]
Definition: init.c:126
#define NRSPELLPATHS
Definition: spells.h:68

Definition at line 986 of file define.h.

Referenced by describe_item(), describe_monster(), god_info_msg(), and ring_desc().

#define DIRX (   xyz)    freearr_x[(xyz)->direction]

Definition at line 785 of file define.h.

Referenced by common_process_projectile(), fire_bolt(), move_bolt(), move_bullet(), and move_missile().

#define DIRY (   xyz)    freearr_y[(xyz)->direction]

Definition at line 786 of file define.h.

Referenced by common_process_projectile(), fire_bolt(), move_bolt(), move_bullet(), and move_missile().

#define EMPTY_FACE_NAME   "empty.111"

Definition at line 901 of file define.h.

Referenced by read_bmap_names().

#define EXIT_ALT_X (   xyz)    (xyz)->stats.maxhp

Definition at line 752 of file define.h.

Referenced by op_on_battleground().

#define EXIT_ALT_Y (   xyz)    (xyz)->stats.maxsp

Definition at line 753 of file define.h.

Referenced by op_on_battleground().

#define EXIT_LEVEL (   xyz)    (xyz)->stats.food

Definition at line 749 of file define.h.

#define GENERATE_SPEED (   xyz)    ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */

Definition at line 746 of file define.h.

Referenced by generate_monster().

#define GENERATE_TYPE (   xyz)    ((xyz)->stats.sp)

Definition at line 745 of file define.h.

Referenced by calculate_difficulty().

#define HAS_RANDOM_ITEMS (   op)    (op->randomitems && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))

This return TRUE if object has still randomitems which could be expanded.

Definition at line 470 of file define.h.

Referenced by auto_apply(), do_auto_apply(), fix_auto_apply(), generate_monster_arch(), generate_monster_inv(), polymorph_living(), and rune_attack().

#define MAP_ERROR   1

Definition at line 95 of file define.h.

#define MAX_ANIMATIONS   256

Definition at line 85 of file define.h.

Referenced by init_anim().

#define MAX_BUF   256

Used for all kinds of things

Definition at line 81 of file define.h.

Referenced by add_author(), add_exit_to_item(), add_object_to_socklist(), add_score(), add_shop_item(), adjust_sign_msg(), animate_weapon(), apply_anim_suffix(), apply_builder_floor(), apply_builder_item(), apply_builder_remove(), apply_builder_wall(), apply_builder_window(), apply_changes_to_player(), apply_container(), apply_special(), artifact_msg(), attack_hth(), attack_message(), attempt_steal(), basic_emote(), blind_living(), book_type_apply(), calc_alch_danger(), can_pay(), cast_consecrate(), cast_identify(), cast_raise_dead_spell(), cast_spell(), cfapi_map_create_path(), cfapi_object_find_archetype_inside(), cfapi_object_forget_spell(), cfapi_object_set_property(), change_book(), change_exp(), change_spell(), check_login(), check_path(), check_race_restrictions(), check_score(), checkbanned(), checkdm(), choose_cult_monster(), command_addexp(), command_banish(), command_bowmode(), command_cast_spell(), command_cointoss(), command_create(), command_gsay(), command_help(), command_insert_into(), command_loadplugin(), command_mark(), command_me(), command_overlay_reset(), command_party(), command_players(), command_possess(), command_remove(), command_rename_item(), command_search_items(), command_statistics(), command_title(), command_use(), communicate(), compile_info(), content_recipe_value(), convert_newline(), converter_type_move_on(), copy_file(), create_archetype_by_object_name(), create_singularity(), dead_player(), delete_character(), describe_shop(), display_high_score(), display_motd(), display_who_entry(), do_server(), do_skill(), do_skill_attack(), do_skill_ident2(), do_talk_npc(), do_tell(), do_throw(), dragon_ability_gain(), dragon_eat_flesh(), drop_object(), dump_alchemy(), dump_alchemy_costs(), empty_container(), enter_fixed_template_map(), enter_random_template_map(), enter_unique_map(), esrv_draw_look(), esrv_update_item(), esrv_update_stats(), eventListener(), exit_type_apply(), find_key(), find_mon_throw_ob(), find_player(), find_throw_ob(), fire_misc_object(), fix_flesh_item(), fix_walls(), flush_output_element(), food_type_apply(), forbid_play(), form_party(), get_payment(), give_artifact_abilities(), god_enchants_weapon(), god_examines_item(), god_info_msg(), gravestone_text(), help_topics(), hit_with_one_attacktype(), i18n_init(), identify_altar_type_move_on(), init_anim(), init_artifacts(), init_attackmess(), init_book_archive(), init_clocks(), init_emergency_mappath(), init_experience(), init_formulae(), init_msgfile(), init_races(), init_regions(), init_server(), init_startup(), initPlugins(), inventory(), is_defined_recipe(), item_matched_string(), key_change_class(), key_confirm_quit(), kill_object(), kill_player(), leave(), lighter_type_apply(), load_archetypes(), load_materials(), load_original_map(), load_overlay_map(), load_settings(), load_temporary_map(), load_treasure(), load_treasures(), load_unique_objects(), look_at(), magic_wall(), main(), make_formula_book(), make_list_like(), make_path_to_file(), map_info(), mark_item_cmd(), matches_sacrifice(), metaserver2_init(), metaserver2_updates(), metaserver_init(), metaserver_update(), mon_info_msg(), move_symptom(), new_player_cmd(), npc_say(), nstrtok(), open_and_uncompress_file(), parse_regions(), perceive_self(), pick_up_object(), player_apply(), player_lvl_adj(), polymorph_melt(), pray(), print_shop_string(), process_map(), put_object_in_sack(), query_base_name(), rangetostring(), read_bmap_names(), read_face_data(), read_map_log(), read_smooth(), ready_map_name(), receive_party_password(), recharge(), recursive_roll(), remove_directory(), resurrect_player(), sack_can_hold(), save_life(), save_map(), save_player(), second_arch_pass(), sell_item(), send_news(), send_rules(), show_matching_spells(), show_skills(), singing(), skillscroll_type_apply(), SockList_ReadPacket(), spellbook_type_apply(), strtoktolin(), summon_golem(), tailor_god_spell(), transport_type_apply(), treasure_type_apply(), unapply_for_ob(), unapply_special(), use_alchemy(), use_oratory(), verify_player(), write_book_archive(), write_map_log(), write_npc_list(), write_regions_link(), write_rune(), write_scroll(), write_slaying_info(), write_socket_buffer(), Write_To_Socket(), write_todclock(), and write_world_info().

#define MAX_DARKNESS   5

Maximum map darkness, there is no practical reason to exceed this

Definition at line 763 of file define.h.

Referenced by change_map_light(), and expand_lighted_sight().

#define MAX_LIGHT_RADII   4

Max radii for 'light' object, really large values allow objects that can slow down the game

Definition at line 759 of file define.h.

Referenced by cast_light(), draw_client_map2(), expand_lighted_sight(), make_object_glow(), and stand_in_light().

#define MAX_NAME   48
#define MAX_STAT   30

The maximum legal value of any stat

Definition at line 78 of file define.h.

Referenced by attempt_steal(), check_stat_bounds(), command_abil(), do_throw(), and pick_up_object().

#define MAX_WEAPON_ITEM_POWER   100

Maximum item power an item can have. If changed, check object::item_power for overflow issues.

Definition at line 768 of file define.h.

Referenced by god_enchants_weapon(), and improve_weapon().

#define MIN_ACTIVE_SPEED   0.00001

Cut off point of when an object is put on the active list or not

Definition at line 1063 of file define.h.

Referenced by can_merge(), describe_monster(), local_check_loaded_object(), make_object_glow(), move_monster(), move_teleporter(), remove_all_pets(), START_TEST(), stop_item(), summon_object(), and update_ob_speed().

#define MIN_STAT   1

The minimum legal value of any stat

Definition at line 79 of file define.h.

Referenced by check_stat_bounds().

#define NAME_MAX   255

NAME_MAX used by random maps may not be defined on pure ansi systems

Definition at line 75 of file define.h.

Referenced by load_dir().

#define NROF_SOUNDS   (23+NROFREALSPELLS) /* Number of sounds */

Definition at line 443 of file define.h.

#define NROFNEWOBJS (   xyz)    ((xyz)->stats.food)

Definition at line 688 of file define.h.

Referenced by change_object(), and hit_player().

#define SET_GENERATE_TYPE (   xyz,
  va 
)    (xyz)->stats.sp = (va)

Definition at line 744 of file define.h.

#define SIZEOFFREE1   8

Definition at line 439 of file define.h.

Referenced by enter_map(), find_enclosed_spot(), get_search_arr(), and summon_golem().

#define SIZEOFFREE2   24

Definition at line 440 of file define.h.

Referenced by communicate(), enter_map(), and get_search_arr().

#define SMOOTH_FACE_NAME   "default_smoothed.111"

Definition at line 902 of file define.h.

Referenced by read_bmap_names().

#define VERY_BIG_BUF   1024
#define WEAPON_SPEED (   xyz)    (xyz)->last_sp

Definition at line 790 of file define.h.

Referenced by describe_item(), and fix_object().

#define WEIGHT (   op)    (op->nrof ? op->weight : op->weight+op->carrying)

Returns the weight of the given object. Note: it does not take the number of items (nrof) into account.

Definition at line 1098 of file define.h.

Referenced by add_object_to_socklist(), do_server(), and esrv_update_item().

Typedef Documentation

typedef struct typedata typedata

Link an object type with skill needed to identify, and general name.

Function Documentation

static void safe_strcat ( char *  dest,
const char *  orig,
size_t *  curlen,
size_t  maxlen 
)
inlinestatic

Simple function we use below to keep adding to the same string but also make sure we don't overwrite that string.

Parameters
deststring to append to.
origstring to append.
[out]curlencurrent length of dest. Will be updated by this function.
maxlenmaximum length of dest buffer.

Definition at line 924 of file define.h.

Referenced by god_info_msg(), query_base_name(), query_name(), and query_short_name().

+ Here is the caller graph for this function:

Variable Documentation

error Your ANSI C compiler should be defining __STDC__

Definition at line 53 of file define.h.