File src/worm.c


Included Files


Preprocessor definitions

#define newseg

#define dealloc_seg( wseg )


Type struct wseg

struct wseg
struct wseg 
   { 
     struct wseg* nseg; 
     xchar wx; 
     xchar wy; 
   } 

Global Variable wheads

struct wseg* wheads[32]
Visible in:  src/worm.c
Used in: cutworm()src/worm.c
  get_wormno()src/worm.c
  initworm()src/worm.c
  place_worm_tail_randomly()src/worm.c
  place_wsegs()src/worm.c
  rest_worm()src/worm.c
  save_worm()src/worm.c
  see_wsegs()src/worm.c
  shrink_worm()src/worm.c
  worm_move()src/worm.c
  wormgone()src/worm.c

Global Variable wtails

struct wseg* wtails[32]
Visible in:  src/worm.c
Used in: count_wsegs()src/worm.c
  cutworm()src/worm.c
  initworm()src/worm.c
  place_worm_tail_randomly()src/worm.c
  place_wsegs()src/worm.c
  remove_worm()src/worm.c
  rest_worm()src/worm.c
  save_worm()src/worm.c
  see_wsegs()src/worm.c
  shrink_worm()src/worm.c
  worm_known()src/worm.c
  wormgone()src/worm.c
  wormhitu()src/worm.c

Global Variable wgrowtime

long wgrowtime[32]
Visible in:  src/worm.c
Used in: cutworm()src/worm.c
  initworm()src/worm.c
  rest_worm()src/worm.c
  save_worm()src/worm.c
  worm_move()src/worm.c

Global Function count_wsegs()

int count_wsegs ( struct monst* mtmp )
Prototyped in: include/extern.h
Called by: digactualhole()src/dig.c
  keepdogs()src/dog.c
  makemon()src/makemon.c
  migrate_to_level()src/dog.c
  mintrap()src/trap.c
  newcham()src/mon.c
References Variables: wtailssrc/worm.c

Global Function cutworm()

void cutworm ( struct monst* worm, xchar x, xchar y, struct obj* weap )
Prototyped in: include/extern.h
Calls: You()src/pline.c
  alloc()src/alloc.c
  d()src/rnd.c
  get_wormno()src/worm.c
  impossible()src/pline.c
  mon_nam()src/do_name.c
  newsym()src/display.c
  place_monster()src/steed.c
  place_wsegs()src/worm.c
  rn2()src/rnd.c
  rnd()src/rnd.c
  set_malign()src/makemon.c
  shrink_worm()src/worm.c
  toss_wsegs()src/worm.c
Called by: known_hitum()src/uhitm.c
  thitmonst()src/dothrow.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  objectssrc/objects.c
  usrc/decl.c
  wgrowtimesrc/worm.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function get_wormno()

int get_wormno ( void )
Prototyped in: include/extern.h
Called by: cutworm()src/worm.c
  makemon()src/makemon.c
  mon_arrive()src/dog.c
  newcham()src/mon.c
References Variables: wheadssrc/worm.c

Global Function initworm()

void initworm ( struct monst* worm, int wseg_count )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  create_worm_tail()src/worm.c
Called by: makemon()src/makemon.c
  mon_arrive()src/dog.c
  newcham()src/mon.c
References Variables: wgrowtimesrc/worm.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function place_worm_tail_randomly()

void place_worm_tail_randomly ( struct monst* worm, xchar x, xchar y )
Prototyped in: include/extern.h
Calls: goodpos()src/teleport.c
  impossible()src/pline.c
  newsym()src/display.c
  random_dir()src/worm.c
  toss_wsegs()src/worm.c
Called by: makemon()src/makemon.c
  newcham()src/mon.c
  rloc_to()src/teleport.c
References Variables: levelsrc/decl.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function place_wsegs()

void place_wsegs ( struct monst* worm )
Prototyped in: include/extern.h
Called by: cutworm()src/worm.c
  getlev()src/restore.c
  replmon()src/mon.c
References Variables: levelsrc/decl.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function remove_worm()

void remove_worm ( struct monst* worm )
Prototyped in: include/extern.h
Calls: newsym()src/display.c
Called by: mnearto()src/mon.c
  movebubbles()src/mkmaze.c
  rloc_to()src/teleport.c
References Variables: levelsrc/decl.c
  wtailssrc/worm.c

Global Function rest_worm()

void rest_worm ( int fd )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  mread()src/restore.c
Called by: getlev()src/restore.c
References Variables: wgrowtimesrc/worm.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function save_worm()

void save_worm ( int fd, int mode )
Prototyped in: include/extern.h
Calls: bwrite()src/save.c
  free()
Called by: savelev()src/save.c
References Variables: wgrowtimesrc/worm.c
  wheadssrc/worm.c
  wtailssrc/worm.c

Global Function see_wsegs()

void see_wsegs ( struct monst* worm )
Prototyped in: include/extern.h
Calls: newsym()src/display.c
Called by: m_move()src/monmove.c
  see_monsters()src/display.c
References Variables: wheadssrc/worm.c
  wtailssrc/worm.c

Global Function worm_known()

