Crossfire Server, Trunk  R20513
Data Structures | Macros | Typedefs | Enumerations | Functions
define.h File Reference

Core defines: object types, flags, etc. More...

#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
 Link an object type with skill needed to identify, and general name. More...
 

Macros

#define AC_PLAYER_STAT_LIMIT   1 /** Limit stats to racial maximum */
 
#define AC_PLAYER_STAT_NO_CHANGE   2 /** Do not make any stat adjustments */
 
#define ALLRUN   6
 Always run, never attack good for sim. More...
 
#define AP_APPLY   1
 Item is to be applied. More...
 
#define AP_BASIC_FLAGS   15
 
#define AP_IGNORE_CURSE   32
 Apply/unapply regardless of cursed/damned status. More...
 
#define AP_NO_MERGE   16
 Don't try to merge object after (un)applying it. More...
 
#define AP_NOPRINT   128
 Don't print messages - caller will do that may be some that still print. More...
 
#define AP_NULL   0
 Nothing specific. More...
 
#define AP_PRINT   64
 Print what to do, don't actually do it Note this is supported in all the functions. More...
 
#define AP_UNAPPLY   2
 Item is to be remvoed. More...
 
#define ARMOUR_SPEED(xyz)   (xyz)->last_sp
 
#define ARMOUR_SPELLS(xyz)   (xyz)->gen_sp_armour
 
#define BIG_NAME   32
 
#define BLANK_FACE_NAME   "blank.111"
 
#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 CIRCLE1   32
 If the upper four bits of move_type / attack_movement are set to this number, the monster will move in a circle until it is attacked, or the enemy field is set, this is good for non-aggressive monsters and NPC. More...
 
#define CIRCLE2   48
 Same as CIRCLE1 but a larger circle is used. More...
 
#define CLEAR_FLAG(xyz, p)   clear_flag(xyz, p)
 
#define COMPARE_FLAGS(p, q)   compare_flags(p, q)
 
#define DIRX(xyz)   freearr_x[(xyz)->direction]
 
#define DIRY(xyz)   freearr_y[(xyz)->direction]
 
#define DISTATT   1
 Move toward a player if far, but maintain some space, attack from a distance - good for missile users only. More...
 
#define DISTHIT   7
 Attack from a distance if hit as recommended by Frank. More...
 
#define EMPTY_FACE_NAME   "empty.111"
 
#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 FABS(x)   ((x) < 0 ? -(x) : (x))
 Decstations have trouble with fabs()... More...
 
#define FLAG_ACTIVATE_ON_PUSH   105
 connected object is activated when 'pushed' More...
 
#define FLAG_ACTIVATE_ON_RELEASE   106
 connected object is activated when 'released' More...
 
#define FLAG_AFK   111
 Player is AFK. More...
 
#define FLAG_ALIVE   0
 Object can fight (or be fought) More...
 
#define FLAG_ANIMATE   11
 The object looks at archetype for faces. More...
 
#define FLAG_APPLIED   5
 Object is ready for use by living. More...
 
#define FLAG_AUTO_APPLY   18
 Will be applied when created. More...
 
#define FLAG_BEEN_APPLIED   80
 The object has been applied. More...
 
#define FLAG_BERSERK   99
 monster will attack closest living object More...
 
#define FLAG_BLESSED   112
 Item has a blessing, opposite of cursed/damned. More...
 
#define FLAG_BLIND   92
 If set, object cannot see (visually) More...
 
#define FLAG_BLOCKSVIEW   35
 Object blocks view. More...
 
#define FLAG_CAN_ROLL   22
 Object can be rolled. More...
 
#define FLAG_CAN_USE_SKILL   79
 The monster can use skills. More...
 
#define FLAG_CAST_SPELL   52
 (Monster) can learn and cast spells More...
 
#define FLAG_CHANGING   31
 Changes to other_arch when anim is done. More...
 
#define FLAG_CLIENT_ANIM_RANDOM   10
 Client animate this, randomized. More...
 
#define FLAG_CLIENT_ANIM_SYNC   9
 Let client animate this, synchronized. More...
 
#define FLAG_CLIENT_SENT   98
 THIS IS A DEBUG FLAG ONLY. More...
 
#define FLAG_CONFUSED   70
 Will also be unable to cast spells. More...
 
#define FLAG_CONTENT_ON_GEN   108
 
#define FLAG_CURSED   74
 The object is cursed. More...
 
#define FLAG_DAMNED   75
 The object is very cursed. More...
 
#define FLAG_DIALOG_PARSED   12
 Was the object::msg field parsed? Temporary flag not saved. More...
 
#define FLAG_FREED   3
 Object is in the list of free objects. More...
 
#define FLAG_FRIENDLY   15
 Will help players. More...
 
#define FLAG_GENERATOR   16
 Will generate type ob->stats.food. More...
 
#define FLAG_HITBACK   33
 Object will hit back when hit. More...
 
#define FLAG_IDENTIFIED   29
 Player knows full info about item. More...
 
#define FLAG_INV_LOCKED   86
 Item will not be dropped from inventory. More...
 
#define FLAG_IS_A_TEMPLATE   109
 Object has no ingame life until instantiated. More...
 
#define FLAG_IS_BUILDABLE   110
 Can build on item. More...
 
#define FLAG_IS_CAULDRON   94
 container can make alchemical stuff More...
 
#define FLAG_IS_FLOOR   63
 Can't see what's underneath this object. More...
 
#define FLAG_IS_HILLY   88
 Item is hilly/mountain terrain. More...
 
#define FLAG_IS_LIGHTABLE   43
 object can be lit More...
 
#define FLAG_IS_LINKED   73
 The object is linked with other objects. More...
 
#define FLAG_IS_THROWN   17
 Object is designed to be thrown. More...
 
#define FLAG_IS_TURNABLE   24
 Object can change face with direction. More...
 
