File src/eat.c


Included Files


Preprocessor definitions

#define SATIATED 0

#define NOT_HUNGRY 1

#define HUNGRY 2

#define WEAK 3

#define FAINTING 4

#define FAINTED 5

#define STARVED 6

#define CANNIBAL_ALLOWED

#define ROTTEN_TIN 4

#define HOMEMADE_TIN 5

#define TTSZ


Global Variable msgbuf

char msgbuf[256]
Visible in:  src/eat.c
Used in: start_eating()src/eat.c

Global Variable hu_stat

const char* hu_stat[]
Visible in:  src/botl.c
   src/eat.c
Used in: bot2()src/botl.c

Local Variables

comestibles
static const char comestibles[]
Used in: floorfood()

allobj
static const char allobj[]
Used in: floorfood()

force_save_hs
static boolean force_save_hs
Used in: bite()
  newuhs()

tintxts
static const struct {...} tintxts[]
Used in: opentin()

tin
static struct {...} tin
Used in: food_substitution()
  lesshungry()
  opentin()
  start_tin()

victual
static struct {...} victual
Used in: bite()
  cprefx()
  do_reset_eat()
  doeat()
  done_eating()
  eatcorpse()
  eatfood()
  eatspecial()
  food_disappears()
  food_substitution()
  fprefx()
  lesshungry()
  opentin()
  recalc_wt()
  reset_eat()
  start_eating()

eatmbuf
static char* eatmbuf
Used in: cpostfx()
  eatmdone()

foodwords
static const char* foodwords[]
Used in: foodword()


Global Function Hear_again()

int Hear_again ( void )
Prototyped in: include/extern.h
Called by: unfaint()src/eat.c
Used in: rottenfood()src/eat.c
References Variables: flagssrc/decl.c

Global Function doeat()

int doeat ( void )
Prototyped in: include/extern.h
Calls: docall()src/do_name.c
  dropy()src/do.c
  eatcorpse()src/eat.c
  eatspecial()src/eat.c
  floorfood()src/eat.c
  foodword()src/eat.c
  fprefx()src/eat.c
  is_edible()src/eat.c
  losestr()src/attrib.c
  rottenfood()src/eat.c
  start_eating()src/eat.c
  start_tin()src/eat.c
  touchfood()src/eat.c
  You(), You_cant(), check_capacity(), freeinv(), losehp(), make_stunned(), pline(), rn2(), rnd(), rounddiv(), singular(), splitobj(), stackobj(), surface(), the(), weight(), xname()
Used in:  src/cmd.c
References Functions: xname()
References Variables: c_common_stringssrc/decl.c
  monstermovessrc/decl.c
  usrc/decl.c
  victualsrc/eat.c
  youmonstsrc/decl.c
  mons, objects

Global Function eaten_stat()

int eaten_stat ( int base, struct obj* obj )
Prototyped in: include/extern.h
Called by: dog_nutrition()src/dogmove.c
  recalc_wt()src/eat.c
References Variables: mons, objects

Global Function fix_petrification()

void fix_petrification ( void )
Prototyped in: include/extern.h
Calls: acurr()src/attrib.c
  You_feel(), dmgtype(), pline()
Called by: cprefx()src/eat.c
References Variables: delayed_killersrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function floorfood()

struct obj* floorfood ( const char* verb, int corpsecheck )
Prototyped in: include/extern.h
Calls: is_edible()src/eat.c
  on_level()src/dungeon.c
  tinnable()src/apply.c
  You_cant(), deltrap(), doname(), g_at(), getobj(), mksobj(), obj_extract_self(), sprintf(), strcmp(), t_at()
Called by: doeat()src/eat.c
  use_tinning_kit()src/apply.c
References Variables: allobjsrc/eat.c
  comestiblessrc/eat.c
  dungeon_topologysrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ynqcharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function food_disappears()

void food_disappears ( struct obj* obj )
Prototyped in: include/extern.h
Calls: obj_stop_timers()
References Variables: victualsrc/eat.c

Global Function food_substitution()

void food_substitution ( struct obj* old_obj, struct obj* new_obj )
Prototyped in: include/extern.h
Called by: realloc_obj()src/do_name.c
References Variables: tinsrc/eat.c
  victualsrc/eat.c

Global Function gethungry()

void gethungry ( void )
Prototyped in: include/extern.h
Calls: newuhs()src/eat.c
  near_capacity(), rn2()
Called by: moveloop()src/allmain.c
References Variables: movessrc/decl.c
  usrc/decl.c
  uamulsrc/decl.c
  uleftsrc/decl.c
  urightsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c
  objects

Global Function init_uhunger()

void init_uhunger ( void )
Prototyped in: include/extern.h
References Variables: usrc/decl.c

Global Function is_edible()

boolean is_edible ( struct obj* obj )
Prototyped in: include/extern.h
Called by: doeat()src/eat.c
  floorfood()src/eat.c
References Variables: usrc/decl.c
  youmonstsrc/decl.c
  objects

Global Function is_fainted()

boolean is_fainted ( void )
Prototyped in: include/extern.h
Called by: newuhs()src/eat.c
  reset_faint()src/eat.c
References Variables: usrc/decl.c

Global Function lesshungry()

void lesshungry ( int num )
Prototyped in: include/extern.h
Calls: choke()src/eat.c
  newuhs()src/eat.c
  reset_eat()src/eat.c
  pline()
Called by: bite()src/eat.c
  eatspecial()src/eat.c
  opentin()src/eat.c
References Variables: multisrc/decl.c
  nomovemsgsrc/decl.c
  tinsrc/eat.c
  usrc/decl.c
  victualsrc/eat.c
  yncharssrc/decl.c
  windowprocs

Global Function morehungry()

void morehungry ( int num )
Prototyped in: include/extern.h
Calls: newuhs()src/eat.c
Called by: choke()src/eat.c
  jump()src/apply.c
References Variables: usrc/decl.c

Global Function newuhs()

void newuhs ( boolean incr )
Prototyped in: include/extern.h
Calls: acurr()src/attrib.c
  bot()src/botl.c
  is_fainted()src/eat.c
  losestr()src/attrib.c
  stop_occupation()src/allmain.c
  You(), dmgtype(), done(), nomul(), pline(), rn2()
Called by: do_reset_eat()src/eat.c
  done_eating()src/eat.c
  gethungry()src/eat.c
  lesshungry()src/eat.c
  morehungry()src/eat.c
References Functions: eatfood()src/eat.c
  opentin()src/eat.c
  unfaint()src/eat.c
References Variables: afternmvsrc/decl.c
  flagssrc/decl.c
  force_save_hssrc/eat.c
  killersrc/decl.c
  killer_formatsrc/decl.c
  multisrc/decl.c
  nomovemsgsrc/decl.c
  occupationsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c
  urace, urole

Global Function reset_eat()

void reset_eat ( void )
Prototyped in: include/extern.h
Called by: lesshungry()src/eat.c
  moveloop()src/allmain.c
References Variables: victualsrc/eat.c

Global Function reset_faint()

void reset_faint ( void )
Prototyped in: include/extern.h
Calls: is_fainted()src/eat.c
  nomul()

Global Function violated_vegetarian()

void violated_vegetarian ( void )
Prototyped in: include/extern.h
Calls: adjalign()src/attrib.c
  You_feel()
Called by: eatcorpse()src/eat.c
  fprefx()src/eat.c
  opentin()src/eat.c
References Variables: usrc/decl.c
  urole

Global Function vomit()

void vomit ( void )
Prototyped in: include/extern.h
Calls: make_sick(), nomul()
Called by: choke()src/eat.c

Local Function bite()

static int bite ( void )
Prototyped in: src/eat.c
Calls: choke()src/eat.c
  do_reset_eat()src/eat.c
  lesshungry()src/eat.c
  recalc_wt()src/eat.c
Called by: eatfood()src/eat.c
  start_eating()src/eat.c
References Variables: force_save_hssrc/eat.c
  usrc/decl.c
  victualsrc/eat.c

Local Function choke()

static void choke ( struct obj* food )
Prototyped in: src/eat.c
Calls: adjalign()src/attrib.c
  exercise()src/attrib.c
  food_xname()src/eat.c
  foodword()src/eat.c
  morehungry()src/eat.c
  vomit()src/eat.c
  You(), You_feel(), done(), rn2()
Called by: bite()src/eat.c
  eataccessory()src/eat.c
  lesshungry()src/eat.c
References Variables: killersrc/decl.c
  killer_formatsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c
  urole

Local Function cpostfx()

static void cpostfx ( int pm )
Prototyped in: src/eat.c
Calls: adjattrib()src/attrib.c
  alloc()src/alloc.c
  curs_on_u()src/display.c
  eatmdone()src/eat.c
  gainstr()src/attrib.c
  givit()src/eat.c
  intrinsic_possible()src/eat.c
  newsym()src/display.c
  You(), You_cant(), You_feel(), Your(), an(), dmgtype(), make_confused(), make_hallucinated(), make_stunned(), nomul(), pline(), pluslvl(), polyself(), rn2(), set_itimeout(), sprintf(), strcpy(), strlen()
Called by: done_eating()src/eat.c
  opentin()src/eat.c
References Functions: eatmdone()src/eat.c
References Variables: WIN_MAPsrc/decl.c
  afternmvsrc/decl.c
  eatmbufsrc/eat.c
  flagssrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c
  mons, urace, windowprocs

Local Function cprefx()

