From 718c8073393ce1a886b74319b759eec9601b19f8 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sun, 24 Apr 2016 13:33:17 -0400 Subject: [PATCH] Rogue V4, V5: fix messages when viewing the identified items. The functions for displaying the list of identified items begin by prompting for the category of item, using msg(). Rogue V4 left this prompt on the screen after displaying the discovery list. Rogue V5 erased the message window even if the process of printing the list created another message which the player had not read. Messages are now cleared in endline(), which is capable of checking whether clearing should be done. --- rogue4/things.c | 5 +++++ rogue5/things.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rogue4/things.c b/rogue4/things.c index 292dba4..fd00fd2 100644 --- a/rogue4/things.c +++ b/rogue4/things.c @@ -578,13 +578,18 @@ void end_line(void) { if (!slow_invent) + { if (line_cnt == 1 && !newpage) { mpos = 0; msg(lastfmt, lastarg); } else + { add_line(NULL, NULL); + msg(""); + } + } line_cnt = 0; newpage = FALSE; } diff --git a/rogue5/things.c b/rogue5/things.c index db6c0e3..39151c5 100644 --- a/rogue5/things.c +++ b/rogue5/things.c @@ -390,7 +390,6 @@ discovered(void) print_disc(ch); end_line(); } - msg(""); } /* @@ -487,7 +486,7 @@ add_line(const char *fmt, const char *arg) } if (inv_type == INV_SLOW) { - if (*fmt != '\0') + if (fmt != NULL && *fmt != '\0') if (msg(fmt, arg) == ESCAPE) return ESCAPE; line_cnt++; @@ -577,7 +576,10 @@ end_line(void) msg(lastfmt, lastarg); } else + { add_line(NULL, NULL); + msg(""); + } } line_cnt = 0; newpage = FALSE;