changeset 244:ded75a57405c

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.
author John "Elwin" Edwards
date Sun, 24 Apr 2016 13:33:17 -0400
parents 8ee1c19d6f99
children e7aab31362af
files rogue4/things.c rogue5/things.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rogue4/things.c	Sat Mar 19 16:42:03 2016 -0400
+++ b/rogue4/things.c	Sun Apr 24 13:33:17 2016 -0400
@@ -578,13 +578,18 @@
 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;
 }
--- a/rogue5/things.c	Sat Mar 19 16:42:03 2016 -0400
+++ b/rogue5/things.c	Sun Apr 24 13:33:17 2016 -0400
@@ -390,7 +390,6 @@
 	print_disc(ch);
 	end_line();
     }
-    msg("");
 }
 
 /*
@@ -487,7 +486,7 @@
     }
     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 @@
 	    msg(lastfmt, lastarg);
 	}
 	else
+	{
 	    add_line(NULL, NULL);
+	    msg("");
+	}
     }
     line_cnt = 0;
     newpage = FALSE;