static void cprefx ( int pm )
Prototyped in: src/eat.c
Calls: change_luck()src/attrib.c
  fix_petrification()src/eat.c
  revive_corpse()src/do.c
  You(), You_feel(), done(), pline(), poly_when_stoned(), polymon(), rn2(), sprintf()
Called by: opentin()src/eat.c
  start_eating()src/eat.c
References Variables: killersrc/decl.c
  killer_bufsrc/decl.c
  killer_formatsrc/decl.c
  usrc/decl.c
  victualsrc/eat.c
  youmonstsrc/decl.c
  mons, urace, urole

Local Function do_reset_eat()

static void do_reset_eat ( void )
Prototyped in: src/eat.c
Calls: newuhs()src/eat.c
  recalc_wt()src/eat.c
  stop_occupation()src/allmain.c
  touchfood()src/eat.c
Called by: bite()src/eat.c
  eatfood()src/eat.c
References Variables: victualsrc/eat.c

Local Function done_eating()

static void done_eating ( boolean message )
Prototyped in: src/eat.c
Calls: cpostfx()src/eat.c
  food_xname()src/eat.c
  fpostfx()src/eat.c
  newuhs()src/eat.c
  You(), pline(), useup(), useupf()
Called by: eatfood()src/eat.c
  start_eating()src/eat.c
References Variables: nomovemsgsrc/decl.c
  occupationsrc/decl.c
  victualsrc/eat.c

Local Function eataccessory()

static void eataccessory ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: Ring_gone()src/do_wear.c
  adjattrib()src/attrib.c
  choke()src/eat.c
  newsym()src/display.c
  see_monsters()src/display.c
  set_mimic_blocking()src/display.c
  You(), You_feel(), Your(), change_sex(), d(), discover_object(), dmgtype(), float_up(), incr_itimeout(), pline(), rescham(), rn2(), rnd()
Called by: eatspecial()src/eat.c
References Variables: flagssrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  uleftsrc/decl.c
  urightsrc/decl.c
  youmonstsrc/decl.c
  mons, objects

Local Function eatcorpse()

static int eatcorpse ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: defends()src/artifact.c
  food_xname()src/eat.c
  losestr()src/attrib.c
  rottenfood()src/eat.c
  touchfood()src/eat.c
  violated_vegetarian()src/eat.c
  You(), You_feel(), corpse_xname(), losehp(), make_sick(), peek_at_iced_corpse_age(), pline(), poly_when_stoned(), rn2(), rnd(), s_suffix(), sprintf(), useup(), useupf()
Called by: doeat()src/eat.c
References Variables: monstermovessrc/decl.c
  usrc/decl.c
  uwepsrc/decl.c
  victualsrc/eat.c
  youmonstsrc/decl.c
  mons

Local Function eatfood()

static int eatfood ( void )
Prototyped in: src/eat.c
Calls: bite()src/eat.c
  do_reset_eat()src/eat.c
  done_eating()src/eat.c
  obj_here()
Used in: newuhs()src/eat.c
  start_eating()src/eat.c
References Variables: usrc/decl.c
  victualsrc/eat.c

Local Function eatmdone()

static int eatmdone ( void )
Prototyped in: src/eat.c
Calls: newsym()src/display.c
  free()
Called by: cpostfx()src/eat.c
Used in: cpostfx()src/eat.c
References Variables: eatmbufsrc/eat.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Local Function eatspecial()

static void eatspecial ( void )
Prototyped in: src/eat.c
Calls: eataccessory()src/eat.c
  exercise()src/attrib.c
  lesshungry()src/eat.c
  o_unleash()src/apply.c
  dealloc_obj(), dmgtype(), dopotion(), pline(), unpunish(), uqwepgone(), useup(), useupf(), uswapwepgone(), uwepgone()
Called by: doeat()src/eat.c
References Variables: usrc/decl.c
  uballsrc/decl.c
  uchainsrc/decl.c
  uquiversrc/decl.c
  uswapwepsrc/decl.c
  uwepsrc/decl.c
  victualsrc/eat.c
  youmonstsrc/decl.c

Local Function food_xname()

static const char* food_xname ( struct obj* food, boolean the_pfx )
Prototyped in: src/eat.c
Calls: s_suffix(), singular(), sprintf(), the(), xname()
Called by: choke()src/eat.c
  done_eating()src/eat.c
  eatcorpse()src/eat.c
  start_eating()src/eat.c
References Functions: xname()
References Variables: mons

Local Function foodword()

static const char* foodword ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: discover_object()
Called by: choke()src/eat.c
  doeat()src/eat.c
  rottenfood()src/eat.c
References Variables: foodwordssrc/eat.c
  objects

Local Function fpostfx()

