From 49a5d043c0894e1f86a6141e6f477a910ab5b4d0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 4 Jan 2024 23:48:38 -0500 Subject: [PATCH] consistent use of TRUE vs 1 with botl and botlx --- src/cmd.c | 2 +- src/dig.c | 2 +- src/display.c | 4 ++-- src/do.c | 4 ++-- src/do_wear.c | 28 ++++++++++++++-------------- src/eat.c | 16 ++++++++-------- src/end.c | 2 +- src/explode.c | 2 +- src/fountain.c | 2 +- src/invent.c | 8 ++++---- src/mhitu.c | 20 ++++++++++---------- src/minion.c | 2 +- src/mon.c | 2 +- src/objnam.c | 2 +- src/pickup.c | 6 +++--- src/polyself.c | 18 +++++++++--------- src/potion.c | 24 ++++++++++++------------ 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/teleport.c | 2 +- src/timeout.c | 2 +- src/uhitm.c | 4 ++-- src/wield.c | 4 ++-- src/zap.c | 14 +++++++------- win/tty/wintty.c | 6 +++--- 30 files changed, 112 insertions(+), 112 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index a9ffe583c..9dba78501 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 = 1; /* have pline() do a status update */ + display.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/dig.c b/src/dig.c index 292c29aeb..987241adc 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 = 1; + display.botl = TRUE; return ECMD_TIME; } else if (u.dz == 0) { confdir(FALSE); diff --git a/src/display.c b/src/display.c index b8903a2e0..3dce44cef 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 = 1; /* force a redraw of the bottom lines */ + display.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 = 1; /* force update of botl window */ + display.botlx = TRUE; /* force update of botl window */ clear_nhwindow(WIN_MAP); /* clear physical screen */ clear_glyph_buffer(); /* force gbuf[][].glyph to unexplored */ diff --git a/src/do.c b/src/do.c index 185f47280..5dac8f70f 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 = 1; + display.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 = 1; + display.botl = TRUE; if (ATEMP(A_DEX) < 0) ATEMP(A_DEX)++; diff --git a/src/do_wear.c b/src/do_wear.c index 425e539c9..23a5344ab 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 = 1; /* status hilites might mark AC changed */ + display.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 = 1; + display.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 = 1; /* reveal new alignment or INT & WIS */ + display.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 = 1; + display.botl = TRUE; break; case CORNUTHAUM: if (!gc.context.takeoff.cancelled_don) { ABON(A_CHA) += (Role_if(PM_WIZARD) ? -1 : 1); - display.botl = 1; + display.botl = TRUE; } break; case HELM_OF_TELEPATHY: @@ -555,7 +555,7 @@ Gloves_on(void) break; case GAUNTLETS_OF_POWER: makeknown(uarmg->otyp); - display.botl = 1; /* taken care of in attrib.c */ + display.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 = 1; /* taken care of in attrib.c */ + display.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 = 1; + display.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 = 1; + display.botl = TRUE; newsym(u.ux, u.uy); /* glyphmon flag and tile may have gone * from male to female or vice versa */ } else { @@ -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 = 1; + display.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 = 1; /* for AC after zeroing u.ublessed */ + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; } } diff --git a/src/eat.c b/src/eat.c index e49324fb6..6a7c95c1e 100644 --- a/src/eat.c +++ b/src/eat.c @@ -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 = 1; + display.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 = 1; + display.botl = TRUE; } } } @@ -1124,7 +1124,7 @@ cpostfx(int pm) else u.uhp = u.uhpmax; make_blinded(0L, !u.ucreamed); - display.botl = 1; + display.botl = TRUE; check_intrinsics = TRUE; /* might also convey poison resistance */ break; case PM_STALKER: @@ -2240,7 +2240,7 @@ eataccessory(struct obj *otmp) (typ == RIN_PROTECTION) ? otmp->spe : 2, /* fixed amount for amulet */ typ); - display.botl = 1; + display.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 = 1; + display.botl = TRUE; break; case AMULET_OF_UNCHANGING: /* un-change: it's a pun */ @@ -3204,7 +3204,7 @@ unfaint(void) if (u.uhs > FAINTING) u.uhs = FAINTING; stop_occupation(); - display.botl = 1; + display.botl = TRUE; return 0; } @@ -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 = 1; + display.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 = 1; + display.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 edc45ef7e..e996d11d5 100644 --- a/src/end.c +++ b/src/end.c @@ -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 = 1; + display.botl = TRUE; } } if (Lifesaved && (how <= GENOCIDED)) { diff --git a/src/explode.c b/src/explode.c index cc57833f4..1790fef41 100644 --- a/src/explode.c +++ b/src/explode.c @@ -630,7 +630,7 @@ explode( u.mh -= damu; else u.uhp -= damu; - display.botl = 1; + display.botl = TRUE; } /* You resisted the damage, lets not keep that to ourselves */ diff --git a/src/fountain.c b/src/fountain.c index 58501289c..5f285f9cc 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 = 1; + display.botl = TRUE; } /* gain ability, blessed if "natural" luck is high */ i = rn2(A_MAX); /* start at a random attribute */ diff --git a/src/invent.c b/src/invent.c index 91ef8623f..d2e50f1cd 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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; /* May have changed the amount of money */ + display.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 da453c12b..e0339fb4d 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 = 1; + display.botl = TRUE; if (message) { if (digests(mdat)) { You("get regurgitated!"); @@ -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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; break; case 2: Your("senses are dulled."); (void) adjattrib(A_WIS, -1, TRUE); exercise(A_WIS, FALSE); - display.botl = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; return mon; } diff --git a/src/minion.c b/src/minion.c index 8890755b6..61065d698 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 = 1; + display.botl = TRUE; return offer; } diff --git a/src/mon.c b/src/mon.c index cc36ec30d..eac02e395 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 = 1; + display.botl = TRUE; u.ustuck = mtmp; if (!u.ustuck) { u.uswallow = 0; diff --git a/src/objnam.c b/src/objnam.c index 228704b0c..a0a0fae17 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 = 1; + display.botl = TRUE; return 3; /*return otmp;*/ } diff --git a/src/pickup.c b/src/pickup.c index 700360502..9a1b6e386 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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; } go.oldcap = newcap; diff --git a/src/polyself.c b/src/polyself.c index 87fd7026a..c40e088ff 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -445,7 +445,7 @@ newman(void) make_slimed(10L, (const char *) 0); } - display.botl = 1; + display.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 = 1; /* AC is changing */ + display.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 = 1; + display.botl = TRUE; gv.vision_full_recalc = 1; see_monsters(); (void) encumber_msg(); @@ -1380,7 +1380,7 @@ rehumanize(void) } nomul(0); - display.botl = 1; + display.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 = 1; + display.botl = TRUE; if (!getdir((char *) 0)) return ECMD_CANCEL; @@ -1602,7 +1602,7 @@ dosummon(void) return ECMD_OK; } u.uen -= 10; - display.botl = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; pline("Strangely, you feel better than before."); exercise(A_STR, TRUE); } diff --git a/src/potion.c b/src/potion.c index a467db318..3e0d24d59 100644 --- a/src/potion.c +++ b/src/potion.c @@ -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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; return; } @@ -1936,7 +1936,7 @@ potionbreathe(struct obj *obj) ABASE(i)++; /* only first found if not blessed */ isdone = !(obj->blessed); - display.botl = 1; + display.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 = 1; + u.mh++, display.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = 1; + u.uhp++, display.botl = TRUE; cureblind = TRUE; /*FALLTHRU*/ case POT_EXTRA_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, display.botl = 1; + u.mh++, display.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = 1; + u.uhp++, display.botl = TRUE; if (!obj->cursed) cureblind = TRUE; /*FALLTHRU*/ case POT_HEALING: if (Upolyd && u.mh < u.mhmax) - u.mh++, display.botl = 1; + u.mh++, display.botl = TRUE; if (u.uhp < u.uhpmax) - u.uhp++, display.botl = 1; + u.uhp++, display.botl = TRUE; if (obj->blessed) cureblind = TRUE; if (cureblind) { @@ -1984,7 +1984,7 @@ potionbreathe(struct obj *obj) else u.uhp -= 5; } - display.botl = 1; + display.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 = 1; + display.botl = TRUE; You("multiply%s!", reason); } } else { diff --git a/src/pray.c b/src/pray.c index 9d040e724..848c348ab 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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; /* before potential message */ + display.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 = 1; + display.botl = TRUE; break; case 4: { register struct obj *otmp; diff --git a/src/read.c b/src/read.c index 6222c1b4e..f1e89b359 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 = 1; + display.botl = TRUE; return; } /* known = TRUE; -- handled inline here */ diff --git a/src/rumors.c b/src/rumors.c index a5b2e5516..c763af06f 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 = 1; + display.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 6519a08dd..127e24890 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 = 1; + display.botl = TRUE; return amount; } @@ -158,7 +158,7 @@ money2u(struct monst* mon, long amount) dropy(mongold); } else { addinv(mongold); - display.botl = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.botl = TRUE; } paid = TRUE; } @@ -2098,14 +2098,14 @@ inherits( eshkp->robbed = 0L; if (umoney > 0L) { money2mon(shkp, umoney); - display.botl = 1; + display.botl = TRUE; } if (!silently) pline("%s %s all your possessions.", Shknam(shkp), takes); taken = TRUE; } else { money2mon(shkp, loss); - display.botl = 1; + display.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 = 1; + display.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 7d6dfeb9d..1c5fed385 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 = 1; + display.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 = 1; + display.botl = TRUE; break; case 5: take_gold(); diff --git a/src/spell.c b/src/spell.c index 783cde3d4..91c51fd62 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 = 1; + display.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 = 1; + display.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 = 1; + display.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 = 1; + display.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 7a65d9c77..50e8aa864 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 = 1; + display.botl = TRUE; } } diff --git a/src/teleport.c b/src/teleport.c index 433413ed1..85c4588bf 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 = 1; + display.botl = TRUE; } } diff --git a/src/timeout.c b/src/timeout.c index dca771d13..111719153 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -769,7 +769,7 @@ nh_timeout(void) case FLYING: /* timed Flying is via #wizintrinsic only */ if (was_flying && !Flying) { - display.botl = 1; + display.botl = TRUE; You("land."); spoteffects(TRUE); } diff --git a/src/uhitm.c b/src/uhitm.c index 0baec6abb..2faab1a72 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 = 1; + display.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 = 1; + display.botl = TRUE; if (goaway) { mongone(magr); mhm->done = TRUE; diff --git a/src/wield.c b/src/wield.c index 8a3646737..003b3ad16 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 = 1; + display.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 = 1; + display.botl = TRUE; return res; } diff --git a/src/zap.c b/src/zap.c index adfae3490..2eb94b726 100644 --- a/src/zap.c +++ b/src/zap.c @@ -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 = 1; + display.botl = TRUE; } break; case RIN_GAIN_CONSTITUTION: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CON)--; - display.botl = 1; + display.botl = TRUE; } break; case RIN_ADORNMENT: if ((obj->owornmask & W_RING) && u_ring) { ABON(A_CHA)--; - display.botl = 1; + display.botl = TRUE; } break; case RIN_INCREASE_ACCURACY: @@ -1362,19 +1362,19 @@ drain_item(struct obj *obj, boolean by_you) break; case RIN_PROTECTION: if (u_ring) - display.botl = 1; /* bot() will recalc u.uac */ + display.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 = 1; + display.botl = TRUE; } break; case GAUNTLETS_OF_DEXTERITY: if ((obj->owornmask & W_ARMG) && (obj == uarmg)) { ABON(A_DEX)--; - display.botl = 1; + display.botl = TRUE; } break; default: @@ -3047,7 +3047,7 @@ cancel_monst(struct monst *mdef, struct obj *obj, boolean youattack, cancel_item(otmp); if (youdefend) { - display.botl = 1; /* potential AC change */ + display.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 3c98f253b..e3dec4686 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 = 1; + display.botlx = TRUE; break; case NHW_MAP: /* cheap -- clear the whole thing and tell nethack to redraw botl */ - display.botlx = 1; + display.botlx = TRUE; /*FALLTHRU*/ case NHW_BASE: /* if erasing_tty_screen is True, calling sequence is @@ -3653,7 +3653,7 @@ docorner( if (ymax >= (int) wins[WIN_STATUS]->offy && !ystart_between_menu_pages) { /* we have wrecked the bottom line */ - display.botlx = 1; + display.botlx = TRUE; bot(); } }