Defines | Functions | Variables

do_wear.c File Reference

#include "hack.h"
Include dependency graph for do_wear.c:

Defines

#define MOREARM(x)   if (x) { armorpieces++; otmp = x; }
#define MOREACC(x)   if (x) { Accessories++; otmp = x; }
#define DESTROY_ARM(o)

Functions

STATIC_DCL void FDECL (on_msg,(struct obj *))
STATIC_PTR int NDECL (Armor_on)
STATIC_PTR int NDECL (Boots_on)
STATIC_DCL int NDECL (Cloak_on)
STATIC_PTR int NDECL (Helmet_on)
STATIC_PTR int NDECL (Gloves_on)
STATIC_PTR int NDECL (Shield_on)
STATIC_DCL void NDECL (Amulet_on)
STATIC_DCL void FDECL (Ring_off_or_gone,(struct obj *, BOOLEAN_P))
STATIC_PTR int FDECL (select_off,(struct obj *))
STATIC_DCL struct objNDECL (do_takeoff)
STATIC_PTR int NDECL (take_off)
STATIC_DCL int FDECL (menu_remarm,(int))
STATIC_DCL void FDECL (already_wearing,(const char *))
STATIC_DCL void FDECL (already_wearing2,(const char *, const char *))
void off_msg (struct obj *otmp)
STATIC_OVL void on_msg (struct obj *otmp)
STATIC_PTR int Boots_on ()
int Boots_off ()
STATIC_OVL int Cloak_on ()
int Cloak_off ()
STATIC_PTR int Helmet_on ()
int Helmet_off ()
STATIC_PTR int Gloves_on ()
int Gloves_off ()
STATIC_OVL int Shield_on ()
int Shield_off ()
STATIC_PTR int Armor_on ()
int Armor_off ()
int Armor_gone ()
STATIC_OVL void Amulet_on ()
void Amulet_off ()
void Ring_on (struct obj *obj)
STATIC_OVL void Ring_off_or_gone (struct obj *obj, boolean gone)
void Ring_off (struct obj *obj)
void Ring_gone (struct obj *obj)
void Blindf_on (struct obj *otmp)
void Blindf_off (struct obj *otmp)
void set_wear ()
boolean donning (struct obj *otmp)
void cancel_don ()
int dotakeoff ()
int doremring ()
int cursed (struct obj *otmp)
int armoroff (struct obj *otmp)
STATIC_OVL void already_wearing (char *cc) const
STATIC_OVL void already_wearing2 (char *cc1, char *cc2) const
int canwearobj (struct obj *otmp, long *mask, boolean noisy)
int dowear ()
int doputon ()
void find_ac ()
void glibr ()
struct objsome_armor (struct monst *victim)
void erode_armor (struct monst *victim, boolean acid_dmg)
struct objstuck_ring (struct obj *ring, int otyp)
struct objunchanger ()
STATIC_PTR int select_off (struct obj *otmp)
STATIC_OVL struct objdo_takeoff ()
STATIC_PTR int take_off ()
void reset_remarm ()
int doddoremarm ()
STATIC_OVL int menu_remarm (int retry)
int destroy_arm (struct obj *atmp)
void adj_abon (struct obj *otmp, schar delta)

Variables

STATIC_OVL NEARDATA long takeoff_mask = 0L
static NEARDATA long taking_off = 0L
static NEARDATA int todelay
static boolean cancelled_don = FALSE
static NEARDATA const char see_yourself [] = "see yourself"
static NEARDATA const char unknown_type [] = "Unknown type of %s (%d)"
static NEARDATA const char c_armor [] = "armor"
static NEARDATA const char c_suit [] = "suit"
static NEARDATA const char c_cloak [] = "cloak"
static NEARDATA const char c_gloves [] = "gloves"
static NEARDATA const char c_boots [] = "boots"
static NEARDATA const char c_helmet [] = "helmet"
static NEARDATA const char c_shield [] = "shield"
static NEARDATA const char c_weapon [] = "weapon"
static NEARDATA const char c_sword [] = "sword"
static NEARDATA const char c_axe [] = "axe"
static NEARDATA const char c_that_ [] = "that"
static NEARDATA const long takeoff_order []
static NEARDATA const char clothes [] = {ARMOR_CLASS, 0}
static NEARDATA const char accessories [] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, 0}
static const char * disrobing = ""

