File src/timeout.c

References Functions: burn_object()src/timeout.c
  fig_transform()src/apply.c
  hatch_egg()src/timeout.c
  revive_mon()src/do.c
  rot_corpse()src/dig.c
  rot_organic()src/dig.c

Included Files


Preprocessor definitions

#define VERBOSE_TIMER

#define TTAB( a, b )


Typedef timer_element

typedef struct fe timer_element
struct fe 
   { 
     struct fe* next; 
     long timeout; 
     unsigned long tid; 
     short kind; 
     short func_index; 
     genericptr_t arg; 
     unsigned needs_fixup:1; 
   } 

Typedef ttable

typedef struct {...} ttable
struct 
   { 
     timeout_proc f; 
     const char* name; 
   } 

Local Variables

stoned_texts
static const char* stoned_texts[]
Used in: stoned_dialogue()

vomiting_texts
static const char* vomiting_texts[]
Used in: vomiting_dialogue()

choke_texts
static const char* choke_texts[]
Used in: choke_dialogue()

choke_texts2
static const char* choke_texts2[]
Used in: choke_dialogue()

slime_texts
static const char* slime_texts[]
Used in: slime_dialogue()

timer_base
static timer_element* timer_base
Used in: insert_timer()
  maybe_write_timer()
  obj_move_timers()
  obj_split_timers()
  obj_stop_timers()
  relink_timers()
  run_timers()
  save_timers()
  stop_timer()
  timer_sanity_check()
  wiz_timeout_queue()

timer_id
static unsigned long timer_id
Used in: restore_timers()
  save_timers()
  start_timer()

timeout_funcs
static ttable timeout_funcs[6]
Used in: print_queue()
  run_timers()


Global Function attach_egg_hatch_timeout()

void attach_egg_hatch_timeout ( struct obj* egg )
Prototyped in: include/extern.h
Calls: rnd()src/rnd.c
  start_timer()src/timeout.c
  stop_timer()src/timeout.c
Called by: create_object()src/sp_lev.c
  dosit()src/sit.c
  hatch_egg()src/timeout.c
  mksobj()src/mkobj.c
  readobjnam()src/objnam.c

Global Function attach_fig_transform_timeout()

void attach_fig_transform_timeout ( struct obj* figurine )
Prototyped in: include/extern.h
Calls: rnd()src/rnd.c
  start_timer()src/timeout.c
  stop_timer()src/timeout.c
Called by: carry_obj_effects()src/invent.c
  curse()src/mkobj.c

Global Function begin_burn()

void begin_burn ( struct obj* obj, boolean already_lit )
Prototyped in: include/extern.h
Calls: candle_light_range()src/light.c
  impossible()src/pline.c
  new_light_source()src/light.c
  start_timer()src/timeout.c
  xname()src/objnam.c
  get_obj_location()
Called by: burn_object()src/timeout.c
  dorub()src/apply.c
  light_cocktail()src/apply.c
  readobjnam()src/objnam.c
  use_candelabrum()src/apply.c
  use_lamp()src/apply.c
References Variables: windowprocs

Global Function burn_away_slime()

void burn_away_slime ( void )
Prototyped in: include/extern.h
Calls: pline_The()src/pline.c
Called by: boulder_hits_pool()src/do.c
  castmu()src/mcastu.c
  dosit()src/sit.c
  explmu()src/mhitu.c
  explode()src/explode.c
  gazemu()src/mhitu.c
  gulpmu()src/mhitu.c
  hitmu()src/mhitu.c
  seffects()src/read.c
References Variables: usrc/decl.c

Global Function burn_object()

