Files
nethack/include
nhmall e2e3c1f8de Re: [NetHack/NetHack] Prompts can overwrite copyright notice on the
starting screen (Issue #783)

On 2022-06-01 12:22 p.m., NetSysFire wrote:
> Steps to reproduce:
>
>1. Get any prompt and answer it. In my case it was a horribly old
>   save I forgot about or when I wiztested something and forgot
>   about that save, too.
>2. See that the copyright information got overwritten by the prompt:
>
>There is already a game in progress under your name. Destroy old game? [yn] (n)
>         By Stichting Mathematisch Centrum and M. Stephenson.
>         Version 3.7.0-59 Unix Work-in-progress, built May 31 2022 12:28:31.
>         See license for details.
>
>
> Shall I pick character's race, role, gender and alignment for you? [ynaq]
>
> Expected behavior:
>
> Redraw after a prompt was answered, so the prompt vanishes and the
> entirety of the starting screen will be shown.
>
> NetHack, Copyright 1985-2022
>          By Stichting Mathematisch Centrum and M. Stephenson.
>          Version 3.7.0-59 Unix Work-in-progress, built May 31 2022 12:28:31.
>          See license for details.
>
>
> Shall I pick character's race, role, gender and alignment for you? [ynaq]
>
> Proposed severity: low. Not gamebreaking, it is cosmetic only and does
> not have any other consequences.
>

The Copyright notice is placed by tty internal routines writing onto
the BASE_WINDOW fairly early in the startup sequence.

The prompt to "Destroy old game? [yn] (n)" is using the in-game
routine to write to the message window at the top of the screen and
prompt there, just like in-game prompts and messages.

If the player answered 'y' to that, the prompt for
"Shall I pick character's race, role, gender and alignment..."
appeared immediately after. That one, however, is written using
the BASE_WINDOW routines in tty, like the copyright notice.

This change does the following:

It moves the copyright lines down a little bit leaving room for the
"Destroy.." prompts.

It places the "Shall I pick characters's..." prompt further down the
screen by default, leaving some room for about 3 raw_print startup
messages after the copyright notice, just in case there are any.
The "Shall I pick character's..." prompt will still appear immediately
if there is a prompt such as "Destroy old game?..."

There were a couple of other issues around raw_print startup messages
too. Those are delivered using a raw_print mechanism to ensure they
are written even if the window-port is not fully operational. However,
they were only on the screen for the blink of an eye. This call
sequence in restore.c made them disappear almost immediately:
     docrt() -> cls()

Put in a mechanism to detect the presence of raw_print messages
from the early startup, and if there were some, wait for a
keypress before obliterating the unread notifications.
2022-06-08 23:41:45 -04:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2020-10-14 09:25:45 -07:00
2022-01-29 11:13:01 -08:00
2022-03-04 13:07:14 -08:00
2022-04-27 11:22:12 -07:00
2021-01-26 21:06:16 -05:00
2022-05-07 10:25:13 -04:00
2022-03-11 07:33:28 -05:00
2021-01-20 22:18:34 -06:00
2021-12-26 00:16:55 -08:00
2020-12-04 09:30:21 +02:00
2022-05-27 15:28:49 -07:00
2022-02-16 23:04:02 +02:00
2022-03-18 10:19:04 +02:00
2022-03-26 11:23:06 -07:00
2022-02-02 05:26:03 -08:00
2022-01-28 08:30:08 +02:00
2022-05-07 10:25:13 -04:00
2022-05-09 09:15:17 -04:00
2021-12-19 19:31:19 -08:00
2022-04-27 15:43:18 -07:00
2022-03-09 07:06:37 -08:00
2022-05-07 10:25:13 -04:00
2022-03-02 13:09:42 -08:00
2022-02-01 13:03:41 -05:00
2020-08-12 16:15:28 -07:00
2022-03-15 13:46:56 +02:00
2022-04-27 11:22:12 -07:00
2021-10-21 08:48:23 -04:00
2022-05-07 10:25:13 -04:00
2022-03-16 21:27:06 -04:00
2022-05-07 10:25:13 -04:00
2022-05-07 10:25:13 -04:00
2022-05-07 10:25:13 -04:00
2022-01-29 16:28:06 -05:00
2021-01-26 10:27:51 -05:00
2022-04-27 11:04:12 -07:00
2022-01-11 10:25:50 -08:00