#define FLAG_IS_USED_UP   28
 When (–food<0) the object will exit. More...
 
#define FLAG_IS_WATER   107
 
#define FLAG_IS_WOODED   87
 Item is wooded terrain. More...
 
#define FLAG_KNOWN_BLESSED   113
 Item is known to be blessed. More...
 
#define FLAG_KNOWN_CURSED   78
 The object is known to be cursed. More...
 
#define FLAG_KNOWN_MAGICAL   77
 The object is known to be magical. More...
 
#define FLAG_LIFESAVE   64
 Saves a players' life once, then destr. More...
 
#define FLAG_MAKE_INVIS   85
 (Item) gives invisibility when applied More...
 
#define FLAG_MONSTER   14
 Will attack players. More...
 
#define FLAG_NEUTRAL   100
 monster is from type neutral More...
 
#define FLAG_NO_APPLY   62
 Avoids step_on/fly_on to this object. More...
 
#define FLAG_NO_ATTACK   101
 monster don't attack More...
 
#define FLAG_NO_DAMAGE   102
 monster can't be damaged More...
 
#define FLAG_NO_DROP   50
 Object can't be dropped. More...
 
#define FLAG_NO_FIX_PLAYER   42
 fix_object() won't be called More...
 
#define FLAG_NO_MAGIC   41
 Spells (some) can't pass this object. More...
 
#define FLAG_NO_PICK   8
 Object can't be picked up. More...
 
#define FLAG_NO_SAVE   13
 If set (through plugins), the object is not saved on maps. More...
 
#define FLAG_NO_SKILL_IDENT   91
 If set, item cannot be identified w/ a skill. More...
 
#define FLAG_NO_STEAL   96
 Item can't be stolen. More...
 
#define FLAG_NO_STRENGTH   65
 Strength-bonus not added to wc/dam. More...
 
#define FLAG_OBJ_ORIGINAL   103
 NEVER SET THIS. More...
 
#define FLAG_ONE_HIT   97
 Monster can only hit once before going away (replaces ghosthit) More...
 
#define FLAG_ONLY_ATTACK   69
 NPC will evaporate if there is no enemy. More...
 
#define FLAG_OVERLAY_FLOOR   23
 Object is an overlay floor. More...
 
#define FLAG_PARALYZED   114
 Monster or player is paralyzed. More...
 
#define FLAG_PLAYER_SOLD   20
 Object was sold to a shop by a player. More...
 
#define FLAG_PROBE   25
 Object displays HP information to player. More...
 
#define FLAG_RANDOM_MOVE   68
 NPC will move randomly. More...
 
#define FLAG_READY_BOW   60
 not implemented yet More...
 
#define FLAG_READY_RANGE   59
 (Monster) has a range attack readied... More...
 
#define FLAG_READY_SCROLL   81
 monster has scroll in inv and can use it More...
 
#define FLAG_READY_SKILL   89
 (Monster or Player) has a skill readied More...
 
#define FLAG_READY_WEAPON   90
 (Monster or Player) has a weapon readied More...
 
#define FLAG_REFL_MISSILE   39
 Arrows will reflect from object. More...
 
#define FLAG_REFL_SPELL   40
 Spells (some) will reflect from object. More...
 
#define FLAG_REFLECTING   30
 Object reflects from walls (lightning) More...
 
#define FLAG_REMOVED   2
 Object is not in any map or invenory. More...
 
#define FLAG_RUN_AWAY   45
 Object runs away from nearest player \ but can still attack at a distance. More...
 
#define FLAG_SCARED   37
 Monster is scared (mb player in future) More...
 
#define FLAG_SEE_ANYWHERE   76
 The object will be visible behind walls. More...
 
#define FLAG_SEE_IN_DARK   93
 if set ob not effected by darkness More...
 
#define FLAG_SEE_INVISIBLE   21
 Will see invisible player. More...
 
#define FLAG_SLEEP   66
 NPC is sleeping. More...
 
#define FLAG_SPLITTING   32
 Object splits into stats.food other objs. More...
 
#define FLAG_STAND_STILL   67
 NPC will not (ever) move. More...
 
#define FLAG_STARTEQUIP   34
 Object was given to player at start. More...
 
#define FLAG_STEALTH   71
 Will wake monsters with less range. More...
 
#define FLAG_TEAR_DOWN   44
 at->faces[hp*animations/maxhp] at hit More...
 
#define FLAG_TREASURE   19
 Will generate treasure when applied. More...
 
#define FLAG_UNAGGRESSIVE   38
 Monster doesn't attack players. More...
 
#define FLAG_UNDEAD   36
 Monster is undead. More...
 
#define FLAG_UNIQUE   49
 Item is really unique (UNIQUE_ITEMS) More...
 
#define FLAG_UNPAID   6
 Object hasn't been paid for yet. More...
 
#define FLAG_USE_ARMOUR   56
 (Monster) can wear armour/shield/helmet More...
 
#define FLAG_USE_BOW   55
 (Monster) can apply and fire bows More...
 
#define FLAG_USE_RANGE   54
 (Monster) can apply and use range items More...
 
#define FLAG_USE_RING   58
 (Monster) can use rings, boots, gauntlets, etc More...
 
#define FLAG_USE_SCROLL   53
 (Monster) can read scroll More...
 
#define FLAG_USE_SHIELD   7
 Can this creature use a shield? More...
 
#define FLAG_USE_WEAPON   57
 (Monster) can wield weapons More...
 
#define FLAG_WAS_WIZ   4
 Player was once a wiz. More...
 
#define FLAG_WIZ   1
 Object has special privilegies. More...
 
#define FLAG_WIZCAST   51
 The wizard can cast spells in no-magic area. More...
 
#define FLAG_WIZPASS   72
 The wizard can go through walls. More...
 
#define FLAG_XRAYS   61
 X-ray vision. More...
 
