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.
This commit is contained in:
parent
de0518b00e
commit
718c807339
2 changed files with 9 additions and 2 deletions
|
|
@ -578,13 +578,18 @@ void
|
||||||
end_line(void)
|
end_line(void)
|
||||||
{
|
{
|
||||||
if (!slow_invent)
|
if (!slow_invent)
|
||||||
|
{
|
||||||
if (line_cnt == 1 && !newpage)
|
if (line_cnt == 1 && !newpage)
|
||||||
{
|
{
|
||||||
mpos = 0;
|
mpos = 0;
|
||||||
msg(lastfmt, lastarg);
|
msg(lastfmt, lastarg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
add_line(NULL, NULL);
|
add_line(NULL, NULL);
|
||||||
|
msg("");
|
||||||
|
}
|
||||||
|
}
|
||||||
line_cnt = 0;
|
line_cnt = 0;
|
||||||
newpage = FALSE;
|
newpage = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,6 @@ discovered(void)
|
||||||
print_disc(ch);
|
print_disc(ch);
|
||||||
end_line();
|
end_line();
|
||||||
}
|
}
|
||||||
msg("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -487,7 +486,7 @@ add_line(const char *fmt, const char *arg)
|
||||||
}
|
}
|
||||||
if (inv_type == INV_SLOW)
|
if (inv_type == INV_SLOW)
|
||||||
{
|
{
|
||||||
if (*fmt != '\0')
|
if (fmt != NULL && *fmt != '\0')
|
||||||
if (msg(fmt, arg) == ESCAPE)
|
if (msg(fmt, arg) == ESCAPE)
|
||||||
return ESCAPE;
|
return ESCAPE;
|
||||||
line_cnt++;
|
line_cnt++;
|
||||||
|
|
@ -577,7 +576,10 @@ end_line(void)
|
||||||
msg(lastfmt, lastarg);
|
msg(lastfmt, lastarg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
add_line(NULL, NULL);
|
add_line(NULL, NULL);
|
||||||
|
msg("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
line_cnt = 0;
|
line_cnt = 0;
|
||||||
newpage = FALSE;
|
newpage = FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue