maybe fix #H5264 - screen clears on prompting
I couldn't reproduce the reported problem of the "In what direction?" being issued after the screen was cleared, but bypassing pline() in favor of putstr(WIN_MESSAGE) for tty prompts did also bypass if (vision_full_recalc) vision_recalc(0); if (u.ux) flush_screen(1); done in pline(). Inadvertent loss of the latter could conceivably be responsible for the problem. If so, the escape code used by cl_end() may be broken for somebody's termcap or terminfo setup since clearing to the end of the line in the message window shouldn't erase the rest of the screen. Regardless, the prompting change also bypassed the ability to show the prompt with raw_printf() if the display wasn't fully intialized yet, so some change to the revised prompting was necessary anyway. Switching back from putstr(WIN_MESSAGE) to pline() resulted in duplicated entries in DUMPLOG message history, one with bare prompt followed by another with response appended, so more tweaking was needed. The result is use of new custompline() instead of normal pline(). custompline() accepts some message handling flags to give more control over pline()'s behavior. It's a more general variation of Norep() but its caller needs to specify an extra argument.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 hack.h $NHDT-Date: 1451683048 2016/01/01 21:17:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.68 $ */
|
||||
/* NetHack 3.6 hack.h $NHDT-Date: 1490908464 2017/03/30 21:14:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.76 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -359,6 +359,12 @@ enum explosion_types {
|
||||
#define XKILL_NOCORPSE 2
|
||||
#define XKILL_NOCONDUCT 4
|
||||
|
||||
/* pline_flags; mask values for custompline()'s first argument */
|
||||
/* #define PLINE_ORDINARY 0 */
|
||||
#define PLINE_NOREPEAT 1
|
||||
#define OVERRIDE_MSGTYPE 2
|
||||
#define SUPPRESS_HISTORY 4
|
||||
|
||||
/* Macros for messages referring to hands, eyes, feet, etc... */
|
||||
enum bodypart_types {
|
||||
ARM = 0,
|
||||
|
||||
Reference in New Issue
Block a user