Define Documentation

#define DESTROY_ARM (   o )
Value:
((otmp = (o)) != 0 && \
                        (!atmp || atmp == otmp) && \
                        (!obj_resists(otmp, 0, 90)))

Referenced by destroy_arm().

#define MOREACC (   x )    if (x) { Accessories++; otmp = x; }

Referenced by doremring().

#define MOREARM (   x )    if (x) { armorpieces++; otmp = x; }

Referenced by dotakeoff().


Function Documentation

void adj_abon ( struct obj otmp,
schar  delta 
)

References A_DEX, A_INT, A_WIS, ABON, flag::botl, flags, GAUNTLETS_OF_DEXTERITY, HELM_OF_BRILLIANCE, makeknown, obj::otyp, uarmg, and uarmh.

Referenced by Gloves_off(), Gloves_on(), Helmet_off(), Helmet_on(), and seffects().

Here is the caller graph for this function:

STATIC_OVL void already_wearing ( char *  cc ) const

References c_that_.

Referenced by canwearobj(), and doputon().

Here is the caller graph for this function:

STATIC_OVL void already_wearing2 ( char *  cc1,
char *  cc2 
) const

Referenced by doputon().

Here is the caller graph for this function:

void Amulet_off (  )
STATIC_OVL void Amulet_on (  )
int Armor_gone (  )

References cancelled_don, end_burn(), FALSE, Is_gold_dragon_armor, obj::otyp, setnotworn(), takeoff_mask, uarm, and W_ARM.

Referenced by break_armor(), destroy_arm(), lava_effects(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

int Armor_off (  )

References Blind, cancelled_don, end_burn(), FALSE, Is_gold_dragon_armor, obj::otyp, pline(), setworn(), takeoff_mask, Tobjnam(), uarm, and W_ARM.

Referenced by armoroff(), do_takeoff(), donning(), and remove_worn_item().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR int Armor_on (  )

References begin_burn(), Blind, FALSE, Is_gold_dragon_armor, obj::otyp, pline(), Tobjnam(), and uarm.

Referenced by cancel_don(), donning(), dowear(), and set_wear().

Here is the call graph for this function:

Here is the caller graph for this function:

int armoroff ( struct obj otmp )

References Armor_off(), Boots_off(), Cloak_off(), cursed(), delay, Gloves_off(), Helmet_off(), is_boots, is_cloak, is_gloves, is_helmet, is_shield, nomovemsg, nomul(), objects, objclass::oc_delay, off_msg(), setworn(), Shield_off(), takeoff_mask, taking_off, and W_ARMOR.

Referenced by dotakeoff().

Here is the call graph for this function:

Here is the caller graph for this function:

void Blindf_off ( struct obj otmp )

References Blind, Blind_telepat, flag::botl, CONDUCT_BLINDFOLDED, FALSE, flags, Infravision, LENSES, off_msg(), Punished, see_monsters(), set_bc(), setworn(), takeoff_mask, TRUE, violated(), vision_full_recalc, and W_TOOL.

Referenced by do_takeoff(), doapply(), doremring(), lava_effects(), remove_worn_item(), and use_towel().

Here is the call graph for this function:

Here is the caller graph for this function:

void Blindf_on ( struct obj otmp )

References Blind, Blind_telepat, flag::botl, FALSE, flags, Infravision, on_msg(), Punished, see_monsters(), set_bc(), setuqwep(), setuswapwep(), setuwep(), setworn(), TRUE, uquiver, uswapwep, uwep, flag::verbose, vision_full_recalc, and W_TOOL.

Referenced by doapply(), and doputon().

Here is the call graph for this function:

Here is the caller graph for this function:

int Boots_off (  )
STATIC_PTR int Boots_on (  )
void cancel_don (  )

References Armor_on(), Boots_on(), cancelled_don, Gloves_on(), Helmet_on(), multi, nomovemsg, taking_off, and todelay.

Referenced by break_armor(), destroy_arm(), and remove_worn_item().

Here is the call graph for this function:

Here is the caller graph for this function:

int canwearobj ( struct obj otmp,
long *  mask,
boolean  noisy 
)
int Cloak_off (  )
STATIC_OVL int Cloak_on (  )
int cursed ( struct obj otmp )

References is_boots, is_gloves, TRUE, uwep, and welded().

Referenced by armoroff(), do_takeoff(), doapply(), and select_off().

Here is the call graph for this function:

Here is the caller graph for this function:

int destroy_arm ( struct obj atmp )
STATIC_OVL struct obj* do_takeoff (  ) [read]
int doddoremarm (  )
boolean donning ( struct obj otmp )
int doputon (  )
int doremring (  )
int dotakeoff (  )
int dowear (  )
void erode_armor ( struct monst victim,
boolean  acid_dmg 
)

References carried, erode_obj(), FALSE, some_armor(), uarmf, and update_inventory.

Referenced by mdamagem(), passive(), passiveum(), zhitm(), and zhitu().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void FDECL ( on_msg  ,
(struct obj *)   
)
STATIC_DCL void FDECL ( Ring_off_or_gone  ,
(struct obj *, BOOLEAN_P)   
)
STATIC_PTR int FDECL ( select_off  ,
(struct obj *)   
)
STATIC_DCL void FDECL ( already_wearing2  ,
(const char *, const char *)   
)
STATIC_DCL void FDECL ( already_wearing  ,
(const char *)   
)
STATIC_DCL int FDECL ( menu_remarm  ,
(int)   
)
void find_ac (  )
void glibr (  )

References bimanual, body_part(), c_sword, monst::data, dropx(), FINGER, HAND, is_sword, LOADSTONE, makeplural(), makesingular(), nolimbs, obj::oclass, oclass_names, otmp, obj::otyp, Ring_off(), setuswapwep(), setuwep(), you::twoweap, u, uarmg, uleft, uright, uswapwep, uwep, welded(), and youmonst.

Referenced by moveloop().

Here is the call graph for this function:

Here is the caller graph for this function:

int Gloves_off (  )
STATIC_PTR int Gloves_on (  )
int Helmet_off (  )
STATIC_PTR int Helmet_on (  )
STATIC_OVL int menu_remarm ( int  retry )
STATIC_DCL void NDECL ( Amulet_on   )
STATIC_DCL int NDECL ( Cloak_on   )
STATIC_PTR int NDECL ( Armor_on   )
STATIC_PTR int NDECL ( Helmet_on   )
STATIC_DCL struct obj* NDECL ( do_takeoff   ) [read]
STATIC_PTR int NDECL ( Gloves_on   )
STATIC_PTR int NDECL ( take_off   )
STATIC_PTR int NDECL ( Shield_on   )
STATIC_PTR int NDECL ( Boots_on   )
void off_msg ( struct obj otmp )

References doname(), flags, and flag::verbose.

Referenced by armoroff(), Blindf_off(), doremring(), and take_off().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void on_msg ( struct obj otmp )

References an(), body_part(), BUFSZ, flags, HEAD, obj_is_pname(), Sprintf, the(), TOWEL, flag::verbose, and xname().

Referenced by Blindf_on(), and dowear().

Here is the call graph for this function:

Here is the caller graph for this function:

void reset_remarm (  )

References nul, takeoff_mask, and taking_off.

Referenced by curse(), doremring(), dotakeoff(), dowield(), and reset_occupations().

Here is the caller graph for this function:

void Ring_gone ( struct obj obj )

References Ring_off_or_gone(), and TRUE.

Referenced by destroy_item(), eataccessory(), lava_effects(), recharge(), and remove_worn_item().

Here is the call graph for this function:

Here is the caller graph for this function:

void Ring_off ( struct obj obj )

References FALSE, and Ring_off_or_gone().

Referenced by do_takeoff(), doremring(), glibr(), and recharge().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void Ring_off_or_gone ( struct obj obj,
boolean  gone 
)
void Ring_on ( struct obj obj )
STATIC_PTR int select_off ( struct obj otmp )
void set_wear (  )

References Armor_on(), Boots_on(), Cloak_on(), Gloves_on(), Helmet_on(), Shield_on(), uarm, uarmc, uarmf, uarmg, uarmh, and uarms.

Here is the call graph for this function:

int Shield_off (  )

References setworn(), takeoff_mask, and W_ARMS.

Referenced by armoroff(), break_armor(), destroy_arm(), do_takeoff(), donning(), lava_effects(), remove_worn_item(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int Shield_on (  )

Referenced by donning(), dowear(), and set_wear().

Here is the caller graph for this function:

struct obj* some_armor ( struct monst victim ) [read]

References otmp, rn2(), uarm, uarmc, uarmf, uarmg, uarmh, uarms, W_ARM, W_ARMC, W_ARMF, W_ARMG, W_ARMH, W_ARMS, which_armor(), and youmonst.

Referenced by cast_wizard_spell(), erode_armor(), hitmu(), and seffects().

Here is the call graph for this function:

Here is the caller graph for this function:

struct obj* stuck_ring ( struct obj ring,
int  otyp 
) [read]

References AMULET_OF_UNCHANGING, bimanual, monst::data, nolimbs, obj::otyp, uamul, uarmg, uleft, uright, uwep, welded(), and youmonst.

Referenced by fix_worst_trouble(), and in_trouble().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_PTR int take_off (  )
struct obj* unchanger (  ) [read]

References AMULET_OF_UNCHANGING, obj::otyp, and uamul.

Referenced by fix_worst_trouble(), and in_trouble().

Here is the caller graph for this function:


Variable Documentation

NEARDATA const char accessories[] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, 0} [static]
NEARDATA const char c_armor[] = "armor" [static]

Referenced by canwearobj().

NEARDATA const char c_axe[] = "axe"

Referenced by canwearobj(), and select_off().

NEARDATA const char c_boots[] = "boots"

Referenced by Boots_off(), Boots_on(), and canwearobj().

NEARDATA const char c_cloak[] = "cloak"

Referenced by canwearobj(), Cloak_off(), and Cloak_on().

NEARDATA const char c_gloves[] = "gloves"
NEARDATA const char c_helmet[] = "helmet"

Referenced by canwearobj(), Helmet_off(), and Helmet_on().

NEARDATA const char c_shield[] = "shield"

Referenced by canwearobj().

NEARDATA const char c_suit[] = "suit"

Referenced by canwearobj(), and select_off().

NEARDATA const char c_sword[] = "sword"

Referenced by canwearobj(), glibr(), and select_off().

NEARDATA const char c_that_[] = "that"
NEARDATA const char c_weapon[] = "weapon"

Referenced by canwearobj(), and select_off().

boolean cancelled_don = FALSE [static]
NEARDATA const char clothes[] = {ARMOR_CLASS, 0} [static]
const char* disrobing = "" [static]
NEARDATA const char see_yourself[] = "see yourself" [static]

Referenced by Cloak_off(), and Cloak_on().

STATIC_OVL NEARDATA long takeoff_mask = 0L
NEARDATA const long takeoff_order[] [static]
NEARDATA long taking_off = 0L [static]
NEARDATA int todelay [static]

Referenced by cancel_don(), and take_off().

NEARDATA const char unknown_type[] = "Unknown type of %s (%d)" [static]