File src/pickup.c


Included Files


Preprocessor definitions

#define FOLLOW( curr, flags )

#define DELTA_CWT( cont, obj )

#define GOLD_WT( n )

#define GOLD_CAPACITY( w, n )

#define Icebox


Global Variable filter

boolean (*filter)(struct obj*)
Visible in:  src/pickup.c

Global Variable allow

boolean (*allow)(struct obj*)
Visible in:  src/pickup.c

Local Variables

moderateloadmsg
static const char moderateloadmsg[]
Used in: lift_object()
  pickup_object()

nearloadmsg
static const char nearloadmsg[]
Used in: lift_object()
  pickup_object()

overloadmsg
static const char overloadmsg[]
Used in: lift_object()

val_for_n_or_more
static long val_for_n_or_more
Used in: n_or_more()
  pickup()

valid_menu_classes
static char valid_menu_classes[18+2]
Used in: add_valid_menu_class()
  allow_category()
  is_worn_by_type()

current_container
static struct obj* current_container
Used in: ck_bag()
  in_container()
  out_container()
  use_container()


Global Function add_valid_menu_class()

void add_valid_menu_class ( int c )
Prototyped in: include/extern.h
Called by: doddoremarm()src/do_wear.c
  doddrop()src/do.c
  ggetobj()src/invent.c
  menu_drop()src/do.c
  menu_loot()src/pickup.c
  menu_remarm()src/do_wear.c
  pickup()src/pickup.c
  query_classes()src/pickup.c
  use_container()src/pickup.c
References Variables: valid_menu_classessrc/pickup.c

Global Function allow_all()

boolean allow_all ( struct obj* obj )
Prototyped in: include/extern.h
Used in: display_cinventory()src/invent.c
  display_minventory()src/invent.c
  menu_drop()src/do.c
  menu_loot()src/pickup.c
  pickup()src/pickup.c

Global Function allow_category()

boolean allow_category ( struct obj* obj )
Prototyped in: include/extern.h
Calls: strchr()
Used in: menu_drop()src/do.c
  menu_loot()src/pickup.c
  pickup()src/pickup.c
References Variables: valid_menu_classessrc/pickup.c

Global Function collect_obj_classes()

int collect_obj_classes ( char ilets[], struct obj* otmp, boolean here, boolean incl_gold, int filter )
Prototyped in: include/extern.h
Calls: strchr()
Called by: dotypeinv()src/invent.c
  ggetobj()src/invent.c
  query_classes()src/pickup.c
References Variables: def_oc_symssrc/drawing.c

Global Function doloot()

int doloot ( void )
Prototyped in: include/extern.h
Calls: able_to_loot()src/pickup.c
  add_to_container()src/mkobj.c
  ceiling()src/engrave.c
  check_capacity()src/hack.c
  container_at()src/pickup.c
  courtmon()src/mkroom.c
  delobj()src/invent.c
  discover_object()src/o_init.c
  doname()src/objnam.c
  dropx()src/do.c
  getdir()src/cmd.c
  hold_another_object()src/invent.c
  losehp()src/hack.c
  makemon()src/makemon.c
  mkgoldobj()src/invent.c
  mon_beside()src/pickup.c
  mon_nam()src/do_name.c
  obj_extract_self()src/mkobj.c
  the()src/objnam.c
  use_container()src/pickup.c
  x_monnam()src/do_name.c
  xname()src/objnam.c
  You(), You_cant(), pline(), rnd(), sprintf(), update_mon_intrinsics(), verbalize(), which_armor()
Used in:  src/cmd.c
References Variables: c_common_stringssrc/decl.c
  levelsrc/decl.c
  multisrc/decl.c
  usrc/decl.c
  ynqcharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function encumber_msg()

int encumber_msg ( void )
Prototyped in: include/extern.h
Calls: near_capacity()src/hack.c
  You(), Your()
Called by: adjattrib()src/attrib.c
  exercise()src/attrib.c
  heal_legs()src/do.c
  moveloop()src/allmain.c
  poisoned()src/mon.c
  redist_attr()src/attrib.c
  restore_attrib()src/attrib.c
  set_wounded_legs()src/do.c
  thitmonst()src/dothrow.c
  throwit()src/dothrow.c
  wiz_wish()src/cmd.c
References Variables: flagssrc/decl.c

Global Function is_worn_by_type()

boolean is_worn_by_type ( struct obj* otmp )
Prototyped in: include/extern.h
Calls: strchr()
Used in: menu_remarm()src/do_wear.c
References Variables: valid_menu_classessrc/pickup.c

