variable 'display' causes shadow variable warnings in X11 build

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