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

Function tty_status_init

win/tty/wintty.c:4335–4361  ·  view source on GitHub ↗

* tty_status_init() * -- initialize the tty-specific data structures. * -- call genl_status_init() to initialize the general data. */

Source from the content-addressed store, hash-verified

4333 * -- call genl_status_init() to initialize the general data.
4334 */
4335void
4336tty_status_init(void)
4337{
4338#ifdef STATUS_HILITES
4339 int i, num_rows;
4340
4341 num_rows = StatusRows(); /* 2 or 3 */
4342 fieldorder = (num_rows != 3) ? twolineorder : threelineorder;
4343
4344 for (i = 0; i < MAXBLSTATS; ++i) {
4345 tty_status[NOW][i].idx = BL_FLUSH;
4346 tty_status[NOW][i].color = NO_COLOR; /* no color */
4347 tty_status[NOW][i].attr = ATR_NONE;
4348 tty_status[NOW][i].x = tty_status[NOW][i].y = 0;
4349 tty_status[NOW][i].valid = FALSE;
4350 tty_status[NOW][i].dirty = FALSE;
4351 tty_status[NOW][i].redraw = FALSE;
4352 tty_status[NOW][i].sanitycheck = FALSE;
4353 tty_status[BEFORE][i] = tty_status[NOW][i];
4354 }
4355 tty_condition_bits = 0L;
4356 hpbar_percent = hpbar_crit_hp = 0;
4357#endif /* STATUS_HILITES */
4358
4359 /* let genl_status_init do most of the initialization */
4360 genl_status_init();
4361}
4362
4363void
4364tty_status_enablefield(

Callers 1

new_status_windowFunction · 0.85

Calls 1

genl_status_initFunction · 0.85

Tested by

no test coverage detected