#define FOR_ABOVE_FINISH()
 Finishes FOR_ABOVE_PREPARE(). More...
 
#define FOR_ABOVE_PREPARE(op_, it_)
 Constructs a loop iterating over all objects above an object. More...
 
#define FOR_BELOW_FINISH()
 Finishes FOR_BELOW_PREPARE(). More...
 
#define FOR_BELOW_PREPARE(op_, it_)
 Constructs a loop iterating over all objects below an object. More...
 
#define FOR_INV_FINISH()
 Finishes FOR_INV_PREPARE(). More...
 
#define FOR_INV_PREPARE(op_, it_)
 Constructs a loop iterating over the inventory of an object. More...
 
#define FOR_MAP_FINISH()
 Finishes FOR_MAP_PREPARE(). More...
 
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
 Constructs a loop iterating over all objects of a map tile. More...
 
#define FOR_OB_AND_ABOVE_FINISH()   FOR_OB_FINISH()
 Finishes FOR_OB_AND_ABOVE_PREPARE(). More...
 
#define FOR_OB_AND_ABOVE_PREPARE(op_)   FOR_OB_PREPARE(op_, above, __LINE__)
 Constructs a loop iterating over an object and all objects above it in the same pile. More...
 
#define FOR_OB_AND_BELOW_FINISH()   FOR_OB_FINISH()
 Finishes FOR_OB_AND_BELOW_PREPARE(). More...
 
#define FOR_OB_AND_BELOW_PREPARE(op_)   FOR_OB_PREPARE(op_, below, __LINE__)
 Constructs a loop iterating over an object and all objects below it in the same pile. More...
 
#define FOR_OB_FINISH()
 Finishes FOR_OB_PREPARE(). More...
 
#define FOR_OB_PREPARE(op_, field_, suffix_)   FOR_OB_PREPARE2(op_, field_, suffix_)
 Constructs a loop iterating over a set of objects. More...
 
#define FOR_OB_PREPARE2(op_, field_, suffix_)
 Constructs a loop iterating over a set of objects. More...
 
#define GENERATE_SPEED(xyz)   ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */
 
#define GENERATE_TYPE(xyz)   ((xyz)->stats.sp)
 
#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. More...
 
#define HI4   240
 
#define HITRUN   3
 Run to then hit player then run away cyclicly. More...
 
#define HUGE_BUF   4096
 Used for messages - some can be quite long. More...
 
#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 LO4   15
 bitmasks for upper and lower 4 bits from 8 bit fields More...
 
#define MAX_ANIMATIONS   256
 
#define MAX_BUF   256
 Used for all kinds of things. More...
 
#define MAX_DARKNESS   5
 Maximum map darkness, there is no practical reason to exceed this. More...
 
#define MAX_LIGHT_RADII   4
 Max radii for 'light' object, really large values allow objects that can slow down the game. More...
 
#define MAX_NAME   48
 
#define MAX_WEAPON_ITEM_POWER   100
 Maximum item power an item can have. More...
 
#define MIN_ACTIVE_SPEED   0.00001
 Cut off point of when an object is put on the active list or not. More...
 
#define MIN_STAT   1
 The minimum legal value of any stat. More...
 
#define MOVE_ALL   0x1f
 Mask of all movement types. More...
 
#define MOVE_BLOCK_DEFAULT   MOVE_SWIM
 The normal assumption is that objects are walking/flying. More...
 
#define MOVE_BOAT   0x10
 Boats/sailing. More...
 
#define MOVE_FLY_HIGH   0x4
 High flying object. More...
 
#define MOVE_FLY_LOW   0x2
 Low flying object. More...
 
#define MOVE_FLYING   0x6
 Combo of fly_low and fly_high. More...
 
#define MOVE_SWIM   0x8
 Swimming object. More...
 
#define MOVE_WALK   0x1
 Object walks. More...
 
#define NAME_MAX   255
 NAME_MAX used by random maps may not be defined on pure ansi systems. More...
 
#define NROF_SOUNDS   (23+NROFREALSPELLS) /* Number of sounds */
 
#define NUM_FLAGS   114
 Should always be equal to the last defined flag. More...
 
#define OB_MOVE_BLOCK(ob1, ob2)   ((ob1->move_type&ob2->move_block) == ob1->move_type)
 Basic macro to see if ob2 blocks ob1 from moving onto this space. More...
 
#define OB_TYPE_MOVE_BLOCK(ob1, type)   ((type != 0) && (ob1->move_type&type) == ob1->move_type)
 Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add check - if type is 0, don't stop anything from moving onto it. More...
 
#define PACEH   64
 The monster will pace back and forth until attacked. More...
 
#define PACEH2   80
 The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. More...
 
#define PACEV   128
 The monster will pace back and forth until attacked. More...
 
#define PACEV2   144
 The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. More...
 
#define PETMOVE   16
 If the upper four bits of attack_movement are set to this number, the monster follows a player until the owner calls it back or off player followed denoted by ob->owner the monster will try to attack whatever the player is attacking, and will continue to do so until the calls off the monster - a key command will be inserted to do so. More...
 
#define PREFER_HIGH   1
 
#define PREFER_LOW   0
 
#define PU_ARMOUR   0x00000800
 
#define PU_ARROW   0x00000100
 
#define PU_BOOTS   0x00001000
 
#define PU_BOW   0x00000080
 
#define PU_CLOAK   0x00004000
 
#define PU_CONTAINER   0x08000000
 
#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_MELEEWEAPON   0x00020000
 
#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)   query_flag(xyz, p)
 
#define RANDO   96
 The monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction. More...
 
#define RANDO2   112
 Constantly move in a different random direction. More...
 
#define RANDOM()   cf_random()
 
#define RUNATT   2
 Run but attack if player catches up to object. More...
 
#define RUSH   5
 Rush toward player blindly, similiar to dumb monster. More...
 
