topten's so (standout) handling
This fixes the broken code that was using a boolean as an integer. I didn't try to track down when it changed or what it looked like before the change. The intended effect is fairly straightforward; just padding a bold line with spaces. I've no idea why someone deciced that that was useful though. It also fixes something I broke six years ago: tty_exit_nhwindows() releases the termcap data needed for turning bold on and off, so raw_print_bold() used by topten() stopped working on tty then. Not fixed: the code in really_done() for dealing with topten() vs the 'toptenwin' option really ought to be redone.
This commit is contained in:
19
src/end.c
19
src/end.c
@@ -1649,11 +1649,24 @@ really_done(int how)
|
||||
destroy_nhwindow(endwin);
|
||||
|
||||
dump_close_log();
|
||||
/* "So when I die, the first thing I will see in Heaven is a
|
||||
* score list?" */
|
||||
/*
|
||||
* "So when I die, the first thing I will see in Heaven is a score list?"
|
||||
*
|
||||
* topten() updates 'logfile' and 'xlogfile', when they're enabled.
|
||||
* Then the current game's score is shown in its relative position
|
||||
* within high scores, and 'record' is updated if that makes the cut.
|
||||
*
|
||||
* FIXME!
|
||||
* If writing topten with raw_print(), which will usually be sent to
|
||||
* stdout, we call exit_nhwindows() first in case it erases the screen.
|
||||
* But when writing topten to a window, we call exit_nhwindows()
|
||||
* after topten() because that needs the windowing system to still
|
||||
* be up. This sequencing is absurd; we need something like
|
||||
* raw_prompt("--More--") (or "Press <return> to continue.") that
|
||||
* topten() can call for !toptenwin before returning here.
|
||||
*/
|
||||
if (have_windows && !iflags.toptenwin)
|
||||
exit_nhwindows((char *) 0), have_windows = FALSE;
|
||||
/* update 'logfile' and 'xlogfile', if enabled, and maybe 'record' */
|
||||
topten(how, endtime);
|
||||
if (have_windows)
|
||||
exit_nhwindows((char *) 0);
|
||||
|
||||
Reference in New Issue
Block a user