Mercurial > hg > early-roguelike
comparison rogue5/things.c @ 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 | f502bf60e6e4 |
children |
comparison
equal
deleted
inserted
replaced
243:8ee1c19d6f99 | 244:ded75a57405c |
---|---|
388 else | 388 else |
389 { | 389 { |
390 print_disc(ch); | 390 print_disc(ch); |
391 end_line(); | 391 end_line(); |
392 } | 392 } |
393 msg(""); | |
394 } | 393 } |
395 | 394 |
396 /* | 395 /* |
397 * print_disc: | 396 * print_disc: |
398 * Print what we've discovered of type 'type' | 397 * Print what we've discovered of type 'type' |
485 if (inv_type == INV_SLOW) | 484 if (inv_type == INV_SLOW) |
486 mpos = 0; | 485 mpos = 0; |
487 } | 486 } |
488 if (inv_type == INV_SLOW) | 487 if (inv_type == INV_SLOW) |
489 { | 488 { |
490 if (*fmt != '\0') | 489 if (fmt != NULL && *fmt != '\0') |
491 if (msg(fmt, arg) == ESCAPE) | 490 if (msg(fmt, arg) == ESCAPE) |
492 return ESCAPE; | 491 return ESCAPE; |
493 line_cnt++; | 492 line_cnt++; |
494 } | 493 } |
495 else | 494 else |
575 { | 574 { |
576 mpos = 0; | 575 mpos = 0; |
577 msg(lastfmt, lastarg); | 576 msg(lastfmt, lastarg); |
578 } | 577 } |
579 else | 578 else |
579 { | |
580 add_line(NULL, NULL); | 580 add_line(NULL, NULL); |
581 msg(""); | |
582 } | |
581 } | 583 } |
582 line_cnt = 0; | 584 line_cnt = 0; |
583 newpage = FALSE; | 585 newpage = FALSE; |
584 } | 586 } |
585 | 587 |