#define SET_FLAG(xyz, p)   set_flag(xyz, p)
 
#define SET_GENERATE_TYPE(xyz, va)   (xyz)->stats.sp = (va)
 
#define SIZEOFFREE   49
 
#define SIZEOFFREE1   8
 
#define SIZEOFFREE2   24
 
#define SMOOTH_FACE_NAME   "default_smoothed.111"
 
#define SRANDOM(seed)   cf_srandom(seed)
 
#define ST_BD_BUILD   1
 Builds an item. More...
 
#define ST_BD_REMOVE   2
 Removes an item. More...
 
#define ST_CHANGE_CLASS   3
 New character, choosing class. More...
 
#define ST_CHANGE_PASSWORD_CONFIRM   13
 Player is confirming new password. More...
 
#define ST_CHANGE_PASSWORD_NEW   12
 Player is entering new password. More...
 
#define ST_CHANGE_PASSWORD_OLD   11
 Player is entering old password to change password. More...
 
#define ST_CONFIRM_PASSWORD   8
 New character, confirm password. More...
 
#define ST_CONFIRM_QUIT   4
 Player used the 'quit' command, make sure that's ok. More...
 
#define ST_GET_NAME   6
 Player just connected. More...
 
#define ST_GET_PARTY_PASSWORD   10
 Player tried to join a password-protected party. More...
 
#define ST_GET_PASSWORD   7
 Name entered, now for password. More...
 
#define ST_MAT_FLOOR   1
 Floor. More...
 
#define ST_MAT_ITEM   3
 Most other items, including doors & such. More...
 
#define ST_MAT_WALL   2
 Wall. More...
 
#define ST_MAT_WINDOW   4
 Window. More...
 
#define ST_PLAY_AGAIN   1
 Player left through a bed of reality, and can login again. More...
 
#define ST_PLAYING   0
 Usual state. More...
 
#define ST_ROLL_STAT   2
 New character, rolling stats. More...
 
#define VERY_BIG_BUF   1024
 
#define WAIT2   8
 Monster does not try to move towards player if far. More...
 
#define WAITATT   4
 Wait for player to approach then hit, move if hit. More...
 
#define WEAP_BLUD   8
 bludgeoning, club, stick More...
 
#define WEAP_CLEAVE   3
 axe More...
 
#define WEAP_CRUSH   7
 big hammers, flails More...
 
#define WEAP_HIT   0
 the basic More...
 
#define WEAP_PIERCE   2
 arrows, stiletto More...
 
#define WEAP_SLASH   1
 slash More...
 
#define WEAP_SLICE   4
 katana More...
 
#define WEAP_STAB   5
 knife, dagger More...
 
#define WEAP_WHIP   6
 whips n chains More...
 
#define WEAPON_SPEED(xyz)   (xyz)->last_sp
 
#define WEIGHT(op)   (op->nrof ? op->weight : op->weight+op->carrying)
 Returns the weight of the given object. More...
 

Typedefs

typedef unsigned char MoveType
 Typdef here to define type large enough to hold bitmask of all movement types. More...
 
typedef struct typedata typedata
 Link an object type with skill needed to identify, and general name. More...
 

Enumerations

enum  fatal_error {
  OUT_OF_MEMORY = 0, MAP_ERROR = 1, ARCHTABLE_TOO_SMALL = 2, ARCHETYPE_ISSUE = 3,
  SEE_LAST_ERROR = 4
}
 Fatal variables; used as arguments to fatal(). More...
 

Functions

uint32_t cf_random (void)
 
void cf_srandom (unsigned long seed)
 

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 AC_PLAYER_STAT_LIMIT   1 /** Limit stats to racial maximum */

Definition at line 632 of file define.h.

Referenced by apply_changes_to_player(), and player_changer_type_process().

#define AC_PLAYER_STAT_NO_CHANGE   2 /** Do not make any stat adjustments */

Definition at line 633 of file define.h.

Referenced by apply_changes_to_player(), and apply_race_and_class().

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

Definition at line 480 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 481 of file define.h.

Referenced by describe_item().

#define BIG_NAME   32

Definition at line 42 of file define.h.

Referenced by get_score(), hiscore_check(), kill_object(), and poison_type_apply().

#define BLANK_FACE_NAME   "blank.111"

Definition at line 591 of file define.h.

Referenced by read_bmap_names().

#define DIRX (   xyz)    freearr_x[(xyz)->direction]
#define DIRY (   xyz)    freearr_y[(xyz)->direction]
#define EMPTY_FACE_NAME   "empty.111"

Definition at line 592 of file define.h.

Referenced by read_bmap_names().

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

Definition at line 459 of file define.h.

Referenced by op_on_battleground().

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

Definition at line 460 of file define.h.

Referenced by op_on_battleground().

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

Definition at line 456 of file define.h.

#define EXIT_PATH (   xyz)    (xyz)->slaying
#define EXIT_X (   xyz)    (xyz)->stats.hp
#define EXIT_Y (   xyz)    (xyz)->stats.sp
#define FABS (   x)    ((x) < 0 ? -(x) : (x))
#define FOR_ABOVE_FINISH ( )
Value:
} while(0)
#define FOR_OB_AND_ABOVE_FINISH()
Finishes FOR_OB_AND_ABOVE_PREPARE().
Definition: define.h:778

Finishes FOR_ABOVE_PREPARE().

Definition at line 729 of file define.h.

Referenced by cfapi_object_set_property(), check_altar_sacrifice(), check_trigger(), move_hole(), object_insert_in_ob(), send_changed_object(), and update_button().

#define FOR_ABOVE_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->above; \
#define FOR_OB_AND_ABOVE_PREPARE(op_)
Constructs a loop iterating over an object and all objects above it in the same pile.
Definition: define.h:774
struct obj object
Main Crossfire structure, one ingame object.

Constructs a loop iterating over all objects above an object.

Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 722 of file define.h.

Referenced by cfapi_object_set_property(), check_altar_sacrifice(), check_trigger(), move_hole(), object_insert_in_ob(), send_changed_object(), and update_button().

#define FOR_BELOW_FINISH ( )
#define FOR_BELOW_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->below; \
struct obj object
Main Crossfire structure, one ingame object.
#define FOR_OB_AND_BELOW_PREPARE(op_)
Constructs a loop iterating over an object and all objects below it in the same pile.
Definition: define.h:785

Constructs a loop iterating over all objects below an object.

Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 739 of file define.h.

Referenced by cast_consecrate(), check_item(), check_pick(), command_examine(), command_take(), convert_item(), give_initial_items(), monster_apply_below(), monster_check_pickup(), move_creator(), op_on_battleground(), pray(), and runpickupobject().

#define FOR_INV_FINISH ( )
Value:
} while(0)
#define FOR_OB_AND_BELOW_FINISH()
Finishes FOR_OB_AND_BELOW_PREPARE().
Definition: define.h:789

Finishes FOR_INV_PREPARE().

Definition at line 712 of file define.h.

Referenced by add_abilities(), adj_stealchance(), alchemy(), alchemy_failure_effect(), apply_auto(), apply_auto_fix(), apply_death_exp_penalty(), attempt_do_alchemy(), attempt_steal(), become_follower(), calc_alch_danger(), cancellation(), cast_bless(), cast_change_ability(), cast_curse(), cast_detection(), cast_identify(), cfapi_object_find_archetype_inside(), check_equipment(), check_inv_recursive(), check_physically_infect(), check_slaying_inventory(), CREMapInformationManager::checkInventory(), clean_object(), command_drop(), command_dropall(), command_empty(), command_rename_item(), content_recipe_value(), cure_disease(), do_auto_apply(), do_execute_event(), do_harvest(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident(), empty_container(), esrv_add_spells(), esrv_get_ob_from_count(), esrv_move_object(), esrv_send_inventory(), esrv_update_spells(), examine(), find_arrow(), find_best_player_hth_skill(), find_better_arrow(), find_key(), find_marked_object(), find_or_create_connection_for_map(), find_random_spell_in_ob(), find_skill_by_name(), find_skill_by_number(), find_throw_ob(), find_traps(), fix_container_multipart(), fix_object(), follower_has_similar_item(), follower_remove_given_items(), generate_monster_inv(), give_initial_items(), god_examines_priest(), god_removes_curse(), hit_map(), hit_player(), hit_with_one_attacktype(), identify_altar_type_move_on(), inventory(), is_defined_recipe(), is_true_undead(), learn_skill(), link_player_skills(), lookup_spell_by_name(), loot_object(), mark_inventory_as_no_drop(), meditate(), monster_check_apply_all(), monster_choose_random_spell(), monster_find_throw_ob(), monster_talk_to_npc(), monster_use_range(), monster_use_scroll(), monster_use_skill(), move_ob(), numb_ob_inside(), object_copy_with_inv(), object_create_clone(), object_free2(), object_insert_in_ob(), object_sum_weight(), pay_for_amount(), pay_for_item(), pay_from_container(), player_changer_type_process(), polymorph_living(), put_object_in_sack(), query_money(), remove_curse(), remove_special_prayers(), remove_trap(), save_object(), save_throw_object(), sell_item(), shop_mat_type_move_on(), show_matching_spells(), show_skills(), spell_consume_items(), stop_using_item(), subtract_player_exp(), transmute_item_to_flower(), transport_type_apply(), turn_one_transport(), unapply_for_ob(), use_skill(), and write_rune().

#define FOR_INV_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->inv; \
struct obj object
Main Crossfire structure, one ingame object.
#define FOR_OB_AND_BELOW_PREPARE(op_)
Constructs a loop iterating over an object and all objects below it in the same pile.
Definition: define.h:785

Constructs a loop iterating over the inventory of an object.

Example:

FOR_INV_PREPARE(op, inv)
    LOG(llevInfo, "%s\n", inv->name);
FOR_INV_FINISH();

or

FOR_INV_PREPARE(op, inv) {
    LOG(llevInfo, "%s\n", inv->name);
} FOR_INV_FINISH();
Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 705 of file define.h.

Referenced by add_abilities(), adj_stealchance(), alchemy(), alchemy_failure_effect(), apply_auto(), apply_auto_fix(), apply_death_exp_penalty(), attempt_do_alchemy(), attempt_steal(), become_follower(), calc_alch_danger(), cancellation(), cast_bless(), cast_change_ability(), cast_curse(), cast_detection(), cast_identify(), cfapi_object_find_archetype_inside(), check_equipment(), check_inv_recursive(), check_physically_infect(), check_slaying_inventory(), CREMapInformationManager::checkInventory(), clean_object(), command_drop(), command_dropall(), command_empty(), command_rename_item(), content_recipe_value(), cure_disease(), do_auto_apply(), do_execute_event(), do_harvest(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident(), empty_container(), esrv_add_spells(), esrv_get_ob_from_count(), esrv_move_object(), esrv_send_inventory(), esrv_update_spells(), examine(), find_arrow(), find_best_player_hth_skill(), find_better_arrow(), find_key(), find_marked_object(), find_or_create_connection_for_map(), find_random_spell_in_ob(), find_skill_by_name(), find_skill_by_number(), find_throw_ob(), find_traps(), fix_container_multipart(), fix_object(), follower_has_similar_item(), follower_remove_given_items(), generate_monster_inv(), give_initial_items(), god_examines_priest(), god_removes_curse(), hit_map(), hit_player(), hit_with_one_attacktype(), identify_altar_type_move_on(), inventory(), is_defined_recipe(), is_true_undead(), learn_skill(), link_player_skills(), lookup_spell_by_name(), loot_object(), mark_inventory_as_no_drop(), meditate(), monster_check_apply_all(), monster_choose_random_spell(), monster_find_throw_ob(), monster_talk_to_npc(), monster_use_range(), monster_use_scroll(), monster_use_skill(), move_ob(), numb_ob_inside(), object_copy_with_inv(), object_create_clone(), object_free2(), object_insert_in_ob(), object_sum_weight(), pay_for_amount(), pay_for_item(), pay_from_container(), player_changer_type_process(), polymorph_living(), put_object_in_sack(), query_money(), remove_curse(), remove_special_prayers(), remove_trap(), save_object(), save_throw_object(), sell_item(), shop_mat_type_move_on(), show_matching_spells(), show_skills(), spell_consume_items(), stop_using_item(), subtract_player_exp(), transmute_item_to_flower(), transport_type_apply(), turn_one_transport(), unapply_for_ob(), use_skill(), and write_rune().

#define FOR_MAP_FINISH ( )
Value:
} while(0)
#define FOR_OB_AND_ABOVE_FINISH()
Finishes FOR_OB_AND_ABOVE_PREPARE().
Definition: define.h:778

Finishes FOR_MAP_PREPARE().

Definition at line 765 of file define.h.

Referenced by add_exits_to_map(), alchemy(), apply_auto_fix(), apply_builder_floor(), attack_message(), attempt_jump(), blocked_link(), calculate_difficulty(), can_build_over(), cast_cause_disease(), cast_destruction(), cast_detection(), cast_earth_to_dust(), cast_identify(), cast_raise_dead_spell(), cast_transfer(), check_bullet(), check_infection(), command_style_map_info(), coords_in_shop(), counterspell(), decay_objects(), delete_unique_items(), dispel_rune(), do_auto_apply(), do_exit_map(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident(), door_in_square(), esrv_get_ob_from_count(), find_arch_at(), find_by_name(), find_closest_monster(), find_monster_in_room_recursive(), find_target_for_friendly_spell(), find_traps(), generate_monster(), get_connection_rune(), get_msg_book(), get_wall(), hit_map(), include_map_in_map(), kill_player_not_permadeath(), link_multipart_objects(), load_objects(), map_find_by_archetype(), map_find_by_type(), map_find_dir(), monster_check_doors(), monster_check_earthwalls(), monster_communicate(), monster_find_nearest_living_creature(), monster_npc_call_help(), move_player_attack(), move_player_mover(), nuke_map_region(), obj_count_in_map(), object_decrease_nrof(), object_increase_nrof(), object_insert_in_map(), object_merge_spell(), object_remove(), object_replace_insert_in_map(), ok_to_put_more(), peacemaker_type_process(), pets_get_enemy(), pets_move(), pets_move_golem(), pick_arrow_target(), place_exits(), probe(), CREMapInformationManager::process(), process_map(), reflwall(), remove_adjacent_doors(), remove_marking_runes(), remove_monsters(), remove_trap(), retrofit_joined_wall(), roll_ob(), save_objects(), singing(), skill_attack(), stand_near_hostile(), teleport(), try_fit(), unblock_exits(), update_position(), use_alchemy(), use_oratory(), and write_rune().

#define FOR_MAP_PREPARE (   map_,
  mx_,
  my_,
  it_ 
)
Value:
do { \
object *it_ = GET_MAP_OB((map_), (mx_), (my_)); \
#define FOR_OB_AND_ABOVE_PREPARE(op_)
Constructs a loop iterating over an object and all objects above it in the same pile.
Definition: define.h:774
struct obj object
Main Crossfire structure, one ingame object.
#define GET_MAP_OB(M, X, Y)
Gets the bottom object on a map.
Definition: map.h:172

Constructs a loop iterating over all objects of a map tile.

Parameters
map_the map to iterate over
mx_the map's x-coordinate to iterate over
my_the map's y-coordinate to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 758 of file define.h.

Referenced by add_exits_to_map(), alchemy(), apply_auto_fix(), apply_builder_floor(), attack_message(), attempt_jump(), blocked_link(), calculate_difficulty(), can_build_over(), cast_cause_disease(), cast_destruction(), cast_detection(), cast_earth_to_dust(), cast_identify(), cast_raise_dead_spell(), cast_transfer(), check_bullet(), check_infection(), command_style_map_info(), coords_in_shop(), counterspell(), decay_objects(), delete_unique_items(), dispel_rune(), do_auto_apply(), do_exit_map(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident(), door_in_square(), esrv_get_ob_from_count(), find_arch_at(), find_by_name(), find_closest_monster(), find_monster_in_room_recursive(), find_target_for_friendly_spell(), find_traps(), generate_monster(), get_connection_rune(), get_msg_book(), get_wall(), hit_map(), include_map_in_map(), kill_player_not_permadeath(), link_multipart_objects(), load_objects(), map_find_by_archetype(), map_find_by_type(), map_find_dir(), monster_check_doors(), monster_check_earthwalls(), monster_communicate(), monster_find_nearest_living_creature(), monster_npc_call_help(), move_player_attack(), move_player_mover(), nuke_map_region(), obj_count_in_map(), object_decrease_nrof(), object_increase_nrof(), object_insert_in_map(), object_merge_spell(), object_remove(), object_replace_insert_in_map(), ok_to_put_more(), peacemaker_type_process(), pets_get_enemy(), pets_move(), pets_move_golem(), pick_arrow_target(), place_exits(), probe(), CREMapInformationManager::process(), process_map(), reflwall(), remove_adjacent_doors(), remove_marking_runes(), remove_monsters(), remove_trap(), retrofit_joined_wall(), roll_ob(), save_objects(), singing(), skill_attack(), stand_near_hostile(), teleport(), try_fit(), unblock_exits(), update_position(), use_alchemy(), use_oratory(), and write_rune().

#define FOR_OB_AND_ABOVE_FINISH ( )    FOR_OB_FINISH()
#define FOR_OB_AND_ABOVE_PREPARE (   op_)    FOR_OB_PREPARE(op_, above, __LINE__)

Constructs a loop iterating over an object and all objects above it in the same pile.

Parameters
op_the object to start with

Definition at line 774 of file define.h.

Referenced by apply_builder_item(), apply_map_builder(), cast_create_town_portal(), object_check_move_on(), object_insert_in_map(), and steal().

#define FOR_OB_AND_BELOW_FINISH ( )    FOR_OB_FINISH()
#define FOR_OB_AND_BELOW_PREPARE (   op_)    FOR_OB_PREPARE(op_, below, __LINE__)
#define FOR_OB_FINISH ( )
Value:
} \
} while(0)

Finishes FOR_OB_PREPARE().

Definition at line 819 of file define.h.

#define FOR_OB_PREPARE (   op_,
  field_,
  suffix_ 
)    FOR_OB_PREPARE2(op_, field_, suffix_)

Constructs a loop iterating over a set of objects.

This function should not be used directly in client code.

Parameters
op_the object start start with
field_the field that holds the "next" pointer within op_
suffix_a suffix for constructing unique variable names

Definition at line 798 of file define.h.

#define FOR_OB_PREPARE2 (   op_,
  field_,
  suffix_ 
)
Value:
do { \
object *next##suffix_ = (op_); \
tag_t next_tag##suffix_ = next##suffix_ == NULL ? 0 : next##suffix_->count;\
while (((op_) = next##suffix_) != NULL) { \
if (object_was_destroyed(next##suffix_, next_tag##suffix_)) {\
break; \
} \
next##suffix_ = next##suffix_->field_; \
next_tag##suffix_ = next##suffix_ == NULL ? 0 : next##suffix_->count;
#define object_was_destroyed(op, old_tag)
Checks if an object still exists.
Definition: object.h:68
struct obj object
Main Crossfire structure, one ingame object.
uint32_t tag_t
Object tag, unique during the whole game.
Definition: object.h:12

Constructs a loop iterating over a set of objects.

This function should not be used at all. Use FOR_OB_PREPARE() instead.

Parameters
op_the object start start with
field_the field that holds the "next" pointer within op_
suffix_a suffix for constructing unique variable names

Definition at line 806 of file define.h.

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

Definition at line 453 of file define.h.

Referenced by generate_monster().

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

Definition at line 452 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 183 of file define.h.

Referenced by apply_auto(), apply_auto_fix(), do_auto_apply(), generate_monster_arch(), generate_monster_inv(), polymorph_living(), and rune_attack().

#define HUGE_BUF   4096
#define MAX_ANIMATIONS   256

Definition at line 39 of file define.h.

Referenced by init_anim().

#define MAX_BUF   256

Used for all kinds of things.

Definition at line 35 of file define.h.

Referenced by account_add_player_cmd(), account_char_load(), account_char_save(), account_login_cmd(), account_new_cmd(), account_password(), accounts_load(), accounts_save(), add_abilities(), add_author(), add_exit_to_item(), add_object_to_socklist(), 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_by_living(), apply_changes_to_player(), apply_check_apply_restrictions(), apply_check_race_restrictions(), apply_container(), apply_race_and_class(), apply_special(), apply_update_ranged_skill(), attack_hth(), attack_message(), attempt_jump(), attempt_steal(), basic_emote(), blind_living(), book_type_apply(), CREMapInformationManager::browseMaps(), 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_spell(), check_login(), check_path(), 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(), content_recipe_value(), convert_newline(), converter_type_move_on(), copy_file(), create_archetype_by_object_name(), create_player_cmd(), create_singularity(), dead_player(), decode_name_password(), delete_character(), describe_god(), display_motd(), display_who_entry(), do_skill(), do_skill_attack(), do_tell(), do_throw(), dragon_ability_gain(), dragon_eat_flesh(), drop_object(), dump_alchemy(), dump_alchemy_costs(), empty_container(), enter_fixed_template_map(), enter_player_savebed(), enter_random_template_map(), enter_unique_map(), esrv_draw_look(), esrv_send_inventory(), esrv_update_item(), esrv_update_stats(), eventListener(), examine(), exit_type_apply(), find_key(), find_player_options(), find_throw_ob(), fire_misc_object(), fix_flesh_item(), fix_walls(), food_type_apply(), forbid_play(), get_string_move_type(), give_artifact_abilities(), god_enchants_weapon(), god_examines_item(), gravestone_text(), help_topics(), hiscore_check(), hiscore_display(), hiscore_load(), hiscore_save(), hit_with_one_attacktype(), i18n_init(), identify_altar_type_move_on(), identify_object_with_skill(), init_anim(), init_artifacts(), init_attackmess(), init_book_archive(), init_clocks(), init_emergency_mappath(), init_experience(), init_formulae(), init_listening_socket(), init_msgfile(), init_races(), init_regions(), init_server(), init_startup(), init_stats(), initPlugins(), inventory(), is_defined_recipe(), key_change_class(), key_confirm_quit(), kill_object(), kill_player(), kill_player_not_permadeath(), kill_player_permadeath(), knowledge_alchemy_attempt(), knowledge_alchemy_detail(), knowledge_god_face(), knowledge_item_can_be_used_alchemy(), knowledge_player_knows(), knowledge_read_player_data(), knowledge_write_player_data(), leave(), lighter_type_apply(), load_archetypes(), load_materials(), load_overlay_map(), load_quests_from_file(), load_settings(), load_table_float(), load_table_int(), load_treasure(), load_treasures(), load_unique_objects(), QuestManager::loadQuestFile(), look_at(), magic_wall(), main(), make_formula_book(), make_list_like(), make_path_to_file(), map_info(), mapfile_load(), mark_item_cmd(), matches_sacrifice(), metaserver2_init(), metaserver2_updates(), monster_can_detect_enemy(), monster_communicate(), monster_find_throw_ob(), monster_format_say(), monsterFight(), move_symptom(), new_connection(), new_player_cmd(), nstrtok(), object_matches_string(), output_quests(), parse_regions(), party_form(), party_join(), party_leave(), perceive_self(), pets_summon_golem(), pick_up_object(), player_lvl_adj(), polymorph_melt(), potion_type_apply(), power_crystal_type_apply(), pray(), print_shop_string(), CREMapInformationManager::process(), process_map(), put_object_in_sack(), quest_read_player_data(), quest_write_player_data(), rangetostring(), read_bmap_names(), read_face_data(), read_map_log(), read_smooth(), recharge(), recursive_roll(), remove_directory(), resurrect_player(), sack_can_hold(), save_life(), save_map(), save_player(), save_throw_object(), second_arch_pass(), sell_item(), send_arch_info(), send_file(), send_new_char_info(), send_news(), send_rules(), shop_describe(), shop_pay_unpaid(), show_matching_spells(), show_skills(), singing(), skillscroll_type_apply(), spell_consume_items(), spellbook_type_apply(), START_TEST(), strtoktolin(), 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_readable_list(), write_regions_link(), write_rune(), write_scroll(), write_slaying_info(), write_todclock(), and write_world_info().

#define MAX_DARKNESS   5

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

Definition at line 470 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 466 of file define.h.

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

#define MAX_NAME   48
#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 475 of file define.h.

Referenced by god_enchants_weapon(), and improve_weapon().

#define MIN_ACTIVE_SPEED   0.00001
#define MIN_STAT   1

The minimum legal value of any stat.

Definition at line 33 of file define.h.

Referenced by change_abil(), check_race_and_class(), fix_player(), init_stats(), and kill_player_not_permadeath().

#define NAME_MAX   255

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

Definition at line 30 of file define.h.

Referenced by load_dir().

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

Definition at line 156 of file define.h.

#define PREFER_HIGH   1
#define PREFER_LOW   0
#define RANDOM ( )    cf_random()

Definition at line 679 of file define.h.

Referenced by add_abilities(), add_author(), add_npc_to_point(), add_npc_to_random_map(), add_npc_to_zone(), add_npcs_to_map(), alchemy_failure_effect(), artifact_describe(), artifact_msg(), bottom_centered_onion(), bottom_right_centered_onion(), centered_onion(), change_book(), change_luck(), citylife_globalEventListener(), create_all_treasures(), create_one_treasure(), crypt_string(), die_roll(), doorify_layout(), dragon_eat_flesh(), drain_stat(), eventListener(), fill_maze_full(), fill_maze_sparse(), find_doors_in_room_recursive(), find_free_point(), find_in_layout(), find_monster_in_room_recursive(), find_random_spell_in_ob(), find_spot_for_submap(), find_spot_in_room(), find_spot_in_room_recursive(), find_style(), find_transmution_ob(), fire_arch_from_position(), fix_generated_item(), flee_player(), generate_artifact(), generate_random_map(), get_magic(), get_npc(), get_rand_god(), get_random_mon(), get_random_recipe(), get_random_recipelist(), get_randomized_dir(), god_info_msg(), handle_spell_confusion(), hit_player(), keyplace(), kill_player_not_permadeath(), knowledge_alchemy_can_use_item(), knowledge_alchemy_detail(), knowledge_alchemy_summary(), layoutgen(), lock_and_hide_doors(), loot_object(), magic_from_difficulty(), make_doors(), make_formula_book(), make_snake_layout(), make_square_spiral_layout(), map_gen_onion(), map_gen_spiral(), monster_can_detect_enemy(), monster_can_hit(), monster_choose_random_spell(), monster_circ1_move(), monster_circ2_move(), monster_compute_path(), monster_do_living(), monster_move(), monster_move_randomly(), monster_rand_move(), msgfile_msg(), new_text_name(), object_copy(), object_find_free_spot(), object_find_multi_free_spot_around(), object_find_multi_free_spot_within_radius(), object_free2(), permute(), pets_move(), pets_summon_object(), pick_random_object(), place_chest(), place_exits(), place_fountain_with_specials(), place_monsters(), place_special_exit(), place_specials_in_map(), place_treasure(), play_sound_map(), play_sound_player_only(), pop_wall_point(), put_decor(), random_roll(), random_roll64(), resurrect_player(), rndm(), roguelike_layout_gen(), roguelike_link_rooms(), roguelike_make_rooms(), roguelike_place_room(), roll_stat(), roomify_layout(), save_throw_object(), set_abs_magic(), set_ring_bonus(), spellpath_msg(), START_TEST(), swap_random_stats(), tailor_readable_ob(), and teleport().

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

Definition at line 451 of file define.h.

#define SIZEOFFREE   49
#define SIZEOFFREE1   8
#define SIZEOFFREE2   24

Definition at line 153 of file define.h.

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

#define SMOOTH_FACE_NAME   "default_smoothed.111"

Definition at line 593 of file define.h.

Referenced by read_bmap_names().

#define SRANDOM (   seed)    cf_srandom(seed)

Definition at line 680 of file define.h.

Referenced by generate_random_map(), init(), and test_layout().

#define VERY_BIG_BUF   1024

Definition at line 36 of file define.h.

Referenced by account_char_load(), accounts_load(), command_rename_item(), and examine().

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

Definition at line 482 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 686 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.

Enumeration Type Documentation

Fatal variables; used as arguments to fatal().

Enumerator
OUT_OF_MEMORY 
MAP_ERROR 
ARCHTABLE_TOO_SMALL 
ARCHETYPE_ISSUE 
SEE_LAST_ERROR 

Definition at line 47 of file define.h.

Function Documentation

uint32_t cf_random ( void  )

Definition at line 6 of file cf_random.c.

void cf_srandom ( unsigned long  seed)

Definition at line 16 of file cf_random.c.