diff --git a/doc/fixes37.0 b/doc/fixes37.0 index a84f301f6..8c558e278 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -712,6 +712,8 @@ polymorphing while wearing an amulet of strangulation from a form that wasn't vulnerable to one that was gave wrong message ("still constricts") for accessibility reasons, give a message when monster teleports if a gremlin stole intrinsic 'see invisible' the map wasn't updated properly +mark some messages as urgent ("You die*.", having equipment stolen, being + caught in a magical explosion) Fixes to 3.7.0-x Problems that Were Exposed Via git Repository @@ -1323,6 +1325,8 @@ tiles: male and female variations in monsters.txt; tested only with tile2bmp conversion utility so far; also supported by tilemap utility to generate tile.c tty: use bright colors directly on supporting terminals +tty: if a message is marked urgent, override message suppression initiated + by user having typed ESC at previous --More-- prompt Unix: can define NOSUSPEND in config.h or src/Makefile's CFLAGS to prevent unixconf.h from enabling SUSPEND without need to modify unixconf.h X11: implement 'selectsaved', restore via menu of saved games diff --git a/src/hack.c b/src/hack.c index 9b1625a7c..07c6d2c46 100644 --- a/src/hack.c +++ b/src/hack.c @@ -3252,7 +3252,7 @@ maybe_wail(void) } void -losehp(register int n, register const char *knam, boolean k_format) +losehp(int n, const char *knam, boolean k_format) { #if 0 /* code below is prepared to handle negative 'loss' so don't add this * until we've verified that no callers intentionally rely on that */ @@ -3281,7 +3281,7 @@ losehp(register int n, register const char *knam, boolean k_format) g.killer.format = k_format; if (g.killer.name != knam) /* the thing that killed you */ Strcpy(g.killer.name, knam ? knam : ""); - You("die..."); + custompline(URGENT_MESSAGE, "You die..."); done(DIED); } else if (n > 0 && u.uhp * 10 < u.uhpmax) { maybe_wail(); diff --git a/src/mhitu.c b/src/mhitu.c index 8038cde37..d1de21099 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1838,11 +1838,12 @@ doseduce(struct monst *mon) } naked = (!uarmc && !uarmf && !uarmg && !uarms && !uarmh && !uarmu); - pline("%s %s%s.", Who, - Deaf ? "seems to murmur into your ear" - : naked ? "murmurs sweet nothings into your ear" - : "murmurs in your ear", - naked ? "" : ", while helping you undress"); + custompline(URGENT_MESSAGE, + "%s %s%s.", Who, + Deaf ? "seems to murmur into your ear" + : naked ? "murmurs sweet nothings into your ear" + : "murmurs in your ear", + naked ? "" : ", while helping you undress"); mayberem(mon, Who, uarmc, cloak_simple_name(uarmc)); if (!uarmc) mayberem(mon, Who, uarm, suit_simple_name(uarm)); @@ -1878,7 +1879,8 @@ doseduce(struct monst *mon) verbalize("Well, then you owe me %s%s!", yourgloves ? yname(yourgloves) : "twelve pairs of gloves", - yourgloves ? " and eleven more pairs of gloves" : ""); + yourgloves ? " and eleven more pairs of gloves" + : ""); } } else if (seewho) pline("%s appears to sigh.", Monnam(mon)); @@ -1892,8 +1894,9 @@ doseduce(struct monst *mon) adjalign(1); /* by this point you have discovered mon's identity, blind or not... */ - pline("Time stands still while you and %s lie in each other's arms...", - noit_mon_nam(mon)); + custompline(URGENT_MESSAGE, + "Time stands still while you and %s lie in each other's arms...", + noit_mon_nam(mon)); /* 3.6.1: a combined total for charisma plus intelligence of 35-1 used to guarantee successful outcome; now total maxes out at 32 as far as deciding what will happen; chance for bad outcome when diff --git a/src/pickup.c b/src/pickup.c index 6ca7b06ed..d00ddcb5c 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -2392,8 +2392,9 @@ in_container(struct obj *obj) } } else if (Is_mbag(g.current_container) && mbag_explodes(obj, 0)) { /* explicitly mention what item is triggering the explosion */ - pline("As you put %s inside, you are blasted by a magical explosion!", - doname(obj)); + custompline(URGENT_MESSAGE, + "As you put %s inside, you are blasted by a magical explosion!", + doname(obj)); /* did not actually insert obj yet */ if (was_unpaid) addtobill(obj, FALSE, FALSE, TRUE); diff --git a/src/read.c b/src/read.c index 23c435133..9d14c444f 100644 --- a/src/read.c +++ b/src/read.c @@ -2467,7 +2467,7 @@ do_class_genocide(void) u.mh = -1; if (Unchanging) { if (!feel_dead++) - You("die."); + custompline(URGENT_MESSAGE, "You die."); /* finish genociding this class of monsters before ultimately dying */ gameover = TRUE; @@ -2484,7 +2484,7 @@ do_class_genocide(void) You_feel("%s inside.", udeadinside()); } else { if (!feel_dead++) - You("die."); + custompline(URGENT_MESSAGE, "You die."); gameover = TRUE; } } diff --git a/src/steal.c b/src/steal.c index b8be4d777..05003ace0 100644 --- a/src/steal.c +++ b/src/steal.c @@ -428,22 +428,23 @@ steal(struct monst* mtmp, char* objnambuf) unmul((char *) 0); slowly = (armordelay >= 1 || g.multi < 0); if (flags.female) - pline("%s charms you. You gladly %s your %s.", - !seen ? "She" : Monnam(mtmp), - curssv ? "let her take" - : !slowly ? "hand over" - : was_doffing ? "continue removing" - : "start removing", - equipname(otmp)); + custompline(URGENT_MESSAGE, + "%s charms you. You gladly %s your %s.", + !seen ? "She" : Monnam(mtmp), + curssv ? "let her take" + : !slowly ? "hand over" + : was_doffing ? "continue removing" + : "start removing", + equipname(otmp)); else - pline("%s seduces you and %s off your %s.", - !seen ? "She" : Adjmonnam(mtmp, "beautiful"), - curssv - ? "helps you to take" - : !slowly ? "you take" - : was_doffing ? "you continue taking" - : "you start taking", - equipname(otmp)); + custompline(URGENT_MESSAGE, + "%s seduces you and %s off your %s.", + !seen ? "She" : Adjmonnam(mtmp, "beautiful"), + curssv ? "helps you to take" + : !slowly ? "you take" + : was_doffing ? "you continue taking" + : "you start taking", + equipname(otmp)); named++; /* the following is to set multi for later on */ nomul(-armordelay); @@ -478,9 +479,10 @@ steal(struct monst* mtmp, char* objnambuf) subfrombill(otmp, shop_keeper(*u.ushops)); freeinv(otmp); /* if attached ball was taken, uball and uchain are now Null */ - pline("%s%s stole %s.", named ? "She" : Monnam(mtmp), - (was_punished && !Punished) ? " removed your chain and" : "", - doname(otmp)); + custompline(URGENT_MESSAGE, + "%s%s stole %s.", named ? "She" : Monnam(mtmp), + (was_punished && !Punished) ? " removed your chain and" : "", + doname(otmp)); could_petrify = (otmp->otyp == CORPSE && touch_petrifies(&mons[otmp->corpsenm])); (void) mpickobj(mtmp, otmp); /* may free otmp */ diff --git a/src/zap.c b/src/zap.c index 96ea5de3f..38ab80041 100644 --- a/src/zap.c +++ b/src/zap.c @@ -2635,7 +2635,7 @@ zapyourself(struct obj *obj, boolean ordinary) Sprintf(g.killer.name, "shot %sself with a death ray", uhim()); g.killer.format = NO_KILLER_PREFIX; You("irradiate yourself with pure energy!"); - You("die."); + custompline(URGENT_MESSAGE, "You die."); /* They might survive with an amulet of life saving */ done(DIED); break; diff --git a/win/tty/topl.c b/win/tty/topl.c index 809937664..e4bbdc509 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -582,8 +582,9 @@ msghistory_snapshot(boolean purge) /* clear message history buffer /* release memory allocated to message history snapshot */ static void -free_msghistory_snapshot(boolean purged) /* True: took history's pointers, - False: just cloned them */ +free_msghistory_snapshot( + boolean purged) /* True: took history's pointers, + * False: just cloned them */ { if (snapshot_mesgs) { /* snapshot pointers are no longer in use */ diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 566523ace..4f95f7e53 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -109,9 +109,9 @@ struct window_procs tty_procs = { | WC2_HILITE_STATUS | WC2_HITPOINTBAR | WC2_FLUSH_STATUS | WC2_RESET_STATUS #endif - | WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_STATUSLINES), + | WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_URGENT_MESG | WC2_STATUSLINES), #ifdef TEXTCOLOR - {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */ #else {1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1}, #endif @@ -2662,7 +2662,13 @@ tty_putstr(winid window, int attr, const char *str) switch (cw->type) { case NHW_MESSAGE: { - int suppress_history = (attr & ATR_NOHISTORY); + int suppress_history = (attr & ATR_NOHISTORY), + urgent_message = (attr & ATR_URGENT); + + /* if message is designated 'urgent' don't suppress it if user has + typed ESC at --More-- prompt when dismissing an earlier message */ + if (urgent_message) + cw->flags &= ~WIN_STOP; /* in case we ever support display attributes for topline messages, clear flag mask leaving only display attr */