void burn_object ( genericptr_t arg, long timeout )
Prototyped in: include/extern.h
Calls: Shk_Your()src/shk.c
  You()src/pline.c
  an()src/objnam.c
  begin_burn()src/timeout.c
  dmgtype()src/mondata.c
  end_burn()src/timeout.c
  impossible()src/pline.c
  lantern_message()src/timeout.c
  newsym()src/display.c
  obfree()src/shk.c
  obj_extract_self()src/mkobj.c
  pline()src/pline.c
  see_lamp_flicker()src/timeout.c
  xname()src/objnam.c
  get_obj_location()
Used in:  src/timeout.c
References Variables: monstermovessrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Global Function do_storms()

void do_storms ( void )
Prototyped in: include/extern.h
Calls: You_hear()src/pline.c
  nomul()src/hack.c
  on_level()src/dungeon.c
  pline()src/pline.c
  rn2()src/rnd.c
  rnd()src/rnd.c
  stop_occupation()src/allmain.c
  buzz()
Called by: moveloop()src/allmain.c
References Variables: dungeon_topologysrc/decl.c
  levelsrc/decl.c
  usrc/decl.c

Global Function end_burn()

void end_burn ( struct obj* obj, boolean timer_attached )
Prototyped in: include/extern.h
Calls: del_light_source()src/light.c
  impossible()src/pline.c
  stop_timer()src/timeout.c
  xname()src/objnam.c
Called by: burn_object()src/timeout.c
  bury_an_obj()src/dig.c
  drop_upon_death()src/bones.c
  light_cocktail()src/apply.c
  monstone()src/mon.c
  obj_merge_light_sources()src/light.c
  recharge()src/read.c
  resetobjs()src/bones.c
  snuff_candle()src/apply.c
  snuff_light_source()src/light.c
  snuff_lit()src/apply.c
  use_candelabrum()src/apply.c
  use_candle()src/apply.c
  use_lamp()src/apply.c
References Variables: monstermovessrc/decl.c
  windowprocs

Global Function fall_asleep()

void fall_asleep ( int how_long, boolean wakeup_msg )
Prototyped in: include/extern.h
Calls: nomul()src/hack.c
  stop_occupation()src/allmain.c
Called by: domove()src/hack.c
  hitmu()src/mhitu.c
  moveloop()src/allmain.c
  nh_timeout()src/timeout.c
  peffects()src/potion.c
References Variables: c_common_stringssrc/decl.c
  monstermovessrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c

Global Function hatch_egg()

void hatch_egg ( genericptr_t arg, long timeout )
Prototyped in: include/extern.h
Calls: You()src/pline.c
  You_feel()src/pline.c
  a_monnam()src/do_name.c
  attach_egg_hatch_timeout()src/timeout.c
  big_to_little()src/mondata.c
  enexto()src/teleport.c
  impossible()src/pline.c
  is_pool()src/dbridge.c
  learn_egg_type()src/timeout.c
  locomotion()src/mondata.c
  m_monnam()src/do_name.c
  makemon()src/makemon.c
  makeplural()src/objnam.c
  newsym()src/display.c
  obfree()src/shk.c
  obj_extract_self()src/mkobj.c
  pline()src/pline.c
  rn2()src/rnd.c
  rnd()src/rnd.c
  s_suffix()src/hacklib.c
  start_timer()src/timeout.c
  stop_timer()src/timeout.c
  tamedog()src/dog.c
  useup()src/invent.c
  verbalize()src/pline.c
  get_obj_location(), sprintf(), strcpy(), worm_known()
Used in:  src/timeout.c
References Variables: c_common_stringssrc/decl.c
  flagssrc/decl.c
  monssrc/monst.c
  monstermovessrc/decl.c
  mvitalssrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Global Function kill_egg()

void kill_egg ( struct obj* egg )
Prototyped in: include/extern.h
Calls: stop_timer()src/timeout.c
Called by: create_object()src/sp_lev.c
  kill_eggs()src/mon.c
  readobjnam()src/objnam.c

Global Function learn_egg_type()

void learn_egg_type ( int mnum )
Prototyped in: include/extern.h
Calls: little_to_big()src/mondata.c
Called by: fully_identify_obj()src/invent.c
  hatch_egg()src/timeout.c
  polymon()src/polyself.c
References Variables: mvitalssrc/decl.c
  windowprocs

Global Function nh_timeout()

void nh_timeout ( void )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  Norep()src/pline.c
  You()src/pline.c
  You_feel()src/pline.c
  carrying()src/invent.c
  choke_dialogue()src/timeout.c
  done()src/end.c
  fall_asleep()src/timeout.c
  find_ac()src/do_wear.c
  hcolor()src/do_name.c
  heal_legs()src/do.c
  inv_weight()src/hack.c
  make_blinded()src/potion.c
  make_confused()src/potion.c
  make_hallucinated()src/potion.c
  make_stunned()src/potion.c
  make_vomiting()src/potion.c
  name_to_mon()src/mondata.c
  newsym()src/display.c
  nomul()src/hack.c
  pline()src/pline.c
  rehumanize()src/polyself.c
  rnd()src/rnd.c
  run_timers()src/timeout.c
  see_monsters()src/display.c
  set_mimic_blocking()src/display.c
  slime_dialogue()src/timeout.c
  slip_or_trip()src/timeout.c
  stone_luck()src/attrib.c
  stoned_dialogue()src/timeout.c
  stop_occupation()src/allmain.c
  vomiting_dialogue()src/timeout.c
  wake_nearby()src/mon.c
  float_down(), unconscious()
Called by: moveloop()src/allmain.c
References Variables: c_color_namessrc/decl.c
  delayed_killersrc/decl.c
  flagssrc/decl.c
  killersrc/decl.c
  killer_formatsrc/decl.c
  monssrc/monst.c
  movessrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Global Function obj_is_local()

boolean obj_is_local ( struct obj* obj )
Prototyped in: include/extern.h
Calls: mon_is_local()src/timeout.c
  obj_is_local()src/timeout.c
  panic()src/end.c
Called by: maybe_write_ls()src/light.c
  obj_is_local()src/timeout.c
  save_light_sources()src/light.c
  timer_is_local()src/timeout.c

Global Function obj_move_timers()

void obj_move_timers ( struct obj* src, struct obj* dest )
Prototyped in: include/extern.h
Calls: panic()src/end.c
Called by: realloc_obj()src/do_name.c
References Variables: timer_basesrc/timeout.c

Global Function obj_split_timers()

void obj_split_timers ( struct obj* src, struct obj* dest )
Prototyped in: include/extern.h
Calls: start_timer()src/timeout.c
Called by: splitobj()src/mkobj.c
References Variables: monstermovessrc/decl.c
  timer_basesrc/timeout.c

Global Function obj_stop_timers()

void obj_stop_timers ( struct obj* obj )
Prototyped in: include/extern.h
Calls: free()
Called by: dealloc_obj()src/mkobj.c
  food_disappears()src/eat.c
  merged()src/invent.c
  mkcorpstat()src/mkobj.c
  readobjnam()src/objnam.c
References Variables: timer_basesrc/timeout.c

Global Function relink_timers()

void relink_timers ( boolean ghostly )
Prototyped in: include/extern.h
Calls: find_oid()src/shk.c
  lookup_id_mapping()src/restore.c
  panic()src/end.c
Called by: getlev()src/restore.c
  restgamestate()src/restore.c
References Variables: timer_basesrc/timeout.c

Global Function restore_timers()

void restore_timers ( int fd, int range, boolean ghostly, long adjust )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  insert_timer()src/timeout.c
  mread()src/restore.c
Called by: getlev()src/restore.c
  restgamestate()src/restore.c
References Variables: timer_idsrc/timeout.c

Global Function run_timers()

void run_timers ( void )
Prototyped in: include/extern.h
Calls: free()
Called by: dorecover()src/restore.c
  goto_level()src/do.c
  nh_timeout()src/timeout.c
References Variables: monstermovessrc/decl.c
  timeout_funcssrc/timeout.c
  timer_basesrc/timeout.c

Global Function save_timers()

void save_timers ( int fd, int mode, int range )
Prototyped in: include/extern.h
Calls: bwrite()src/save.c
  maybe_write_timer()src/timeout.c
  timer_is_local()src/timeout.c
  free()
Called by: savegamestate()src/save.c
  savelev()src/save.c
References Variables: timer_basesrc/timeout.c
  timer_idsrc/timeout.c

Global Function start_timer()

boolean start_timer ( long when, short kind, short func_index, genericptr_t arg )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  insert_timer()src/timeout.c
  panic()src/end.c
Called by: attach_egg_hatch_timeout()src/timeout.c
  attach_fig_transform_timeout()src/timeout.c
  begin_burn()src/timeout.c
  bury_an_obj()src/dig.c
  fig_transform()src/apply.c
  hatch_egg()src/timeout.c
  obj_split_timers()src/timeout.c
  obj_timer_checks()src/mkobj.c
  revive_mon()src/do.c
  start_corpse_timeout()src/mkobj.c
References Variables: monstermovessrc/decl.c
  timer_idsrc/timeout.c

Global Function stop_timer()

long stop_timer ( short func_index, genericptr_t arg )
Prototyped in: include/extern.h
Calls: remove_timer()src/timeout.c
  free()
Called by: attach_egg_hatch_timeout()src/timeout.c
  attach_fig_transform_timeout()src/timeout.c
  bless()src/mkobj.c
  end_burn()src/timeout.c
  freeinv_core()src/invent.c
  hatch_egg()src/timeout.c
  in_container()src/pickup.c
  kill_egg()src/timeout.c
  mkbox_cnts()src/mkobj.c
  obj_timer_checks()src/mkobj.c
  uncurse()src/mkobj.c
  unearth_objs()src/dig.c
  use_figurine()src/apply.c
References Variables: timer_basesrc/timeout.c

Global Function timer_sanity_check()

void timer_sanity_check ( void )
Prototyped in: include/extern.h
Calls: fmt_ptr()src/alloc.c
  pline()src/pline.c
Called by: sanity_check()src/cmd.c
References Variables: timer_basesrc/timeout.c

Global Function wiz_timeout_queue()

int wiz_timeout_queue ( void )
Prototyped in: include/extern.h
Calls: print_queue()src/timeout.c
  sprintf()
Used in:  src/cmd.c
References Variables: monstermovessrc/decl.c
  timer_basesrc/timeout.c
  windowprocs

Local Function choke_dialogue()

static void choke_dialogue ( void )
Prototyped in: src/timeout.c
Calls: body_part()src/polyself.c
  exercise()src/attrib.c
  hcolor()src/do_name.c
  pline()src/pline.c
  rn2()src/rnd.c
  strchr()
Called by: nh_timeout()src/timeout.c
References Variables: c_color_namessrc/decl.c
  choke_textssrc/timeout.c
  choke_texts2src/timeout.c
  usrc/decl.c
  youmonstsrc/decl.c

Local Function insert_timer()

static void insert_timer ( timer_element* gnu )
Prototyped in: src/timeout.c
Called by: restore_timers()src/timeout.c
  start_timer()src/timeout.c
References Variables: timer_basesrc/timeout.c

Local Function kind_name()

static const char* kind_name ( short kind )
Prototyped in: src/timeout.c
Called by: print_queue()src/timeout.c

Local Function lantern_message()

static void lantern_message ( struct obj* obj )
Prototyped in: src/timeout.c
Calls: Monnam()src/do_name.c
  You()src/pline.c
  Your()src/pline.c
  dmgtype()src/mondata.c
  pline()src/pline.c
  s_suffix()src/hacklib.c
Called by: burn_object()src/timeout.c
References Variables: usrc/decl.c
  youmonstsrc/decl.c

Local Function maybe_write_timer()

static int maybe_write_timer ( int fd, int range, boolean write_it )
Prototyped in: src/timeout.c
Calls: timer_is_local()src/timeout.c
  write_timer()src/timeout.c
Called by: save_timers()src/timeout.c
References Variables: timer_basesrc/timeout.c

Local Function mon_is_local()

static boolean mon_is_local ( struct monst* mon )
Prototyped in: src/timeout.c
Called by: obj_is_local()src/timeout.c
  timer_is_local()src/timeout.c
References Variables: migrating_monssrc/decl.c
  mydogssrc/decl.c

Local Function print_queue()

static void print_queue ( winid win, timer_element* base )
Prototyped in: src/timeout.c
Calls: fmt_ptr()src/alloc.c
  kind_name()src/timeout.c
  sprintf()
Called by: wiz_timeout_queue()src/timeout.c
References Variables: timeout_funcssrc/timeout.c
  windowprocs

Local Function remove_timer()

static timer_element* remove_timer ( timer_element** base, short func_index, genericptr_t arg )
Prototyped in: src/timeout.c
Called by: stop_timer()src/timeout.c

Local Function see_lamp_flicker()

static void see_lamp_flicker ( struct obj* obj, const char* tailer )
Prototyped in: src/timeout.c
Calls: Yname2()src/objnam.c
  You()src/pline.c
  an()src/objnam.c
  pline()src/pline.c
  xname()src/objnam.c
Called by: burn_object()src/timeout.c

Local Function slime_dialogue()

static void slime_dialogue ( void )
Prototyped in: src/timeout.c
Calls: an()src/objnam.c
  dmgtype()src/mondata.c
  exercise()src/attrib.c
  hcolor()src/do_name.c
  pline()src/pline.c
  rndmonnam()src/do_name.c
  strchr()
Called by: nh_timeout()src/timeout.c
References Variables: c_color_namessrc/decl.c
  slime_textssrc/timeout.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function slip_or_trip()

static void slip_or_trip ( void )
Prototyped in: src/timeout.c
Calls: You()src/pline.c
  body_part()src/polyself.c
  dismount_steed()src/steed.c
  dmgtype()src/mondata.c
  doname()src/objnam.c
  highc()src/hacklib.c
  is_ice()src/dbridge.c
  makeplural()src/objnam.c
  pline()src/pline.c
  rn2()src/rnd.c
  sobj_at()src/invent.c
  strcpy()
Called by: nh_timeout()src/timeout.c
References Variables: c_common_stringssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function stoned_dialogue()

static void stoned_dialogue ( void )
Prototyped in: src/timeout.c
Calls: exercise()src/attrib.c
  nomul()src/hack.c
  pline()src/pline.c
Called by: nh_timeout()src/timeout.c
References Variables: stoned_textssrc/timeout.c
  usrc/decl.c

Local Function timer_is_local()

static boolean timer_is_local ( timer_element* timer )
Prototyped in: src/timeout.c
Calls: mon_is_local()src/timeout.c
  obj_is_local()src/timeout.c
  panic()src/end.c
Called by: maybe_write_timer()src/timeout.c
  save_timers()src/timeout.c

Local Function vomiting_dialogue()

static void vomiting_dialogue ( void )
Prototyped in: src/timeout.c
Calls: You()src/pline.c
  d()src/rnd.c
  exercise()src/attrib.c
  make_confused()src/potion.c
  make_stunned()src/potion.c
  morehungry()src/eat.c
  vomit()src/eat.c
Called by: nh_timeout()src/timeout.c
References Variables: usrc/decl.c
  vomiting_textssrc/timeout.c

Local Function write_timer()

static void write_timer ( int fd, timer_element* timer )
Calls: bwrite()src/save.c
  panic()src/end.c
Called by: maybe_write_timer()src/timeout.c