boolean worm_known ( struct monst* worm )
Prototyped in: include/extern.h
Called by: artifact_hit()src/artifact.c
  attack()src/uhitm.c
  attack_checks()src/uhitm.c
  awaken_soldiers()src/music.c
  beg()src/sounds.c
  breamu()src/mthrowu.c
  buzzmu()src/mcastu.c
  calm_nymphs()src/music.c
  castmu()src/mcastu.c
  charm_snakes()src/music.c
  create_critters()src/makemon.c
  cursetxt()src/mcastu.c
  damageum()src/uhitm.c
  destroy_drawbridge()src/dbridge.c
  digactualhole()src/dig.c
  do_entity()src/dbridge.c
  do_mname()src/do_name.c
  dochat()src/sounds.c
  dochug()src/monmove.c
  dochugw()src/monmove.c
  doconfuse()src/polyself.c
  dog_eat()src/dogmove.c
  dog_move()src/dogmove.c
  dokick()src/dokick.c
  domonnoise()src/sounds.c
  domove()src/hack.c
  done_in_by()src/end.c
  dopay()src/shk.c
  dosearch0()src/detect.c
  dosounds()src/sounds.c
  erode_armor()src/do_wear.c
  erode_weapon()src/wield.c
  explmu()src/mhitu.c
  explode()src/explode.c
  fhito()src/muse.c
  fig_transform()src/apply.c
  findone()src/detect.c
  flash_hits_mon()src/uhitm.c
  gazemu()src/mhitu.c
  ghitm()src/dokick.c
  grease_protect()src/trap.c
  hatch_egg()src/timeout.c
  hitmm()src/mhitm.c
  hitmu()src/mhitu.c
  hmon_hitmon()src/uhitm.c
  keepdogs()src/dog.c
  kops_gone()src/shk.c
  lookat()src/pager.c
  m_move()src/monmove.c
  m_throw()src/mthrowu.c
  make_happy_shk()src/shk.c
  mattackm()src/mhitm.c
  mattacku()src/mhitu.c
  mbhitm()src/muse.c
  mdamagem()src/mhitm.c
  meatgold()src/mon.c
  mintrap()src/trap.c
  missmm()src/mhitm.c
  missmu()src/mhitu.c
  missum()src/uhitm.c
  mon_to_stone()src/mon.c
  mon_wield_item()src/weapon.c
  monkilled()src/mon.c
  monster_nearby()src/hack.c
  moverock()src/hack.c
  mquaffmsg()src/muse.c
  mreadmsg()src/muse.c
  mtele_trap()src/teleport.c
  munstone()src/muse.c
  mzapmsg()src/muse.c
  new_were()src/were.c
  obstructed()src/lock.c
  passive()src/uhitm.c
  passivemm()src/mhitm.c
  pick_lock()src/lock.c
  potionhit()src/potion.c
  prisoner_speaks()src/quest.c
  pronoun_gender()src/mondata.c
  revive_corpse()src/do.c
  rust_dmg()src/trap.c
  seffects()src/read.c
  setmangry()src/mon.c
  shkcatch()src/shk.c
  spitmu()src/mthrowu.c
  split_mon()src/potion.c
  tamedog()src/dog.c
  tele_restrict()src/teleport.c
  thrwmu()src/mthrowu.c
  use_defensive()src/muse.c
  use_leash()src/apply.c
  use_magic_whistle()src/apply.c
  use_mirror()src/apply.c
  use_misc()src/muse.c
  use_offensive()src/muse.c
  use_saddle()src/steed.c
  use_stethoscope()src/apply.c
  use_whip()src/apply.c
  x_monnam()src/do_name.c
  xkilled()src/mon.c
  you_aggravate()src/muse.c
References Variables: viz_arraysrc/decl.c
  wtailssrc/worm.c

Global Function worm_move()

void worm_move ( struct monst* worm )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  newsym()src/display.c
  rn2()src/rnd.c
  rnd()src/rnd.c
  shrink_worm()src/worm.c
Called by: m_move()src/monmove.c
  mattacku()src/mhitu.c
  use_defensive()src/muse.c
  use_misc()src/muse.c
References Variables: levelsrc/decl.c
  movessrc/decl.c
  wgrowtimesrc/worm.c
  wheadssrc/worm.c

Global Function worm_nomove()

void worm_nomove ( struct monst* worm )
Prototyped in: include/extern.h
Calls: shrink_worm()src/worm.c
Called by: m_move()src/monmove.c

Global Function wormgone()

void wormgone ( struct monst* worm )
Prototyped in: include/extern.h
Calls: toss_wsegs()src/worm.c
Called by: keepdogs()src/dog.c
  m_detach()src/mon.c
  migrate_to_level()src/dog.c
  newcham()src/mon.c
References Variables: wheadssrc/worm.c
  wtailssrc/worm.c

Global Function wormhitu()

void wormhitu ( struct monst* worm )
Prototyped in: include/extern.h
Calls: dist2()src/hacklib.c
  mattacku()src/mhitu.c
Called by: dochug()src/monmove.c
References Variables: usrc/decl.c
  wtailssrc/worm.c

Local Function create_worm_tail()

static struct wseg* create_worm_tail ( int num_segs )
Prototyped in: src/worm.c
Calls: alloc()src/alloc.c
Called by: initworm()src/worm.c

Local Function random_dir()

static void random_dir ( xchar x, xchar y, xchar* nx, xchar* ny )
Prototyped in: src/worm.c
Calls: rn2()src/rnd.c
Called by: place_worm_tail_randomly()src/worm.c

Local Function shrink_worm()

static void shrink_worm ( int wnum )
Prototyped in: src/worm.c
Calls: toss_wsegs()src/worm.c
Called by: cutworm()src/worm.c
  worm_move()src/worm.c
  worm_nomove()src/worm.c
References Variables: wheadssrc/worm.c
  wtailssrc/worm.c

Local Function toss_wsegs()

static void toss_wsegs ( struct wseg* curr, boolean display_update )
Prototyped in: src/worm.c
Calls: newsym()src/display.c
  free()
Called by: cutworm()src/worm.c
  place_worm_tail_randomly()src/worm.c
  shrink_worm()src/worm.c
  wormgone()src/worm.c
References Variables: levelsrc/decl.c