Global Function pick_obj()

struct obj* pick_obj ( struct obj* otmp )
Prototyped in: include/extern.h
Calls: addinv()src/invent.c
  newsym()src/display.c
  obj_extract_self()src/mkobj.c
  addtobill(), costly_spot()
Called by: pickup_object()src/pickup.c
References Variables: monssrc/monst.c
  usrc/decl.c
  uballsrc/decl.c
  youmonstsrc/decl.c

Global Function pickup()

int pickup ( int what )
Prototyped in: include/extern.h
Calls: add_valid_menu_class()src/pickup.c
  autopick()src/pickup.c
  can_reach_floor()src/engrave.c
  check_here()src/pickup.c
  doname()src/objnam.c
  is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  newsym()src/display.c
  nomul()src/hack.c
  pickup_object()src/pickup.c
  query_classes()src/pickup.c
  query_objlist()src/pickup.c
  read_engr_at()src/engrave.c
  There(), You(), free(), sprintf(), strchr()
Called by: digactualhole()src/dig.c
  dopickup()src/hack.c
  goto_level()src/do.c
  spoteffects()src/hack.c
References Functions: all_but_uchain()src/pickup.c
  allow_all()src/pickup.c
  allow_category()src/pickup.c
  n_or_more()src/pickup.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  multisrc/decl.c
  usrc/decl.c
  val_for_n_or_moresrc/pickup.c
  ynNaqcharssrc/decl.c
  yn_numbersrc/decl.c
  ynaqcharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function pickup_object()

int pickup_object ( struct obj* obj, long count, boolean telekinesis )
Prototyped in: include/extern.h
Calls: an()src/objnam.c
  delobj()src/invent.c
  docall()src/do_name.c
  exercise()src/attrib.c
  lift_object()src/pickup.c
  max_capacity()src/hack.c
  near_capacity()src/hack.c
  nomul()src/hack.c
  pick_obj()src/pickup.c
  poly_when_stoned()src/mondata.c
  prinv()src/invent.c
  revive_corpse()src/do.c
  splitobj()src/mkobj.c
  touch_artifact()src/artifact.c
  useupf()src/invent.c
  You(), costly_gold(), impossible(), instapetrify(), pline(), pline_The(), polymon(), sprintf()
Called by: pickup()src/pickup.c
  use_grapple()src/apply.c
  use_whip()src/apply.c
References Variables: WIN_MESSAGEsrc/decl.c
  flagssrc/decl.c
  moderateloadmsgsrc/pickup.c
  monssrc/monst.c
  mrg_to_wieldedsrc/decl.c
  nearloadmsgsrc/pickup.c
  objectssrc/objects.c
  usrc/decl.c
  uarmgsrc/decl.c
  ublindfsrc/decl.c
  uchainsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function query_category()

int query_category ( const char* qstr, struct obj* olist, int qflags, menu_item** pick_list, int how )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  count_categories()src/pickup.c
  count_unpaid()src/invent.c
  let_to_name()src/invent.c
  impossible()
Called by: dotypeinv()src/invent.c
  menu_drop()src/do.c
  menu_loot()src/pickup.c
  menu_remarm()src/do_wear.c
References Variables: def_oc_symssrc/drawing.c
  flagssrc/decl.c
  objectssrc/objects.c
  windowprocs

Global Function query_objlist()

int query_objlist ( const char* qstr, struct obj* olist, int qflags, menu_item** pick_list, int how, int allow )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  dmgtype()src/mondata.c
  doname()src/objnam.c
  let_to_name()src/invent.c
  rn2()
Called by: display_binventory()src/invent.c
  display_cinventory()src/invent.c
  display_minventory()src/invent.c
  dotypeinv()src/invent.c
  menu_drop()src/do.c
  menu_identify()src/invent.c
  menu_loot()src/pickup.c
  menu_remarm()src/do_wear.c
  pickup()src/pickup.c
References Variables: def_oc_symssrc/drawing.c
  flagssrc/decl.c
  objectssrc/objects.c
  otg_tempsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function use_container()

