From 4e19221e554558f6be1575160691a604ae06cafb Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 5 Jan 2024 05:58:51 -0500 Subject: [PATCH] variable 'display' causes shadow variable warnings in X11 build display.botl -> disp.botl display.botlx -> disp.botlx display.time_botl -> disp.time_botl --- include/decl.h | 2 +- outdated/sys/amiga/winstr.c | 2 +- src/allmain.c | 20 ++++++++-------- src/apply.c | 10 ++++---- src/artifact.c | 8 +++---- src/attrib.c | 16 ++++++------- src/botl.c | 34 +++++++++++++-------------- src/cmd.c | 2 +- src/decl.c | 4 ++-- src/dig.c | 2 +- src/display.c | 8 +++---- src/do.c | 4 ++-- src/do_wear.c | 36 ++++++++++++++--------------- src/eat.c | 32 +++++++++++++------------- src/end.c | 8 +++---- src/exper.c | 12 +++++----- src/explode.c | 2 +- src/fountain.c | 2 +- src/hack.c | 16 ++++++------- src/invent.c | 8 +++---- src/mhitu.c | 22 +++++++++--------- src/minion.c | 2 +- src/mon.c | 2 +- src/monmove.c | 18 +++++++-------- src/music.c | 2 +- src/objnam.c | 2 +- src/options.c | 8 +++---- src/pickup.c | 6 ++--- src/polyself.c | 24 +++++++++---------- src/potion.c | 46 ++++++++++++++++++------------------- src/pray.c | 14 +++++------ src/read.c | 2 +- src/rumors.c | 2 +- src/shk.c | 16 ++++++------- src/sit.c | 4 ++-- src/spell.c | 8 +++---- src/steal.c | 2 +- src/steed.c | 6 ++--- src/teleport.c | 2 +- src/timeout.c | 10 ++++---- src/trap.c | 24 +++++++++---------- src/uhitm.c | 4 ++-- src/wield.c | 4 ++-- src/zap.c | 30 ++++++++++++------------ win/tty/wintty.c | 10 ++++---- 45 files changed, 249 insertions(+), 249 deletions(-) diff --git a/include/decl.h b/include/decl.h index b50587ad0..18085f6c0 100644 --- a/include/decl.h +++ b/include/decl.h @@ -120,7 +120,7 @@ struct display_hints { boolean botlx; /* print an entirely new bottom line */ boolean time_botl; /* context.botl for 'time' (moves) only */ }; -extern struct display_hints display; +extern struct display_hints disp; /* * 'gX' -- instance_globals holds engine state that does not need to be diff --git a/outdated/sys/amiga/winstr.c b/outdated/sys/amiga/winstr.c index e5ffff915..ea7d65343 100644 --- a/outdated/sys/amiga/winstr.c +++ b/outdated/sys/amiga/winstr.c @@ -191,7 +191,7 @@ const char *str; if (cw->data[cw->cury] == NULL) panic("NULL pointer for status window"); ob = &cw->data[cw->cury][j = cw->curx]; - if (display.botlx) + if (disp.botlx) *ob = 0; /* Display when beam at top to avoid flicker... */ diff --git a/src/allmain.c b/src/allmain.c index f8032ae8e..e0167d835 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -79,7 +79,7 @@ moveloop_preamble(boolean resuming) u.umovement = NORMAL_SPEED; initrack(); } - display.botlx = TRUE; /* for STATUS_HILITES */ + disp.botlx = TRUE; /* for STATUS_HILITES */ if (resuming) { /* restoring old game */ read_engr_at(u.ux, u.uy); /* subset of pickup() */ fix_shop_damage(); @@ -233,7 +233,7 @@ moveloop_core(void) gh.hero_seq = gm.moves << 3; if (flags.time && !gc.context.run) - display.time_botl = TRUE; /* 'moves' just changed */ + disp.time_botl = TRUE; /* 'moves' just changed */ /********************************/ /* once-per-turn things go here */ @@ -425,10 +425,10 @@ moveloop_core(void) if (gv.vision_full_recalc) vision_recalc(0); /* vision! */ } - if (display.botl || display.botlx) { + if (disp.botl || disp.botlx) { bot(); curs_on_u(); - } else if (display.time_botl) { + } else if (disp.time_botl) { timebot(); curs_on_u(); } @@ -503,7 +503,7 @@ moveloop_core(void) && (gm.multi && (!gc.context.travel ? !(gm.multi % 7) : !(gm.moves % 7L)))) { if (flags.time && gc.context.run) - display.botl = TRUE; + disp.botl = TRUE; /* [should this be flush_screen() instead?] */ display_nhwindow(WIN_MAP, FALSE); } @@ -561,7 +561,7 @@ regen_pw(int wtcap) u.uen += rn1(upper, 1); if (u.uen > u.uenmax) u.uen = u.uenmax; - display.botl = TRUE; + disp.botl = TRUE; if (u.uen == u.uenmax) interrupt_multi("You feel full of energy."); } @@ -593,7 +593,7 @@ regen_hp(int wtcap) heal = 1; } if (heal) { - display.botl = TRUE; + disp.botl = TRUE; u.mh += heal; reached_full = (u.mh == u.mhmax); } @@ -613,7 +613,7 @@ regen_hp(int wtcap) heal++; if (heal) { - display.botl = TRUE; + disp.botl = TRUE; u.uhp += heal; if (u.uhp > u.uhpmax) u.uhp = u.uhpmax; @@ -636,7 +636,7 @@ stop_occupation(void) if (!maybe_finished_meal(TRUE)) You("stop %s.", go.occtxt); go.occupation = (int (*)(void)) 0; - display.botl = TRUE; /* in case u.uhs changed */ + disp.botl = TRUE; /* in case u.uhs changed */ nomul(0); } else if (gm.multi >= 0) { nomul(0); @@ -705,7 +705,7 @@ newgame(void) { int i; - display.botlx = TRUE; + disp.botlx = TRUE; gc.context.ident = 1; gc.context.warnlevel = 1; gc.context.next_attrib_check = 600L; /* arbitrary first setting */ diff --git a/src/apply.c b/src/apply.c index 77f5f3985..0180526dd 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2320,7 +2320,7 @@ use_unicorn_horn(struct obj **optr) } if (did_prop) - display.botl = TRUE; + disp.botl = TRUE; else pline("%s", nothing_seems_to_happen); @@ -3917,11 +3917,11 @@ do_break_wand(struct obj *obj) */ if ((mon = m_at(x, y)) != 0) { (void) bhitm(mon, obj); - /* if (display.botl) bot(); */ + /* if (disp.botl) bot(); */ } if (affects_objects && gl.level.objects[x][y]) { (void) bhitpile(obj, bhito, x, y, 0); - if (display.botl) + if (disp.botl) bot(); /* potion effects */ } } else { @@ -3939,7 +3939,7 @@ do_break_wand(struct obj *obj) */ if (affects_objects && gl.level.objects[x][y]) { (void) bhitpile(obj, bhito, x, y, 0); - if (display.botl) + if (disp.botl) bot(); /* potion effects */ } damage = zapyourself(obj, FALSE); @@ -3947,7 +3947,7 @@ do_break_wand(struct obj *obj) Sprintf(buf, "killed %sself by breaking a wand", uhim()); losehp(Maybe_Half_Phys(damage), buf, NO_KILLER_PREFIX); } - if (display.botl) + if (disp.botl) bot(); /* blindness */ } } diff --git a/src/artifact.c b/src/artifact.c index 984223852..50876499a 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1232,7 +1232,7 @@ Mb_hit(struct monst *magr, /* attacker */ u.uenmax--; if (u.uen > 0) u.uen--; - display.botl = TRUE; + disp.botl = TRUE; You("lose magical energy!"); } } else { @@ -1247,7 +1247,7 @@ Mb_hit(struct monst *magr, /* attacker */ if (u.uenmax > u.uenpeak) u.uenpeak = u.uenmax; u.uen++; - display.botl = TRUE; + disp.botl = TRUE; You("absorb magical energy!"); } } @@ -1731,7 +1731,7 @@ arti_invoke(struct obj *obj) make_slimed(0L, (char *) 0); if (BlindedTimeout > creamed) make_blinded(creamed, FALSE); - display.botl = TRUE; + disp.botl = TRUE; break; } case ENERGY_BOOST: { @@ -1743,7 +1743,7 @@ arti_invoke(struct obj *obj) epboost = u.uenmax - u.uen; if (epboost) { u.uen += epboost; - display.botl = TRUE; + disp.botl = TRUE; You_feel("re-energized."); } else goto nothing_special; diff --git a/src/attrib.c b/src/attrib.c index 4f952ce83..7b278f864 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -184,7 +184,7 @@ adjattrib( return FALSE; } - display.botl = TRUE; + disp.botl = TRUE; if (msgflg <= 0) You_feel("%s%s!", (incr > 1 || incr < -1) ? "very " : "", attrstr); if (gp.program_state.in_moveloop && (ndx == A_STR || ndx == A_CON)) @@ -246,7 +246,7 @@ losestr(int num, const char *knam, schar k_format) if (u.uhpmax > uhpmin) setuhpmax(max(u.uhpmax - dmg, uhpmin)); } - display.botl = TRUE; + disp.botl = TRUE; } #if 0 /* only possible if uhpmax was already less than uhpmin */ if (!Upolyd && u.uhpmax < uhpmin) { @@ -354,7 +354,7 @@ poisoned( loss = 6 + d(4, 6); if (u.uhp <= loss) { u.uhp = -1; - display.botl = TRUE; + disp.botl = TRUE; pline_The("poison was deadly..."); } else { /* survived, but with severe reaction */ @@ -457,13 +457,13 @@ restore_attrib(void) if (ATEMP(i) != equilibrium && ATIME(i) != 0) { if (!(--(ATIME(i)))) { /* countdown for change */ ATEMP(i) += (ATEMP(i) > 0) ? -1 : 1; - display.botl = TRUE; + disp.botl = TRUE; if (ATEMP(i)) /* reset timer */ ATIME(i) = 100 / ACURR(A_CON); } } } - if (display.botl) + if (disp.botl) (void) encumber_msg(); } @@ -1112,10 +1112,10 @@ setuhpmax(int newmax) u.uhpmax = newmax; if (u.uhpmax > u.uhppeak) u.uhppeak = u.uhpmax; - display.botl = TRUE; + disp.botl = TRUE; } if (u.uhp > u.uhpmax) - u.uhp = u.uhpmax, display.botl = TRUE; + u.uhp = u.uhpmax, disp.botl = TRUE; } /* return the current effective value of a specific characteristic @@ -1238,7 +1238,7 @@ uchangealign(int newalign, u.ublessed = 0; /* lose divine protection */ /* You/Your/pline message with call flush_screen(), triggering bot(), so the actual data change needs to come before the message */ - display.botl = TRUE; /* status line needs updating */ + disp.botl = TRUE; /* status line needs updating */ if (reason == 0) { /* conversion via altar */ livelog_printf(LL_ALIGNMENT, "permanently converted to %s", diff --git a/src/botl.c b/src/botl.c index ab1249baa..a318e1c2a 100644 --- a/src/botl.c +++ b/src/botl.c @@ -260,7 +260,7 @@ bot(void) putmixed(WIN_STATUS, 0, do_statusline2()); } } - display.botl = display.botlx = display.time_botl = FALSE; + disp.botl = disp.botlx = disp.time_botl = FALSE; } /* special purpose status update: move counter ('time' status) only */ @@ -269,8 +269,8 @@ timebot(void) { if (gb.bot_disabled) return; - /* we're called when display.time_botl is set and general display.botl - is clear; display.time_botl gets set whenever gm.moves changes value + /* we're called when disp.time_botl is set and general disp.botl + is clear; disp.time_botl gets set whenever gm.moves changes value so there's no benefit in tracking previous value to decide whether to skip update; suppress_map_output() handles program_state.restoring and program_state.done_hup (tty hangup => no further output at all) @@ -283,7 +283,7 @@ timebot(void) bot(); } } - display.time_botl = FALSE; + disp.time_botl = FALSE; } /* convert experience level (1..30) to rank index (0..8) */ @@ -1170,7 +1170,7 @@ cond_menu(void) if (condtests[i].enabled != condtests[i].choice) { condtests[i].enabled = condtests[i].choice; condtests[idx].test = FALSE; - display.botl = changed = TRUE; + disp.botl = changed = TRUE; } } return changed; @@ -1368,9 +1368,9 @@ evaluate_and_notify_windowport( * fields that have changed since the previous update. * * In both of those situations, we need to force updates to - * all of the fields when display.botlx is set. The tty port in + * all of the fields when disp.botlx is set. The tty port in * particular has a problem if that isn't done, since the core sets - * display.botlx when a menu or text display obliterates the status + * disp.botlx when a menu or text display obliterates the status * line. * * For those situations, to trigger the full update of every field @@ -1382,15 +1382,15 @@ evaluate_and_notify_windowport( * the display, call status_update() with BL_FLUSH. * */ - if (display.botlx && (windowprocs.wincap2 & WC2_RESET_STATUS) != 0L) + if (disp.botlx && (windowprocs.wincap2 & WC2_RESET_STATUS) != 0L) status_update(BL_RESET, (genericptr_t) 0, 0, 0, NO_COLOR, (unsigned long *) 0); - else if ((updated || display.botlx) + else if ((updated || disp.botlx) && (windowprocs.wincap2 & WC2_FLUSH_STATUS) != 0L) status_update(BL_FLUSH, (genericptr_t) 0, 0, 0, NO_COLOR, (unsigned long *) 0); - display.botl = display.botlx = display.time_botl = FALSE; + disp.botl = disp.botlx = disp.time_botl = FALSE; gu.update_all = FALSE; } @@ -1427,7 +1427,7 @@ status_initialize( status_enablefield(fld, fieldname, fieldfmt, fldenabl); } gu.update_all = TRUE; - display.botlx = TRUE; + disp.botlx = TRUE; } void @@ -1805,7 +1805,7 @@ exp_percent_changing(void) struct istat_s *curr; /* if status update is already requested, skip this processing */ - if (!display.botl) { + if (!disp.botl) { /* * Status update is warranted iff percent integer changes and the new * percentage results in a different highlighting rule being selected. @@ -1824,7 +1824,7 @@ exp_percent_changing(void) rule = get_hilite(gn.now_or_before_idx, BL_XP, (genericptr_t) &a, 0, pc, &color_dummy); if (rule != curr->hilite_rule) - return TRUE; /* caller should set 'display.botl' to True */ + return TRUE; /* caller should set 'disp.botl' to True */ #endif } } @@ -1994,9 +1994,9 @@ status_eval_next_unhilite(void) prev->time = curr->time; curr->chg = prev->chg = FALSE; - display.botl = TRUE; + disp.botl = TRUE; } - if (display.botl) + if (disp.botl) continue; /* just process other gb.blstats[][].time and .chg */ this_unhilite = curr->time; @@ -2005,7 +2005,7 @@ status_eval_next_unhilite(void) && hilite_reset_needed(curr, this_unhilite + 1L)) { next_unhilite = this_unhilite; if (next_unhilite < gb.bl_hilite_moves) - display.botl = TRUE; + disp.botl = TRUE; } } } @@ -2021,7 +2021,7 @@ reset_status_hilites(void) gb.blstats[0][i].time = gb.blstats[1][i].time = 0L; gu.update_all = TRUE; } - display.botlx = TRUE; + disp.botlx = TRUE; } /* test whether the text from a title rule matches the string for diff --git a/src/cmd.c b/src/cmd.c index 9dba78501..df64b3083 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2122,7 +2122,7 @@ wiz_intrinsic(void) def_feedback: if (p != GLIB) incr_itimeout(&u.uprops[p].intrinsic, amt); - display.botl = TRUE; /* have pline() do a status update */ + disp.botl = TRUE; /* have pline() do a status update */ pline("Timeout for %s %s %d.", propname, oldtimeout ? "increased by" : "set to", amt); break; diff --git a/src/decl.c b/src/decl.c index f7efbbf57..c7bcd431e 100644 --- a/src/decl.c +++ b/src/decl.c @@ -189,7 +189,7 @@ const struct Race urace_init_data = { { 1, 0, 2, 0, 2, 0 } /* Energy */ }; -struct display_hints display = { 0 }; +struct display_hints disp = { 0 }; const struct instance_globals_a g_init_a = { /* artifact.c */ @@ -1062,7 +1062,7 @@ decl_globals_init(void) ZERO(flags); ZERO(iflags); ZERO(a11y); - ZERO(display); + ZERO(disp); ZERO(u); ZERO(ubirthday); ZERO(urealtime); diff --git a/src/dig.c b/src/dig.c index 987241adc..0b3dd590e 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1096,7 +1096,7 @@ use_pick_axe2(struct obj *obj) You("hit yourself with %s.", yname(uwep)); Sprintf(buf, "%s own %s", uhis(), OBJ_NAME(objects[obj->otyp])); losehp(Maybe_Half_Phys(dam), buf, KILLED_BY); - display.botl = TRUE; + disp.botl = TRUE; return ECMD_TIME; } else if (u.dz == 0) { confdir(FALSE); diff --git a/src/display.c b/src/display.c index 3dce44cef..f95e8c3ff 100644 --- a/src/display.c +++ b/src/display.c @@ -1670,7 +1670,7 @@ docrt_flags(int refresh_flags) /* perm_invent */ update_inventory(); /* status */ - display.botlx = TRUE; /* force a redraw of the bottom lines */ + disp.botlx = TRUE; /* force a redraw of the bottom lines */ /* note: caller needs to call bot() to actually redraw status */ } gp.program_state.in_docrt = FALSE; @@ -2045,7 +2045,7 @@ cls(void) return; in_cls = TRUE; display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */ - display.botlx = TRUE; /* force update of botl window */ + disp.botlx = TRUE; /* force update of botl window */ clear_nhwindow(WIN_MAP); /* clear physical screen */ clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */ @@ -2084,9 +2084,9 @@ flush_screen(int cursor_on_u) #endif /* get this done now, before we place the cursor on the hero */ - if (display.botl || display.botlx) + if (disp.botl || disp.botlx) bot(); - else if (display.time_botl) + else if (disp.time_botl) timebot(); for (y = 0; y < ROWNO; y++) { diff --git a/src/do.c b/src/do.c index 5dac8f70f..8cac9bfa5 100644 --- a/src/do.c +++ b/src/do.c @@ -2377,7 +2377,7 @@ set_wounded_legs(long side, int timex) * You still call this function, but don't lose hp. * Caller is also responsible for adjusting messages. */ - display.botl = TRUE; + disp.botl = TRUE; if (!Wounded_legs) ATEMP(A_DEX)--; @@ -2397,7 +2397,7 @@ heal_legs( int how) /* 0: ordinary, 1: dismounting steed, 2: limbs turn to stone */ { if (Wounded_legs) { - display.botl = TRUE; + disp.botl = TRUE; if (ATEMP(A_DEX) < 0) ATEMP(A_DEX)++; diff --git a/src/do_wear.c b/src/do_wear.c index 23a5344ab..305ab8de8 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -213,7 +213,7 @@ Boots_on(void) * so uarmf could be Null below; status line * gets updated during brief interval they're * worn so hero and player learn enchantment */ - display.botl = TRUE; /* status hilites might mark AC changed */ + disp.botl = TRUE; /* status hilites might mark AC changed */ makeknown(uarmf->otyp); float_up(); if (Levitation) @@ -428,7 +428,7 @@ Helmet_on(void) but it takes trained arrogance to pull it off, and the actual enchantment of the hat is irrelevant */ ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1); - display.botl = TRUE; + disp.botl = TRUE; makeknown(uarmh->otyp); break; case HELM_OF_OPPOSITE_ALIGNMENT: @@ -460,7 +460,7 @@ Helmet_on(void) else if (uarmh->bknown) update_inventory(); /* keep bknown as-is; display the curse */ } - display.botl = TRUE; /* reveal new alignment or INT & WIS */ + disp.botl = TRUE; /* reveal new alignment or INT & WIS */ if (Hallucination) { pline("My brain hurts!"); /* Monty Python's Flying Circus */ } else if (uarmh && uarmh->otyp == DUNCE_CAP) { @@ -499,12 +499,12 @@ Helmet_off(void) case ORCISH_HELM: break; case DUNCE_CAP: - display.botl = TRUE; + disp.botl = TRUE; break; case CORNUTHAUM: if (!gc.context.takeoff.cancelled_don) { ABON(A_CHA) += (Role_if(PM_WIZARD) ? -1 : 1); - display.botl = TRUE; + disp.botl = TRUE; } break; case HELM_OF_TELEPATHY: @@ -555,7 +555,7 @@ Gloves_on(void) break; case GAUNTLETS_OF_POWER: makeknown(uarmg->otyp); - display.botl = TRUE; /* taken care of in attrib.c */ + disp.botl = TRUE; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: adj_abon(uarmg, uarmg->spe); @@ -629,7 +629,7 @@ Gloves_off(void) break; case GAUNTLETS_OF_POWER: makeknown(uarmg->otyp); - display.botl = TRUE; /* taken care of in attrib.c */ + disp.botl = TRUE; /* taken care of in attrib.c */ break; case GAUNTLETS_OF_DEXTERITY: if (!gc.context.takeoff.cancelled_don) @@ -664,7 +664,7 @@ Gloves_off(void) wielding_corpse(uswapwep, gloves, on_purpose); if (condtests[bl_bareh].enabled) - display.botl = TRUE; + disp.botl = TRUE; return 0; } @@ -959,7 +959,7 @@ Amulet_on(void) makeknown(AMULET_OF_CHANGE); You("are suddenly very %s!", flags.female ? "feminine" : "masculine"); - display.botl = TRUE; + disp.botl = TRUE; newsym(u.ux, u.uy); /* glyphmon flag and tile may have gone * from male to female or vice versa */ } else { @@ -978,7 +978,7 @@ Amulet_on(void) if (can_be_strangled(&gy.youmonst)) { makeknown(AMULET_OF_STRANGULATION); Strangled = 6L; - display.botl = TRUE; + disp.botl = TRUE; pline("It constricts your throat!"); } break; @@ -1005,7 +1005,7 @@ Amulet_on(void) if (!already_flying) { makeknown(AMULET_OF_FLYING); - display.botl = TRUE; /* status: 'Fly' On */ + disp.botl = TRUE; /* status: 'Fly' On */ You("are now in flight."); } } @@ -1053,7 +1053,7 @@ Amulet_off(void) case AMULET_OF_STRANGULATION: if (Strangled) { Strangled = 0L; - display.botl = TRUE; + disp.botl = TRUE; if (Breathless) Your("%s is no longer constricted!", body_part(NECK)); else @@ -1074,7 +1074,7 @@ Amulet_off(void) float_vs_flight(); /* probably not needed here */ if (was_flying && !Flying) { makeknown(AMULET_OF_FLYING); - display.botl = TRUE; /* status: 'Fly' Off */ + disp.botl = TRUE; /* status: 'Fly' Off */ You("%s.", (is_pool_or_lava(u.ux, u.uy) || Is_waterlevel(&u.uz) || Is_airlevel(&u.uz)) ? "stop flying" @@ -1140,7 +1140,7 @@ adjust_attrib(struct obj *obj, int which, int val) already discovered, both handled by learnring()] */ if (observable || !extremeattr(which)) learnring(obj, observable); - display.botl = TRUE; + disp.botl = TRUE; } void @@ -2118,7 +2118,7 @@ accessory_or_armor_on(struct obj *obj) You("are suddenly overcome with shame and change your mind."); u.ublessed = 0; /* lose your god's protection */ makeknown(obj->otyp); - display.botl = TRUE; /* for AC after zeroing u.ublessed */ + disp.botl = TRUE; /* for AC after zeroing u.ublessed */ return ECMD_TIME; } } else { @@ -2391,7 +2391,7 @@ find_ac(void) if (uac != u.uac) { u.uac = uac; - display.botl = TRUE; + disp.botl = TRUE; #if 0 /* these could conceivably be achieved out of order (by being near threshold and putting on +N dragon scale mail from bones, for @@ -3120,7 +3120,7 @@ adj_abon(register struct obj *otmp, register schar delta) makeknown(uarmg->otyp); ABON(A_DEX) += (delta); } - display.botl = TRUE; + disp.botl = TRUE; } if (uarmh && uarmh == otmp && otmp->otyp == HELM_OF_BRILLIANCE) { if (delta) { @@ -3128,7 +3128,7 @@ adj_abon(register struct obj *otmp, register schar delta) ABON(A_INT) += (delta); ABON(A_WIS) += (delta); } - display.botl = TRUE; + disp.botl = TRUE; } } diff --git a/src/eat.c b/src/eat.c index 6a7c95c1e..4668cef36 100644 --- a/src/eat.c +++ b/src/eat.c @@ -124,7 +124,7 @@ is_edible(register struct obj *obj) void init_uhunger(void) { - display.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0); + disp.botl = (u.uhs != NOT_HUNGRY || ATEMP(A_STR) < 0); u.uhunger = 900; u.uhs = NOT_HUNGRY; if (ATEMP(A_STR) < 0) { @@ -654,7 +654,7 @@ eat_brains( ABASE(A_INT) += rnd(4); if (ABASE(A_INT) > AMAX(A_INT)) ABASE(A_INT) = AMAX(A_INT); - display.botl = TRUE; + disp.botl = TRUE; } exercise(A_WIS, TRUE); *dmg_p += xtra_dmg; @@ -1085,7 +1085,7 @@ eye_of_newt_buzz(void) } if (old_uen != u.uen) { You_feel("a mild buzz."); - display.botl = TRUE; + disp.botl = TRUE; } } } @@ -1124,7 +1124,7 @@ cpostfx(int pm) else u.uhp = u.uhpmax; make_blinded(0L, !u.ucreamed); - display.botl = TRUE; + disp.botl = TRUE; check_intrinsics = TRUE; /* might also convey poison resistance */ break; case PM_STALKER: @@ -1441,7 +1441,7 @@ set_tin_variety(struct obj *obj, int forcetype) static int tin_variety(struct obj *obj, - boolean disp) /* we're just displaying so leave things alone */ + boolean displ) /* we're just displaying so leave things alone */ { register int r; @@ -1455,7 +1455,7 @@ tin_variety(struct obj *obj, } else r = rn2(TTSZ - 1); - if (!disp && r == HOMEMADE_TIN && !obj->blessed && !rn2(7)) + if (!displ && r == HOMEMADE_TIN && !obj->blessed && !rn2(7)) r = ROTTEN_TIN; /* some homemade tins go bad */ if (r == ROTTEN_TIN && nonrotting_corpse(obj->corpsenm)) @@ -1708,7 +1708,7 @@ Hear_again(void) /* Chance of deafness going away while fainted/sleeping/etc. */ if (!rn2(2)) { make_deaf(0L, FALSE); - display.botl = TRUE; + disp.botl = TRUE; } return 0; } @@ -1744,7 +1744,7 @@ rottenfood(struct obj *obj) where = (u.usteed) ? "saddle" : surface(u.ux, u.uy); pline_The("world spins and %s %s.", what, where); incr_itimeout(&HDeaf, duration); - display.botl = TRUE; + disp.botl = TRUE; nomul(-duration); gm.multi_reason = "unconscious from rotten food"; gn.nomovemsg = "You are conscious again."; @@ -2240,7 +2240,7 @@ eataccessory(struct obj *otmp) (typ == RIN_PROTECTION) ? otmp->spe : 2, /* fixed amount for amulet */ typ); - display.botl = TRUE; + disp.botl = TRUE; break; case RIN_FREE_ACTION: /* Give sleep resistance instead */ @@ -2256,7 +2256,7 @@ eataccessory(struct obj *otmp) change_sex(); You("are suddenly very %s!", flags.female ? "feminine" : "masculine"); - display.botl = TRUE; + disp.botl = TRUE; break; case AMULET_OF_UNCHANGING: /* un-change: it's a pun */ @@ -2418,7 +2418,7 @@ fpostfx(struct obj *otmp) /* This stuff seems to be VERY healthy! */ gainstr(otmp, 1, TRUE); if (Upolyd) { - u.mh += otmp->cursed ? -rnd(20) : rnd(20), display.botl = TRUE; + u.mh += otmp->cursed ? -rnd(20) : rnd(20), disp.botl = TRUE; if (u.mh > u.mhmax) { if (!rn2(17)) u.mhmax++; @@ -2427,7 +2427,7 @@ fpostfx(struct obj *otmp) rehumanize(); } } else { - u.uhp += otmp->cursed ? -rnd(20) : rnd(20), display.botl = TRUE; + u.uhp += otmp->cursed ? -rnd(20) : rnd(20), disp.botl = TRUE; if (u.uhp > u.uhpmax) { if (!rn2(17)) setuhpmax(u.uhpmax + 1); @@ -3204,7 +3204,7 @@ unfaint(void) if (u.uhs > FAINTING) u.uhs = FAINTING; stop_occupation(); - display.botl = TRUE; + disp.botl = TRUE; return 0; } @@ -3286,7 +3286,7 @@ newuhs(boolean incr) stop_occupation(); You("faint from lack of food."); incr_itimeout(&HDeaf, duration); - display.botl = TRUE; + disp.botl = TRUE; nomul(-duration); gm.multi_reason = "fainted from lack of food"; gn.nomovemsg = "You regain consciousness."; @@ -3301,7 +3301,7 @@ newuhs(boolean incr) now uhunger becomes more negative at a slower rate */ } else if (u.uhunger < -(100 + 10 * (int) ACURR(A_CON))) { u.uhs = STARVED; - display.botl = TRUE; + disp.botl = TRUE; bot(); You("die from starvation."); gk.killer.format = KILLED_BY; @@ -3365,7 +3365,7 @@ newuhs(boolean incr) break; } u.uhs = newhs; - display.botl = TRUE; + disp.botl = TRUE; bot(); if ((Upolyd ? u.mh : u.uhp) < 1) { You("die from hunger and exhaustion."); diff --git a/src/end.c b/src/end.c index e996d11d5..f63abcecd 100644 --- a/src/end.c +++ b/src/end.c @@ -1206,7 +1206,7 @@ savelife(int how) if (u.utrap && u.utraptype == TT_LAVA) reset_utrap(FALSE); - display.botl = TRUE; + disp.botl = TRUE; u.ugrave_arise = NON_PM; HUnchanging = 0L; curs_on_u(); @@ -1501,10 +1501,10 @@ done(int how) || (how == QUIT && done_stopprint)) { /* skip status update if panicking or disconnected or answer of 'q' to "Really quit?" */ - display.botl = display.botlx = display.time_botl = FALSE; + disp.botl = disp.botlx = disp.time_botl = FALSE; } else { /* otherwise force full status update */ - display.botlx = TRUE; + disp.botlx = TRUE; bot(); } @@ -1537,7 +1537,7 @@ done(int how) negative (-1 is used as a flag in some circumstances which don't apply when actually dying due to HP loss) */ u.uhp = u.mh = 0; - display.botl = TRUE; + disp.botl = TRUE; } } if (Lifesaved && (how <= GENOCIDED)) { diff --git a/src/exper.c b/src/exper.c index cc1a1fb5c..0ec9ae585 100644 --- a/src/exper.c +++ b/src/exper.c @@ -183,19 +183,19 @@ more_experienced(register int exper, register int rexp) if (newexp != oldexp) { u.uexp = newexp; if (flags.showexp) - display.botl = TRUE; + disp.botl = TRUE; /* even when experience points aren't being shown, experience level might be highlighted with a percentage highlight rule and that percentage depends upon experience points */ - if (!display.botl && exp_percent_changing()) - display.botl = TRUE; + if (!disp.botl && exp_percent_changing()) + disp.botl = TRUE; } /* newrexp will always differ from oldrexp unless they're LONG_MAX */ if (newrexp != oldrexp) { u.urexp = newrexp; #ifdef SCORE_ON_BOTL if (flags.showscore) - display.botl = TRUE; + disp.botl = TRUE; #endif } if (u.urexp >= (Role_if(PM_WIZARD) ? 1000 : 2000)) @@ -283,7 +283,7 @@ losexp( rehumanize(); } - display.botl = TRUE; + disp.botl = TRUE; } /* @@ -362,7 +362,7 @@ pluslvl( if (u.ulevel > u.ulevelpeak) u.ulevelpeak = u.ulevel; } - display.botl = TRUE; + disp.botl = TRUE; } /* compute a random amount of experience points suitable for the hero's diff --git a/src/explode.c b/src/explode.c index 1790fef41..5f56a36ba 100644 --- a/src/explode.c +++ b/src/explode.c @@ -630,7 +630,7 @@ explode( u.mh -= damu; else u.uhp -= damu; - display.botl = TRUE; + disp.botl = TRUE; } /* You resisted the damage, lets not keep that to ourselves */ diff --git a/src/fountain.c b/src/fountain.c index 5f285f9cc..caa1b3e8a 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -259,7 +259,7 @@ drinkfountain(void) for (ii = 0; ii < A_MAX; ii++) if (ABASE(ii) < AMAX(ii)) { ABASE(ii) = AMAX(ii); - display.botl = TRUE; + disp.botl = TRUE; } /* gain ability, blessed if "natural" luck is high */ i = rn2(A_MAX); /* start at a random attribute */ diff --git a/src/hack.c b/src/hack.c index 9f00d29af..ad7cbd74d 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2528,7 +2528,7 @@ domove_core(void) boolean moved = trapmove(x, y, trap); if (!u.utrap) { - display.botl = TRUE; + disp.botl = TRUE; reset_utrap(TRUE); /* might resume levitation or flight */ } /* might not have escaped, or did escape but remain in same spot */ @@ -2693,7 +2693,7 @@ runmode_delay_output(void) display after every step */ if (flags.runmode != RUN_LEAP || !(gm.moves % 7L)) { /* moveloop() suppresses time_botl when running */ - display.time_botl = flags.time; + disp.time_botl = flags.time; curs_on_u(); nh_delay_output(); if (flags.runmode == RUN_CRAWL) { @@ -2728,7 +2728,7 @@ overexert_hp(void) if (*hp > 1) { *hp -= 1; - display.botl = TRUE; + disp.botl = TRUE; } else { You("pass out from exertion!"); exercise(A_CON, FALSE); @@ -2813,7 +2813,7 @@ switch_terrain(void) You("start flying."); } if ((!!Levitation ^ was_levitating) || (!!Flying ^ was_flying)) - display.botl = TRUE; /* update Lev/Fly status condition */ + disp.botl = TRUE; /* update Lev/Fly status condition */ } /* set or clear u.uinwater */ @@ -3724,7 +3724,7 @@ end_running(boolean and_travel) /* moveloop() suppresses time_botl when context.run is non-zero; when running stops, update 'time' even if other botl status is unchanged */ if (flags.time && gc.context.run) - display.time_botl = TRUE; + disp.time_botl = TRUE; gc.context.run = 0; /* 'context.mv' isn't travel but callers who want to end travel all clear it too */ @@ -3744,7 +3744,7 @@ nomul(int nval) { if (gm.multi < nval) return; /* This is a bug fix by ab@unido */ - display.botl |= (gm.multi >= 0); + disp.botl |= (gm.multi >= 0); u.uinvulnerable = FALSE; /* Kludge to avoid ctrl-C bug -dlc */ u.usleep = 0; gm.multi = nval; @@ -3758,7 +3758,7 @@ nomul(int nval) void unmul(const char *msg_override) { - display.botl = TRUE; + disp.botl = TRUE; gm.multi = 0; /* caller will usually have done this already */ if (msg_override) gn.nomovemsg = msg_override; @@ -3852,7 +3852,7 @@ losehp(int n, const char *knam, schar k_format) return; } #endif - display.botl = TRUE; /* u.uhp or u.mh is changing */ + disp.botl = TRUE; /* u.uhp or u.mh is changing */ end_running(TRUE); if (Upolyd) { u.mh -= n; diff --git a/src/invent.c b/src/invent.c index d2e50f1cd..d1da6bf9b 100644 --- a/src/invent.c +++ b/src/invent.c @@ -970,7 +970,7 @@ void addinv_core1(struct obj *obj) { if (obj->oclass == COIN_CLASS) { - display.botl = TRUE; + disp.botl = TRUE; } else if (obj->otyp == AMULET_OF_YENDOR) { if (u.uhave.amulet) impossible("already have amulet?"); @@ -1330,7 +1330,7 @@ void freeinv_core(struct obj *obj) { if (obj->oclass == COIN_CLASS) { - display.botl = TRUE; + disp.botl = TRUE; return; } else if (obj->otyp == AMULET_OF_YENDOR) { if (!u.uhave.amulet) @@ -1361,7 +1361,7 @@ freeinv_core(struct obj *obj) curse(obj); } else if (confers_luck(obj)) { set_moreluck(); - display.botl = TRUE; + disp.botl = TRUE; } else if (obj->otyp == FIGURINE && obj->timed) { (void) stop_timer(FIG_TRANSFORM, obj_to_any(obj)); } @@ -1992,7 +1992,7 @@ getobj( continue; } } - display.botl = TRUE; /* May have changed the amount of money */ + disp.botl = TRUE; /* May have changed the amount of money */ if (otmp && !gi.in_doagain) { if (cntgiven && cnt > 0) cmdq_add_int(CQ_REPEAT, cnt); diff --git a/src/mhitu.c b/src/mhitu.c index e0339fb4d..7efec2e19 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -261,7 +261,7 @@ expels( struct permonst *mdat, /* if mtmp is polymorphed, mdat != mtmp->data */ boolean message) { - display.botl = TRUE; + disp.botl = TRUE; if (message) { if (digests(mdat)) { You("get regurgitated!"); @@ -858,7 +858,7 @@ mattacku(register struct monst *mtmp) default: /* no attack */ break; } - if (display.botl) + if (disp.botl) bot(); /* give player a chance of waking up before dying -kaa */ if (sum[i] == M_ATTK_HIT) { /* successful attack */ @@ -1173,7 +1173,7 @@ hitmu(register struct monst *mtmp, register struct attack *mattk) *hpmax_p = lowerlimit; /* else unlikely... * already at or below minimum threshold; do nothing */ - display.botl = TRUE; + disp.botl = TRUE; } mdamageu(mtmp, mhm.damage); @@ -1811,7 +1811,7 @@ gazemu(struct monst *mtmp, struct attack *mattk) void mdamageu(struct monst *mtmp, int n) { - display.botl = TRUE; + disp.botl = TRUE; if (Upolyd) { u.mh -= n; if (u.mh < 1) @@ -2089,13 +2089,13 @@ doseduce(struct monst *mon) You("are down in the dumps."); (void) adjattrib(A_CON, -1, TRUE); exercise(A_CON, FALSE); - display.botl = TRUE; + disp.botl = TRUE; break; case 2: Your("senses are dulled."); (void) adjattrib(A_WIS, -1, TRUE); exercise(A_WIS, FALSE); - display.botl = TRUE; + disp.botl = TRUE; break; case 3: if (!resists_drli(&gy.youmonst)) { @@ -2133,13 +2133,13 @@ doseduce(struct monst *mon) You_feel("good enough to do it again."); (void) adjattrib(A_CON, 1, TRUE); exercise(A_CON, TRUE); - display.botl = TRUE; + disp.botl = TRUE; break; case 2: You("will always remember %s...", noit_mon_nam(mon)); (void) adjattrib(A_WIS, 1, TRUE); exercise(A_WIS, TRUE); - display.botl = TRUE; + disp.botl = TRUE; break; case 3: pline("That was a very educational experience."); @@ -2152,7 +2152,7 @@ doseduce(struct monst *mon) if (Upolyd) u.mh = u.mhmax; exercise(A_STR, TRUE); - display.botl = TRUE; + disp.botl = TRUE; break; } } @@ -2186,7 +2186,7 @@ doseduce(struct monst *mon) pline("%s takes %ld %s for services rendered!", noit_Monnam(mon), cost, currency(cost)); money2mon(mon, cost); - display.botl = TRUE; + disp.botl = TRUE; } } if (!rn2(25)) @@ -2458,7 +2458,7 @@ cloneu(void) mon->mhpmax = u.mhmax; mon->mhp = u.mh / 2; u.mh -= mon->mhp; - display.botl = TRUE; + disp.botl = TRUE; return mon; } diff --git a/src/minion.c b/src/minion.c index 61065d698..0875c15c4 100644 --- a/src/minion.c +++ b/src/minion.c @@ -377,7 +377,7 @@ bribe(struct monst *mtmp) You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); } (void) money2mon(mtmp, offer); - display.botl = TRUE; + disp.botl = TRUE; return offer; } diff --git a/src/mon.c b/src/mon.c index eac02e395..cfc773a3e 100644 --- a/src/mon.c +++ b/src/mon.c @@ -3126,7 +3126,7 @@ set_ustuck(struct monst *mtmp) mon_nam(mtmp), mdistu(mtmp)); } - display.botl = TRUE; + disp.botl = TRUE; u.ustuck = mtmp; if (!u.ustuck) { u.uswallow = 0; diff --git a/src/monmove.c b/src/monmove.c index 147063f92..63a7ee7f5 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -2010,7 +2010,7 @@ void set_apparxy(register struct monst *mtmp) { boolean notseen, notthere, gotu; - int disp; + int displ; coordxy mx = mtmp->mux, my = mtmp->muy; long umoney = money_cnt(gi.invent); @@ -2030,17 +2030,17 @@ set_apparxy(register struct monst *mtmp) notthere = (Displaced && mtmp->data != &mons[PM_DISPLACER_BEAST]); /* add cases as required. eg. Displacement ... */ if (Underwater) { - disp = 1; + displ = 1; } else if (notseen) { /* Xorns can smell quantities of valuable metal like that in solid gold coins, treat as seen */ - disp = (mtmp->data == &mons[PM_XORN] && umoney) ? 0 : 1; + displ = (mtmp->data == &mons[PM_XORN] && umoney) ? 0 : 1; } else if (notthere) { - disp = couldsee(mx, my) ? 2 : 1; + displ = couldsee(mx, my) ? 2 : 1; } else { - disp = 0; + displ = 0; } - if (!disp) { + if (!displ) { mtmp->mux = u.ux; mtmp->muy = u.uy; return; @@ -2059,10 +2059,10 @@ set_apparxy(register struct monst *mtmp) my = u.uy; break; /* punt */ } - mx = u.ux - disp + rn2(2 * disp + 1); - my = u.uy - disp + rn2(2 * disp + 1); + mx = u.ux - displ + rn2(2 * displ + 1); + my = u.uy - displ + rn2(2 * displ + 1); } while (!isok(mx, my) - || (disp != 2 && mx == mtmp->mx && my == mtmp->my) + || (displ != 2 && mx == mtmp->mx && my == mtmp->my) || ((mx != u.ux || my != u.uy) && !passes_walls(mtmp->data) && !(accessible(mx, my) || (closed_door(mx, my) diff --git a/src/music.c b/src/music.c index b244e887f..a283d1b7a 100644 --- a/src/music.c +++ b/src/music.c @@ -706,7 +706,7 @@ do_improvisation(struct obj* instr) Hero_playnotes(obj_to_instr(&itmp), improvisation, 50); } awaken_monsters(u.ulevel * (mundane ? 5 : 40)); - display.botl = TRUE; + disp.botl = TRUE; break; default: impossible("What a weird instrument (%d)!", instr->otyp); diff --git a/src/objnam.c b/src/objnam.c index a0a0fae17..571aa8cce 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -4262,7 +4262,7 @@ readobjnam_postparse1(struct _readobjnam_data *d) d->otmp = mksobj(GOLD_PIECE, FALSE, FALSE); d->otmp->quan = (long) d->cnt; d->otmp->owt = weight(d->otmp); - display.botl = TRUE; + disp.botl = TRUE; return 3; /*return otmp;*/ } diff --git a/src/options.c b/src/options.c index ebba619c1..dabbc7e7f 100644 --- a/src/options.c +++ b/src/options.c @@ -5013,7 +5013,7 @@ optfn_boolean( case opt_showexp: if (VIA_WINDOWPORT()) status_initialize(REASSESS_ONLY); - display.botl = TRUE; + disp.botl = TRUE; break; case opt_fixinv: case opt_sortpack: @@ -5069,7 +5069,7 @@ optfn_boolean( } else if (WINDOWPORT(Qt)) { /* Qt doesn't support HILITE_STATUS or FLUSH_STATUS so fails VIA_WINDOWPORT(), but it does support WC2_HITPOINTBAR */ - display.botlx = TRUE; + disp.botlx = TRUE; #endif } break; @@ -8715,7 +8715,7 @@ doset_simple(void) /* * I don't think the status window requires updating between * simplemenu iterations. - if (display.botl || display.botlx) { + if (disp.botl || disp.botlx) { bot(); } */ @@ -8970,7 +8970,7 @@ doset(void) /* changing options via menu by Per Liboriussen */ if (go.opt_need_promptstyle) { adjust_menu_promptstyle(WIN_INVEN, &iflags.menu_headings); } - if (display.botl || display.botlx) { + if (disp.botl || disp.botlx) { bot(); } return ECMD_OK; diff --git a/src/pickup.c b/src/pickup.c index 9a1b6e386..65081f2b8 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1841,7 +1841,7 @@ pickup_object( /* Whats left of the special case for gold :-) */ if (obj->oclass == COIN_CLASS) - display.botl = TRUE; + disp.botl = TRUE; if (obj->quan != count && obj->otyp != LOADSTONE) obj = splitobj(obj, count); @@ -1960,7 +1960,7 @@ encumber_msg(void) newcap == 4 ? "can barely" : "can't even"); break; } - display.botl = TRUE; + disp.botl = TRUE; } else if (go.oldcap > newcap) { switch (newcap) { case 0: @@ -1977,7 +1977,7 @@ encumber_msg(void) stagger(gy.youmonst.data, "stagger")); break; } - display.botl = TRUE; + disp.botl = TRUE; } go.oldcap = newcap; diff --git a/src/polyself.c b/src/polyself.c index c40e088ff..dd6b7d398 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -143,7 +143,7 @@ float_vs_flight(void) might cause a change in stealth */ steed_vs_stealth(); - display.botl = TRUE; + disp.botl = TRUE; } /* riding blocks stealth unless hero+steed fly */ @@ -169,7 +169,7 @@ check_strangling(boolean on) if (uamul && uamul->otyp == AMULET_OF_STRANGULATION && can_be_strangled(&gy.youmonst)) { Strangled = 6L; - display.botl = TRUE; + disp.botl = TRUE; Your("%s %s your %s!", simpleonames(uamul), was_strangled ? "still constricts" : "begins constricting", body_part(NECK)); /* "throat" */ @@ -180,7 +180,7 @@ check_strangling(boolean on) } else { if (Strangled && !can_be_strangled(&gy.youmonst)) { Strangled = 0L; - display.botl = TRUE; + disp.botl = TRUE; You("are no longer being strangled."); } } @@ -445,7 +445,7 @@ newman(void) make_slimed(10L, (const char *) 0); } - display.botl = TRUE; + disp.botl = TRUE; see_monsters(); (void) encumber_msg(); @@ -640,7 +640,7 @@ polyself(int psflags) of evaporation due to over enchanting */ uarm->otyp += GRAY_DRAGON_SCALES - GRAY_DRAGON_SCALE_MAIL; uarm->dknown = 1; - display.botl = TRUE; /* AC is changing */ + disp.botl = TRUE; /* AC is changing */ } uskin = uarm; uarm = (struct obj *) 0; @@ -1002,7 +1002,7 @@ polymon(int mntmp) } check_strangling(TRUE); /* maybe start strangling */ - display.botl = TRUE; + disp.botl = TRUE; gv.vision_full_recalc = 1; see_monsters(); (void) encumber_msg(); @@ -1380,7 +1380,7 @@ rehumanize(void) } nomul(0); - display.botl = TRUE; + disp.botl = TRUE; gv.vision_full_recalc = 1; (void) encumber_msg(); if (was_flying && !Flying && u.usteed) @@ -1405,7 +1405,7 @@ dobreathe(void) return ECMD_OK; } u.uen -= 15; - display.botl = TRUE; + disp.botl = TRUE; if (!getdir((char *) 0)) return ECMD_CANCEL; @@ -1602,7 +1602,7 @@ dosummon(void) return ECMD_OK; } u.uen -= 10; - display.botl = TRUE; + disp.botl = TRUE; You("call upon your brethren for help!"); exercise(A_WIS, TRUE); @@ -1643,7 +1643,7 @@ dogaze(void) return ECMD_OK; } u.uen -= 15; - display.botl = TRUE; + disp.botl = TRUE; for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) @@ -1878,7 +1878,7 @@ domindblast(void) return ECMD_OK; } u.uen -= 10; - display.botl = TRUE; + disp.botl = TRUE; You("concentrate."); pline("A wave of psychic energy pours out."); @@ -2158,7 +2158,7 @@ ugolemeffects(int damtype, int dam) u.mh += heal; if (u.mh > u.mhmax) u.mh = u.mhmax; - display.botl = TRUE; + disp.botl = TRUE; pline("Strangely, you feel better than before."); exercise(A_STR, TRUE); } diff --git a/src/potion.c b/src/potion.c index 3e0d24d59..7c94177c6 100644 --- a/src/potion.c +++ b/src/potion.c @@ -96,7 +96,7 @@ make_confused(long xtime, boolean talk) You_feel("less %s now.", Hallucination ? "trippy" : "confused"); } if ((xtime && !old) || (!xtime && old)) - display.botl = TRUE; + disp.botl = TRUE; set_itimeout(&HConfusion, xtime); } @@ -123,7 +123,7 @@ make_stunned(long xtime, boolean talk) } } if ((!xtime && old) || (xtime && !old)) - display.botl = TRUE; + disp.botl = TRUE; set_itimeout(&HStun, xtime); } @@ -157,7 +157,7 @@ make_sick(long xtime, } set_itimeout(&Sick, xtime); u.usick_type |= type; - display.botl = TRUE; + disp.botl = TRUE; } else if (old && (type & u.usick_type)) { /* was sick, now not */ u.usick_type &= ~type; @@ -170,7 +170,7 @@ make_sick(long xtime, You_feel("cured. What a relief!"); Sick = 0L; /* set_itimeout(&Sick, 0L) */ } - display.botl = TRUE; + disp.botl = TRUE; } kptr = find_delayed_killer(SICK); @@ -200,7 +200,7 @@ make_slimed(long xtime, const char *msg) #endif set_itimeout(&Slimed, xtime); if ((xtime != 0L) ^ (old != 0L)) { - display.botl = TRUE; + disp.botl = TRUE; if (msg) pline("%s", msg); } @@ -227,7 +227,7 @@ make_stoned(long xtime, const char *msg, int killedby, const char *killername) #endif set_itimeout(&Stoned, xtime); if ((xtime != 0L) ^ (old != 0L)) { - display.botl = TRUE; + disp.botl = TRUE; if (msg) pline("%s", msg); } @@ -246,7 +246,7 @@ make_vomiting(long xtime, boolean talk) talk = FALSE; set_itimeout(&Vomiting, xtime); - display.botl = TRUE; + disp.botl = TRUE; if (!xtime && old) if (talk) You_feel("much less nauseated now."); @@ -336,7 +336,7 @@ toggle_blindness(void) boolean Stinging = (uwep && (EWarn_of_mon & W_WEP) != 0L); /* blindness has just been toggled */ - display.botl = TRUE; /* status conditions need update */ + disp.botl = TRUE; /* status conditions need update */ gv.vision_full_recalc = 1; /* vision has changed */ /* this vision recalculation used to be deferred until moveloop(), but that made it possible for vision irregularities to occur @@ -428,7 +428,7 @@ make_hallucinated( (eg. Qt windowport's equipped items display) */ update_inventory(); - display.botl = TRUE; + disp.botl = TRUE; if (talk) pline(message, verb); } @@ -447,7 +447,7 @@ make_deaf(long xtime, boolean talk) set_itimeout(&HDeaf, xtime); if ((xtime != 0L) ^ (old != 0L)) { - display.botl = TRUE; + disp.botl = TRUE; if (talk) You(old && !Deaf ? "can hear again." : "are unable to hear anything."); @@ -458,7 +458,7 @@ make_deaf(long xtime, boolean talk) void make_glib(int xtime) { - display.botl |= (!Glib ^ !!xtime); + disp.botl |= (!Glib ^ !!xtime); set_itimeout(&Glib, xtime); /* may change "(being worn)" to "(being worn; slippery)" or vice versa */ if (uarmg) @@ -655,7 +655,7 @@ peffect_restore_ability(struct obj *otmp) WEAK or worse, but that's handled via ATEMP(A_STR) now */ if (ABASE(i) < lim) { ABASE(i) = lim; - display.botl = TRUE; + disp.botl = TRUE; /* only first found if not blessed */ if (!otmp->blessed) break; @@ -1232,7 +1232,7 @@ peffect_gain_energy(struct obj *otmp) u.uen = u.uenmax; else if (u.uen <= 0) u.uen = 0; - display.botl = TRUE; + disp.botl = TRUE; exercise(A_WIS, TRUE); } @@ -1433,7 +1433,7 @@ healup(int nhp, int nxtra, boolean curesick, boolean cureblind) make_vomiting(0L, TRUE); make_sick(0L, (char *) 0, TRUE, SICK_ALL); } - display.botl = TRUE; + disp.botl = TRUE; return; } @@ -1936,7 +1936,7 @@ potionbreathe(struct obj *obj) ABASE(i)++; /* only first found if not blessed */ isdone = !(obj->blessed); - display.botl = TRUE; + disp.botl = TRUE; } if (++i >= A_MAX) i = 0; @@ -1945,24 +1945,24 @@ potionbreathe(struct obj *obj) break; case POT_FULL_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, display.botl = TRUE; + u.mh++, disp.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = TRUE; + u.uhp++, disp.botl = TRUE; cureblind = TRUE; /*FALLTHRU*/ case POT_EXTRA_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, display.botl = TRUE; + u.mh++, disp.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = TRUE; + u.uhp++, disp.botl = TRUE; if (!obj->cursed) cureblind = TRUE; /*FALLTHRU*/ case POT_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, display.botl = TRUE; + u.mh++, disp.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = TRUE; + u.uhp++, disp.botl = TRUE; if (obj->blessed) cureblind = TRUE; if (cureblind) { @@ -1984,7 +1984,7 @@ potionbreathe(struct obj *obj) else u.uhp -= 5; } - display.botl = TRUE; + disp.botl = TRUE; exercise(A_CON, FALSE); } break; @@ -2831,7 +2831,7 @@ split_mon( if (mtmp2) { mtmp2->mhpmax = u.mhmax / 2; u.mhmax -= mtmp2->mhpmax; - display.botl = TRUE; + disp.botl = TRUE; You("multiply%s!", reason); } } else { diff --git a/src/pray.c b/src/pray.c index 848c348ab..c4ae1b7b5 100644 --- a/src/pray.c +++ b/src/pray.c @@ -382,7 +382,7 @@ fix_worst_trouble(int trouble) } You("can breathe again."); Strangled = 0; - display.botl = TRUE; + disp.botl = TRUE; break; case TROUBLE_LAVA: /* teleport should always succeed, but if not, just untrap them */ @@ -397,7 +397,7 @@ fix_worst_trouble(int trouble) case TROUBLE_HUNGRY: Your("%s feels content.", body_part(STOMACH)); init_uhunger(); - display.botl = TRUE; + disp.botl = TRUE; break; case TROUBLE_SICK: You_feel("better."); @@ -425,14 +425,14 @@ fix_worst_trouble(int trouble) if (u.uhpmax > u.uhppeak) u.uhppeak = u.uhpmax; u.uhp = u.uhpmax; - display.botl = TRUE; + disp.botl = TRUE; break; case TROUBLE_COLLAPSING: /* override Fixed_abil; uncurse that if feasible */ You_feel("%sstronger.", (AMAX(A_STR) - ABASE(A_STR) > 6) ? "much " : ""); ABASE(A_STR) = AMAX(A_STR); - display.botl = TRUE; + disp.botl = TRUE; if (Fixed_abil) { if ((otmp = stuck_ring(uleft, RIN_SUSTAIN_ABILITY)) != 0) { if (otmp == uleft) @@ -536,7 +536,7 @@ fix_worst_trouble(int trouble) for (i = 0; i < A_MAX; i++) { if (ABASE(i) < AMAX(i)) { ABASE(i) = AMAX(i); - display.botl = TRUE; + disp.botl = TRUE; } } (void) encumber_msg(); @@ -1241,7 +1241,7 @@ pleased(aligntyp g_align) u.mh = u.mhmax; if (ABASE(A_STR) < AMAX(A_STR)) { ABASE(A_STR) = AMAX(A_STR); - display.botl = TRUE; /* before potential message */ + disp.botl = TRUE; /* before potential message */ (void) encumber_msg(); } if (u.uhunger < 900) @@ -1256,7 +1256,7 @@ pleased(aligntyp g_align) rather than issuing a pat-on-head */ u.ucreamed = 0; make_blinded(0L, TRUE); - display.botl = TRUE; + disp.botl = TRUE; break; case 4: { register struct obj *otmp; diff --git a/src/read.c b/src/read.c index f1e89b359..e99c0929d 100644 --- a/src/read.c +++ b/src/read.c @@ -1693,7 +1693,7 @@ seffect_charging(struct obj **sobjp) else u.uen = u.uenmax; /* otherwise restore current to max */ } - display.botl = TRUE; + disp.botl = TRUE; return; } /* known = TRUE; -- handled inline here */ diff --git a/src/rumors.c b/src/rumors.c index c763af06f..dc71afd24 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -733,7 +733,7 @@ doconsult(struct monst *oracl) break; } money2mon(oracl, (long) u_pay); - display.botl = TRUE; + disp.botl = TRUE; if (!u.uevent.major_oracle && !u.uevent.minor_oracle) record_achievement(ACH_ORCL); add_xpts = 0; /* first oracle of each type gives experience points */ diff --git a/src/shk.c b/src/shk.c index 127e24890..cacc1aa18 100644 --- a/src/shk.c +++ b/src/shk.c @@ -124,7 +124,7 @@ money2mon(struct monst* mon, long amount) remove_worn_item(ygold, FALSE); /* quiver */ freeinv(ygold); add_to_minv(mon, ygold); - display.botl = TRUE; + disp.botl = TRUE; return amount; } @@ -158,7 +158,7 @@ money2u(struct monst* mon, long amount) dropy(mongold); } else { addinv(mongold); - display.botl = TRUE; + disp.botl = TRUE; } } @@ -1179,7 +1179,7 @@ pay(long tmp, register struct monst* shkp) money2mon(shkp, balance); else if (balance < 0) money2u(shkp, -balance); - display.botl = TRUE; + disp.botl = TRUE; if (robbed) { robbed -= tmp; if (robbed < 0) @@ -1674,7 +1674,7 @@ dopay(void) eshkp->debit = 0L; eshkp->loan = 0L; You("pay that debt."); - display.botl = TRUE; + disp.botl = TRUE; } else { dtmp -= eshkp->credit; eshkp->credit = 0L; @@ -1683,7 +1683,7 @@ dopay(void) eshkp->loan = 0L; pline("That debt is partially offset by your credit."); You("pay the remainder."); - display.botl = TRUE; + disp.botl = TRUE; } paid = TRUE; } @@ -2098,14 +2098,14 @@ inherits( eshkp->robbed = 0L; if (umoney > 0L) { money2mon(shkp, umoney); - display.botl = TRUE; + disp.botl = TRUE; } if (!silently) pline("%s %s all your possessions.", Shknam(shkp), takes); taken = TRUE; } else { money2mon(shkp, loss); - display.botl = TRUE; + disp.botl = TRUE; if (!silently) pline("%s %s the %ld %s %sowed %s.", Shknam(shkp), takes, loss, currency(loss), @@ -4730,7 +4730,7 @@ pay_for_damage(const char *dmgstr, boolean cant_mollify) cost_of_damage = check_credit(cost_of_damage, shkp); if (cost_of_damage > 0L) { money2mon(shkp, cost_of_damage); - display.botl = TRUE; + disp.botl = TRUE; } pline("Mollified, %s accepts your restitution.", shkname(shkp)); /* move shk back to his home loc */ diff --git a/src/sit.c b/src/sit.c index 1c5fed385..232ec037c 100644 --- a/src/sit.c +++ b/src/sit.c @@ -28,7 +28,7 @@ take_gold(void) You_feel("a strange sensation."); } else { You("notice you have no gold!"); - display.botl = TRUE; + disp.botl = TRUE; } } @@ -69,7 +69,7 @@ throne_sit_effect(void) make_blinded(0L, TRUE); make_sick(0L, (char *) 0, FALSE, SICK_ALL); heal_legs(0); - display.botl = TRUE; + disp.botl = TRUE; break; case 5: take_gold(); diff --git a/src/spell.c b/src/spell.c index 91c51fd62..8ff0e856b 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1203,7 +1203,7 @@ spelleffects_check(int spell, int *res, int *energy) u.uen -= rnd(*energy); if (u.uen < 0) u.uen = 0; - display.botl = TRUE; + disp.botl = TRUE; *res = ECMD_TIME; return TRUE; } else if (spellknow(spell) <= KEEN / 200) { /* 100 turns left */ @@ -1246,7 +1246,7 @@ spelleffects_check(int spell, int *res, int *energy) u.uen -= rnd(2 * *energy); if (u.uen < 0) u.uen = 0; - display.botl = TRUE; + disp.botl = TRUE; *res = ECMD_TIME; /* time is used even if spell doesn't get cast */ } @@ -1320,7 +1320,7 @@ spelleffects_check(int spell, int *res, int *energy) if (confused || (rnd(100) > chance)) { You("fail to cast the spell correctly."); u.uen -= *energy / 2; - display.botl = TRUE; + disp.botl = TRUE; *res = ECMD_TIME; return TRUE; } @@ -1343,7 +1343,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force) return res; u.uen -= energy; - display.botl = TRUE; + disp.botl = TRUE; exercise(A_WIS, TRUE); /* pseudo is a temporary "false" object containing the spell stats */ pseudo = mksobj(force ? spell : spellid(spell), FALSE, FALSE); diff --git a/src/steal.c b/src/steal.c index 50e8aa864..29999de41 100644 --- a/src/steal.c +++ b/src/steal.c @@ -123,7 +123,7 @@ stealgold(register struct monst* mtmp) if (!tele_restrict(mtmp)) (void) rloc(mtmp, RLOC_MSG); monflee(mtmp, 0, FALSE, FALSE); - display.botl = TRUE; + disp.botl = TRUE; } } diff --git a/src/steed.c b/src/steed.c index d75cd8e22..850276237 100644 --- a/src/steed.c +++ b/src/steed.c @@ -366,7 +366,7 @@ mount_steed( } remove_monster(mtmp->mx, mtmp->my); teleds(mtmp->mx, mtmp->my, TELEDS_ALLOW_DRAG); - display.botl = TRUE; + disp.botl = TRUE; return TRUE; } @@ -797,11 +797,11 @@ dismount_steed( gi.in_steed_dismounting = TRUE; (void) float_down(0L, W_SADDLE); gi.in_steed_dismounting = FALSE; - display.botl = TRUE; + disp.botl = TRUE; (void) encumber_msg(); gv.vision_full_recalc = 1; } else - display.botl = TRUE; + disp.botl = TRUE; /* polearms behave differently when not mounted */ if (uwep && is_pole(uwep)) gu.unweapon = TRUE; diff --git a/src/teleport.c b/src/teleport.c index 85c4588bf..628231319 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1083,7 +1083,7 @@ dotele( } else { /* bypassing spelleffects(); apply energy cost directly */ u.uen -= energy; - display.botl = TRUE; + disp.botl = TRUE; } } diff --git a/src/timeout.c b/src/timeout.c index 111719153..c329e6b37 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -550,7 +550,7 @@ done_timeout(int how, int which) /* life-saved */ *intrinsic_p &= ~I_SPECIAL; - display.botl = TRUE; + disp.botl = TRUE; } void @@ -716,7 +716,7 @@ nh_timeout(void) case DEAF: set_itimeout(&HDeaf, 1L); make_deaf(0L, TRUE); - display.botl = TRUE; + disp.botl = TRUE; if (!Deaf) stop_occupation(); break; @@ -769,7 +769,7 @@ nh_timeout(void) case FLYING: /* timed Flying is via #wizintrinsic only */ if (was_flying && !Flying) { - display.botl = TRUE; + disp.botl = TRUE; You("land."); spoteffects(TRUE); } @@ -915,7 +915,7 @@ fall_asleep(int how_long, boolean wakeup_msg) /* 3.7: how_long is negative so wasn't actually incrementing the deafness timeout when it used to be passed as-is */ incr_itimeout(&HDeaf, abs(how_long)); - display.botl = TRUE; + disp.botl = TRUE; ga.afternmv = Hear_again; /* this won't give any messages */ } #endif @@ -1808,7 +1808,7 @@ do_storms(void) Soundeffect(se_kaboom_boom_boom, 80); pline("Kaboom!!! Boom!! Boom!!"); incr_itimeout(&HDeaf, rn1(20, 30)); - display.botl = TRUE; + disp.botl = TRUE; if (!u.uinvulnerable) { stop_occupation(); nomul(-3); diff --git a/src/trap.c b/src/trap.c index f534e6b98..85abbd574 100644 --- a/src/trap.c +++ b/src/trap.c @@ -989,7 +989,7 @@ set_utrap(unsigned int tim, unsigned int typ) have already set u.utrap to 0 so this check won't be sufficient in that situation; caller will need to set context.botl itself */ if (!u.utrap ^ !tim) - display.botl = TRUE; + disp.botl = TRUE; u.utrap = tim; u.utraptype = tim ? typ : TT_NONE; @@ -3662,7 +3662,7 @@ mselftouch( void float_up(void) { - display.botl = TRUE; + disp.botl = TRUE; if (u.utrap) { if (u.utraptype == TT_PIT) { reset_utrap(FALSE); @@ -3775,7 +3775,7 @@ float_down( (void) encumber_msg(); /* carrying capacity might have changed */ return 0; } - display.botl = TRUE; + disp.botl = TRUE; nomul(0); /* stop running or resting */ if (BFlying) { /* controlled flight no longer overridden by levitation */ @@ -4000,24 +4000,24 @@ dofiretrap( if (alt > num) num = alt; if (u.mhmax > mons[u.umonnum].mlevel) - u.mhmax -= rn2(min(u.mhmax, num + 1)), display.botl = TRUE; + u.mhmax -= rn2(min(u.mhmax, num + 1)), disp.botl = TRUE; if (u.mh > u.mhmax) - u.mh = u.mhmax, display.botl = TRUE; + u.mh = u.mhmax, disp.botl = TRUE; monstunseesu(M_SEEN_FIRE); } else { int uhpmin = minuhpmax(1), olduhpmax = u.uhpmax; num = d(2, 4); if (u.uhpmax > uhpmin) { - u.uhpmax -= rn2(min(u.uhpmax, num + 1)), display.botl = TRUE; + u.uhpmax -= rn2(min(u.uhpmax, num + 1)), disp.botl = TRUE; } /* note: no 'else' here */ if (u.uhpmax < uhpmin) { - setuhpmax(min(olduhpmax, uhpmin)); /* sets display.botl */ + setuhpmax(min(olduhpmax, uhpmin)); /* sets disp.botl */ if (!Drain_resistance) losexp(NULL); /* never fatal when 'drainer' is Null */ } if (u.uhp > u.uhpmax) - u.uhp = u.uhpmax, display.botl = TRUE; + u.uhp = u.uhpmax, disp.botl = TRUE; monstunseesu(M_SEEN_FIRE); } if (!num) @@ -4064,12 +4064,12 @@ domagictrap(void) Soundeffect(se_deafening_roar_atmospheric, 100); You_hear("a deafening roar!"); incr_itimeout(&HDeaf, rn1(20, 30)); - display.botl = TRUE; + disp.botl = TRUE; } else { /* magic vibrations still hit you */ You_feel("rankled."); incr_itimeout(&HDeaf, rn1(5, 15)); - display.botl = TRUE; + disp.botl = TRUE; } while (cnt--) (void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS); @@ -4938,7 +4938,7 @@ drain_en(int n, boolean max_already_drained) /* energy is completely gone */ if (u.uen || u.uenmax) { /* paranoia */ u.uen = u.uenmax = 0; - display.botl = TRUE; + disp.botl = TRUE; } mesg = "momentarily lethargic"; } else { @@ -4961,7 +4961,7 @@ drain_en(int n, boolean max_already_drained) and then we throttled the loss being applied to current */ u.uen = u.uenmax; } - display.botl = TRUE; + disp.botl = TRUE; } /* after manipulating u.uen,uenmax and setting context.botl, so that You_feel() -> pline() will update status before the message */ diff --git a/src/uhitm.c b/src/uhitm.c index 2faab1a72..6ab1fa8f0 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -3988,7 +3988,7 @@ mhitm_ad_phys( exercise(A_STR, FALSE); /* inflict damage now; we know it can't be fatal */ u.mh -= tmp; - display.botl = TRUE; + disp.botl = TRUE; mhm->damage = 0; /* don't inflict more damage below */ if (cloneu()) You("divide as %s hits you!", mon_nam(magr)); @@ -4218,7 +4218,7 @@ mhitm_ad_heal( exercise(A_CON, TRUE); if (Sick) make_sick(0L, (char *) 0, FALSE, SICK_ALL); - display.botl = TRUE; + disp.botl = TRUE; if (goaway) { mongone(magr); mhm->done = TRUE; diff --git a/src/wield.c b/src/wield.c index 003b3ad16..dd0905322 100644 --- a/src/wield.c +++ b/src/wield.c @@ -114,7 +114,7 @@ setuwep(struct obj *obj) if (uwep == obj && (u_wield_art(ART_OGRESMASHER) || is_art(olduwep, ART_OGRESMASHER))) - display.botl = TRUE; + disp.botl = TRUE; /* Note: Explicitly wielding a pick-axe will not give a "bashing" * message. Wielding one via 'a'pplying it will. * 3.2.2: Wielding arbitrary objects will give bashing message too. @@ -262,7 +262,7 @@ ready_weapon(struct obj *wep) } } if ((had_wep != (uwep != 0)) && condtests[bl_bareh].enabled) - display.botl = TRUE; + disp.botl = TRUE; return res; } diff --git a/src/zap.c b/src/zap.c index 2eb94b726..751e47352 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1197,19 +1197,19 @@ cancel_item(struct obj *obj) case RIN_GAIN_STRENGTH: if ((obj->owornmask & W_RING) != 0L) { ABON(A_STR) -= obj->spe; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_GAIN_CONSTITUTION: if ((obj->owornmask & W_RING) != 0L) { ABON(A_CON) -= obj->spe; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_ADORNMENT: if ((obj->owornmask & W_RING) != 0L) { ABON(A_CHA) -= obj->spe; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_INCREASE_ACCURACY: @@ -1222,24 +1222,24 @@ cancel_item(struct obj *obj) break; case RIN_PROTECTION: if ((obj->owornmask & W_RING) != 0L) - display.botl = TRUE; + disp.botl = TRUE; break; case GAUNTLETS_OF_DEXTERITY: if ((obj->owornmask & W_ARMG) != 0L) { ABON(A_DEX) -= obj->spe; - display.botl = TRUE; + disp.botl = TRUE; } break; case HELM_OF_BRILLIANCE: if ((obj->owornmask & W_ARMH) != 0L) { ABON(A_INT) -= obj->spe; ABON(A_WIS) -= obj->spe; - display.botl = TRUE; + disp.botl = TRUE; } break; default: if ((obj->owornmask & W_ARMOR) != 0L) /* AC */ - display.botl = TRUE; + disp.botl = TRUE; break; } } @@ -1337,19 +1337,19 @@ drain_item(struct obj *obj, boolean by_you) case RIN_GAIN_STRENGTH: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_STR)--; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_GAIN_CONSTITUTION: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CON)--; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_ADORNMENT: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CHA)--; - display.botl = TRUE; + disp.botl = TRUE; } break; case RIN_INCREASE_ACCURACY: @@ -1362,25 +1362,25 @@ drain_item(struct obj *obj, boolean by_you) break; case RIN_PROTECTION: if (u_ring) - display.botl = TRUE; /* bot() will recalc u.uac */ + disp.botl = TRUE; /* bot() will recalc u.uac */ break; case HELM_OF_BRILLIANCE: if ((obj->owornmask & W_ARMH) && (obj == uarmh)) { ABON(A_INT)--; ABON(A_WIS)--; - display.botl = TRUE; + disp.botl = TRUE; } break; case GAUNTLETS_OF_DEXTERITY: if ((obj->owornmask & W_ARMG) && (obj == uarmg)) { ABON(A_DEX)--; - display.botl = TRUE; + disp.botl = TRUE; } break; default: break; } - if (display.botl) + if (disp.botl) bot(); if (carried(obj)) update_inventory(); @@ -3047,7 +3047,7 @@ cancel_monst(struct monst *mdef, struct obj *obj, boolean youattack, cancel_item(otmp); if (youdefend) { - display.botl = TRUE; /* potential AC change */ + disp.botl = TRUE; /* potential AC change */ find_ac(); /* update_inventory(); -- handled by caller */ } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index e3dec4686..7b460cb08 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1067,11 +1067,11 @@ tty_clear_nhwindow(winid window) cw->data[i][n - 1] = '\0'; /*finalx[i][NOW] = finalx[i][BEFORE] = 0;*/ } - display.botlx = TRUE; + disp.botlx = TRUE; break; case NHW_MAP: /* cheap -- clear the whole thing and tell nethack to redraw botl */ - display.botlx = TRUE; + disp.botlx = TRUE; /*FALLTHRU*/ case NHW_BASE: /* if erasing_tty_screen is True, calling sequence is @@ -2259,7 +2259,7 @@ tty_putstr(winid window, int attr, const char *str) #ifndef STATUS_HILITES case NHW_STATUS: ob = &cw->data[cw->cury][j = cw->curx]; - if (display.botlx) + if (disp.botlx) *ob = '\0'; if (!cw->cury && (int) strlen(str) >= CO) { /* the characters before "St:" are unnecessary */ @@ -2270,7 +2270,7 @@ tty_putstr(winid window, int attr, const char *str) nb = str; for (i = cw->curx + 1, n0 = cw->cols; i < n0; i++, nb++) { if (!*nb) { - if (*ob || display.botlx) { + if (*ob || disp.botlx) { /* last char printed may be in middle of line */ tty_curs(WIN_STATUS, i, cw->cury); cl_end(); @@ -3653,7 +3653,7 @@ docorner( if (ymax >= (int) wins[WIN_STATUS]->offy && !ystart_between_menu_pages) { /* we have wrecked the bottom line */ - display.botlx = TRUE; + disp.botlx = TRUE; bot(); } }