static void fpostfx ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: gainstr()src/attrib.c
  heal_legs()src/do.c
  bcsign(), done(), make_blinded(), make_sick(), make_vomiting(), outrumor(), poly_when_stoned(), polymon(), rehumanize(), rn2(), rnd(), sprintf(), you_unwere()
Called by: done_eating()src/eat.c
References Variables: delayed_killersrc/decl.c
  killersrc/decl.c
  killer_bufsrc/decl.c
  killer_formatsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  mons

Local Function fprefx()

static void fprefx ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: violated_vegetarian()src/eat.c
  d(), dmgtype(), make_vomiting(), more_experienced(), pline(), rn2(), rnd(), singular()
Called by: doeat()src/eat.c
References Functions: xname()
References Variables: current_fruitsrc/decl.c
  flagssrc/decl.c
  monstermovessrc/decl.c
  usrc/decl.c
  victualsrc/eat.c
  youmonstsrc/decl.c
  objects, urace, urole

Local Function givit()

static void givit ( int type, struct permonst* ptr )
Prototyped in: src/eat.c
Calls: see_monsters()src/display.c
  You(), You_feel(), Your(), dmgtype(), rn2()
Called by: cpostfx()src/eat.c
References Variables: usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  mons

Local Function intrinsic_possible()

static int intrinsic_possible ( int type, struct permonst* ptr )
Prototyped in: src/eat.c
Called by: cpostfx()src/eat.c
References Variables: mons

Local Function opentin()

static int opentin ( void )
Prototyped in: src/eat.c
Calls: cpostfx()src/eat.c
  cprefx()src/eat.c
  gainstr()src/attrib.c
  hcolor()src/do_name.c
  lesshungry()src/eat.c
  rndmonnam()src/do_name.c
  violated_vegetarian()src/eat.c
  You(), b_trapped(), body_part(), dmgtype(), incr_itimeout(), make_vomiting(), makeplural(), obj_here(), pline(), rn2(), rnd(), useup(), useupf()
Used in: newuhs()src/eat.c
  start_tin()src/eat.c
References Variables: c_color_namessrc/decl.c
  flagssrc/decl.c
  tinsrc/eat.c
  tintxtssrc/eat.c
  usrc/decl.c
  victualsrc/eat.c
  yncharssrc/decl.c
  youmonstsrc/decl.c
  mons, windowprocs

Local Function recalc_wt()

static void recalc_wt ( void )
Prototyped in: src/eat.c
Calls: eaten_stat()src/eat.c
  weight()
Called by: bite()src/eat.c
  do_reset_eat()src/eat.c
References Variables: victualsrc/eat.c

Local Function rottenfood()

static int rottenfood ( struct obj* obj )
Prototyped in: src/eat.c
Calls: foodword()src/eat.c
  on_level()src/dungeon.c
  You_feel(), body_part(), d(), dmgtype(), make_blinded(), make_confused(), nomul(), pline(), pline_The(), rn2(), rnd(), surface()
Called by: doeat()src/eat.c
  eatcorpse()src/eat.c
References Functions: Hear_again()src/eat.c
References Variables: afternmvsrc/decl.c
  dungeon_topologysrc/decl.c
  flagssrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function start_eating()

static void start_eating ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: bite()src/eat.c
  cprefx()src/eat.c
  done_eating()src/eat.c
  food_xname()src/eat.c
  set_occupation()src/cmd.c
  sprintf()
Called by: doeat()src/eat.c
References Functions: eatfood()src/eat.c
References Variables: msgbufsrc/eat.c
  victualsrc/eat.c

Local Function start_tin()

static void start_tin ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: acurr()src/attrib.c
  acurrstr()src/attrib.c
  dropx()src/do.c
  set_occupation()src/cmd.c
  You(), aobjnam(), body_part(), makeplural(), pline(), pline_The(), rn2(), setuqwep(), setuswapwep(), setuwep(), splitobj(), stackobj()
Called by: doeat()src/eat.c
References Functions: opentin()src/eat.c
References Variables: tinsrc/eat.c
  usrc/decl.c
  uquiversrc/decl.c
  uswapwepsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c

Local Function touchfood()

static struct obj* touchfood ( struct obj* otmp )
Prototyped in: src/eat.c
Calls: dropy()src/do.c
  addinv(), bill_dummy_object(), costly_spot(), freeinv(), inv_cnt(), merge_choice(), splitobj(), verbalize()
Called by: do_reset_eat()src/eat.c
  doeat()src/eat.c
  eatcorpse()src/eat.c
References Variables: inventsrc/decl.c
  mons, objects

Local Function unfaint()

static int unfaint ( void )
Prototyped in: src/eat.c
Calls: Hear_again()src/eat.c
  stop_occupation()src/allmain.c
Used in: newuhs()src/eat.c
References Variables: flagssrc/decl.c
  usrc/decl.c