int use_container ( struct obj* obj, int held )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  The()src/objnam.c
  Yname2()src/objnam.c
  add_to_container()src/mkobj.c
  add_valid_menu_class()src/pickup.c
  aobjnam()src/objnam.c
  assigninvlet()src/invent.c
  christen_monst()src/do_name.c
  container_contents()src/end.c
  dealloc_obj()src/mkobj.c
  dmgtype()src/mondata.c
  doname()src/objnam.c
  in_or_out_menu()src/pickup.c
  makemon()src/makemon.c
  menu_loot()src/pickup.c
  mk_named_object()src/mkobj.c
  mkgoldobj()src/invent.c
  nomul()src/hack.c
  obj_extract_self()src/mkobj.c
  query_classes()src/pickup.c
  rndmonnam()src/do_name.c
  set_malign()src/makemon.c
  the()src/objnam.c
  weight()src/mkobj.c
  xname()src/objnam.c
  yname()src/objnam.c
  You(), askchain(), body_part(), chest_trap(), costly_spot(), obfree(), pline(), pline_The(), rn2(), shop_keeper(), sprintf(), stolen_value()
Called by: doapply()src/apply.c
  doloot()src/pickup.c
References Functions: ck_bag()src/pickup.c
  in_container()src/pickup.c
  out_container()src/pickup.c
References Variables: c_common_stringssrc/decl.c
  current_containersrc/pickup.c
  flagssrc/decl.c
  inventsrc/decl.c
  monssrc/monst.c
  multisrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  ynqcharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Local Function able_to_loot()

static boolean able_to_loot ( int x, int y )
Prototyped in: src/pickup.c
Calls: can_reach_floor()src/engrave.c
  is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  mon_nam()src/do_name.c
  surface()src/engrave.c
  You(), pline()
Called by: doloot()src/pickup.c
References Variables: usrc/decl.c
  youmonstsrc/decl.c

Local Function all_but_uchain()

static boolean all_but_uchain ( struct obj* obj )
Prototyped in: src/pickup.c
Used in: pickup()src/pickup.c
References Variables: uchainsrc/decl.c

Local Function autopick()

static int autopick ( struct obj* olist, int follow, menu_item** pick_list )
Prototyped in: src/pickup.c
Calls: alloc()src/alloc.c
  strchr()
Called by: pickup()src/pickup.c
References Variables: flagssrc/decl.c

Local Function carry_count()

static long carry_count ( struct obj* obj, struct obj* container, long count, boolean telekinesis, int* wt_before, int* wt_after )
Prototyped in: src/pickup.c
Calls: doname()src/objnam.c
  max_capacity()src/hack.c
  the()src/objnam.c
  weight()src/mkobj.c
  xname()src/objnam.c
  There(), You(), sprintf(), strcpy()
Called by: lift_object()src/pickup.c
References Variables: inventsrc/decl.c
  usrc/decl.c

Local Function check_here()

static void check_here ( boolean picked_some )
Prototyped in: src/pickup.c
Calls: flush_screen()src/display.c
  look_here()src/invent.c
  nomul()src/hack.c
  read_engr_at()src/engrave.c
Called by: pickup()src/pickup.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  uchainsrc/decl.c

Local Function ck_bag()

static int ck_bag ( struct obj* obj )
Prototyped in: src/pickup.c
Used in: use_container()src/pickup.c
References Variables: current_containersrc/pickup.c

Local Function container_at()

static int container_at ( int x, int y, boolean countem )
Prototyped in: src/pickup.c
Called by: doloot()src/pickup.c
References Variables: levelsrc/decl.c

Local Function count_categories()

static int count_categories ( struct obj* olist, int qflags )
Prototyped in: src/pickup.c
Called by: query_category()src/pickup.c
References Variables: flagssrc/decl.c

Local Function in_container()

static int in_container ( struct obj* obj )
Prototyped in: src/pickup.c
Calls: The()src/objnam.c
  add_to_container()src/mkobj.c
  bot()src/botl.c
  dealloc_obj()src/mkobj.c
  doname()src/objnam.c
  freeinv()src/invent.c
  losehp()src/hack.c
  mbag_explodes()src/pickup.c
  obj_here()src/invent.c
  obj_is_burning()src/light.c
  panic()src/end.c
  snuff_lit()src/apply.c
  the()src/objnam.c
  useup()src/invent.c
  useupf()src/invent.c
  weight()src/mkobj.c
  xname()src/objnam.c
  Norep(), You(), costly_spot(), d(), delete_contents(), impossible(), pline(), pline_The(), sellobj(), sellobj_state(), setuqwep(), setuswapwep(), setuwep(), shop_keeper(), stolen_value(), stop_timer(), strcpy(), welded(), weldmsg()
Called by: menu_loot()src/pickup.c
Used in: use_container()src/pickup.c
References Variables: c_common_stringssrc/decl.c
  current_containersrc/pickup.c
  monssrc/monst.c
  monstermovessrc/decl.c
  usrc/decl.c
  uballsrc/decl.c
  uchainsrc/decl.c
  uquiversrc/decl.c
  uswapwepsrc/decl.c
  uwepsrc/decl.c

Local Function in_or_out_menu()

static int in_or_out_menu ( const char* prompt, struct obj* obj )
Prototyped in: src/pickup.c
Calls: the()src/objnam.c
  xname()src/objnam.c
  free(), sprintf()
Called by: use_container()src/pickup.c
References Variables: c_common_stringssrc/decl.c
  windowprocs

Local Function lift_object()

static int lift_object ( struct obj* obj, struct obj* container, long* cnt_p, boolean telekinesis )
Prototyped in: src/pickup.c
Calls: calc_capacity()src/hack.c
  carry_count()src/pickup.c
  doname()src/objnam.c
  inv_cnt()src/hack.c
  merge_choice()src/invent.c
  near_capacity()src/hack.c
  xname()src/objnam.c
  You(), Your(), body_part(), sprintf()
Called by: out_container()src/pickup.c
  pickup_object()src/pickup.c
References Variables: dungeon_topologysrc/decl.c
  flagssrc/decl.c
  inventsrc/decl.c
  moderateloadmsgsrc/pickup.c
  nearloadmsgsrc/pickup.c
  overloadmsgsrc/pickup.c
  usrc/decl.c
  ynqcharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Local Function mbag_explodes()

static boolean mbag_explodes ( struct obj* obj, int depthin )
Prototyped in: src/pickup.c
Calls: mbag_explodes()src/pickup.c
  rn2()
Called by: in_container()src/pickup.c
  mbag_explodes()src/pickup.c

Local Function menu_loot()

static int menu_loot ( int retry, struct obj* container, boolean put_in )
Prototyped in: src/pickup.c
Calls: add_valid_menu_class()src/pickup.c
  in_container()src/pickup.c
  out_container()src/pickup.c
  query_category()src/pickup.c
  query_objlist()src/pickup.c
  splitobj()src/mkobj.c
  free(), setuqwep(), setuswapwep(), setuwep(), sprintf()
Called by: use_container()src/pickup.c
References Functions: allow_all()src/pickup.c
  allow_category()src/pickup.c
References Variables: flagssrc/decl.c
  inventsrc/decl.c
  uquiversrc/decl.c
  uswapwepsrc/decl.c
  uwepsrc/decl.c

Local Function mon_beside()

static boolean mon_beside ( int x, int y )
Prototyped in: src/pickup.c
Calls: isok()src/cmd.c
Called by: doloot()src/pickup.c
References Variables: levelsrc/decl.c

Local Function n_or_more()

static boolean n_or_more ( struct obj* obj )
Prototyped in: src/pickup.c
Used in: pickup()src/pickup.c
References Variables: uchainsrc/decl.c
  val_for_n_or_moresrc/pickup.c

Local Function out_container()

static int out_container ( struct obj* obj )
Prototyped in: src/pickup.c
Calls: addinv()src/invent.c
  bot()src/botl.c
  dealloc_obj()src/mkobj.c
  lift_object()src/pickup.c
  near_capacity()src/hack.c
  obj_extract_self()src/mkobj.c
  prinv()src/invent.c
  splitobj()src/mkobj.c
  start_corpse_timeout()src/mkobj.c
  touch_artifact()src/artifact.c
  weight()src/mkobj.c
  addtobill(), costly_spot(), impossible(), shop_keeper(), verbalize()
Called by: menu_loot()src/pickup.c
Used in: use_container()src/pickup.c
References Variables: current_containersrc/pickup.c
  monstermovessrc/decl.c
  objectssrc/objects.c
  usrc/decl.c
  youmonstsrc/decl.c

Local Function query_classes()

static boolean query_classes ( char oclasses[], boolean* one_at_a_time, boolean* everything, const char* action, struct obj* objs, boolean here, boolean incl_gold, int* menu_on_demand )
Prototyped in: src/pickup.c
Calls: add_valid_menu_class()src/pickup.c
  collect_obj_classes()src/pickup.c
  def_char_to_objclass()src/drawing.c
  display_inventory()src/invent.c
  simple_look()src/pickup.c
  There(), You(), sprintf(), strchr(), strcmp()
Called by: pickup()src/pickup.c
  use_container()src/pickup.c
References Variables: inventsrc/decl.c
  windowprocs

Local Function simple_look()

static void simple_look ( struct obj* otmp, boolean here )
Prototyped in: src/pickup.c
Calls: doname()src/objnam.c
  impossible(), pline()
Called by: query_classes()src/pickup.c
References Variables: windowprocs