MCPcopy Create free account
hub / github.com/NetHack/NetHack / stat_hunger_indx

Function stat_hunger_indx

src/botl.c:2145–2156  ·  view source on GitHub ↗

callback so that interface can get hunger index rather than trying to reconstruct that from the hunger string or dipping into core internals */

Source from the content-addressed store, hash-verified

2143/* callback so that interface can get hunger index rather than trying to
2144 reconstruct that from the hunger string or dipping into core internals */
2145int
2146stat_hunger_indx(void)
2147{
2148 int uhs;
2149
2150#ifdef STATUS_HILITES
2151 uhs = gb.blstats[gn.now_or_before_idx][BL_HUNGER].a.a_int;
2152#else
2153 uhs = (int) u.uhs;
2154#endif
2155 return uhs;
2156}
2157
2158/* used by X11 for "tty status" even when STATUS_HILITES is disabled */
2159const char *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected