Merge branch 'NetHack-3.6'
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.311 $ $NHDT-Date: 1562719337 2019/07/10 00:42:17 $
|
.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.312 $ $NHDT-Date: 1562838836 2019/07/11 09:53:56 $
|
||||||
.\"
|
.\"
|
||||||
.\" This is an excerpt from the 'roff' man page from the 'groff' package.
|
.\" This is an excerpt from the 'roff' man page from the 'groff' package.
|
||||||
.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
|
.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
|
||||||
@@ -1104,6 +1104,12 @@ Autocompletes.
|
|||||||
Default key is \(oqM-e\(cq.
|
Default key is \(oqM-e\(cq.
|
||||||
.lp #exploremode
|
.lp #exploremode
|
||||||
Enter the explore mode.
|
Enter the explore mode.
|
||||||
|
.lp ""
|
||||||
|
Requires confirmation; default response is \f(CRn\fP (no).
|
||||||
|
To really switch to explore mode, respond with \f(CRy\fP.
|
||||||
|
You can set the
|
||||||
|
.op paranoid_confirmation:quit
|
||||||
|
option to require a response of \f(CRyes\fP instead.
|
||||||
.lp "#fire "
|
.lp "#fire "
|
||||||
Fire ammunition from quiver.
|
Fire ammunition from quiver.
|
||||||
Default key is \(oqf\(cq.
|
Default key is \(oqf\(cq.
|
||||||
@@ -1211,6 +1217,12 @@ Test the panic routine.
|
|||||||
Terminates the current game.
|
Terminates the current game.
|
||||||
Autocompletes.
|
Autocompletes.
|
||||||
Debug mode only.
|
Debug mode only.
|
||||||
|
.lp ""
|
||||||
|
Asks for confirmation; default is \f(CRn\fP (no); continue playing.
|
||||||
|
To really panic, respond with \f(CRy\fP.
|
||||||
|
You can set the
|
||||||
|
.op paranoid_confirmation:quit
|
||||||
|
option to require a response of \f(CRyes\fP instead.
|
||||||
.lp "#pay "
|
.lp "#pay "
|
||||||
Pay your shopping bill.
|
Pay your shopping bill.
|
||||||
Default key is \(oqp\(cq.
|
Default key is \(oqp\(cq.
|
||||||
@@ -1251,10 +1263,11 @@ Default key is \(oqM-q\(cq.
|
|||||||
.lp ""
|
.lp ""
|
||||||
Since using this command by accident would throw away the current game,
|
Since using this command by accident would throw away the current game,
|
||||||
you are asked to confirm your intent before quitting.
|
you are asked to confirm your intent before quitting.
|
||||||
By default a response of \(oqy\(cq acknowledges that intent.
|
Default response is \f(CRn\fP (no); continue playing.
|
||||||
|
To really quit, respond with \f(CRy\fP.
|
||||||
You can set the
|
You can set the
|
||||||
.op paranoid_confirmation
|
.op paranoid_confirmation:quit
|
||||||
option to require a response of \(lqyes\(rq instead.
|
option to require a response of \f(CRyes\fP instead.
|
||||||
.lp "#quiver "
|
.lp "#quiver "
|
||||||
Select ammunition for quiver.
|
Select ammunition for quiver.
|
||||||
Default key is \(oqQ\(cq.
|
Default key is \(oqQ\(cq.
|
||||||
|
|||||||
@@ -1216,7 +1216,13 @@ Advance or check weapon and spell skills. Autocompletes.
|
|||||||
Default key is `{\tt M-e}'.
|
Default key is `{\tt M-e}'.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#exploremode}]
|
\item[\tb{\#exploremode}]
|
||||||
Enter the explore mode.
|
Enter the explore mode.\\
|
||||||
|
%.lp ""
|
||||||
|
Requires confirmation; default response is `{\tt n}' (no).
|
||||||
|
To really switch to explore mode, respond with `{\tt y}'.
|
||||||
|
You can set the
|
||||||
|
{\it paranoid\verb+_+confirmation:quit\/}
|
||||||
|
option to require a response of ``{\tt yes}'' instead.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#fire}]
|
\item[\tb{\#fire}]
|
||||||
Fire ammunition from quiver. Default key is `{\tt f}'.
|
Fire ammunition from quiver. Default key is `{\tt f}'.
|
||||||
@@ -1324,7 +1330,13 @@ Default keys are `{\tt \^{}O}', and `{\tt M-O}'.
|
|||||||
Test the panic routine.
|
Test the panic routine.
|
||||||
Terminates the current game.
|
Terminates the current game.
|
||||||
Autocompletes.
|
Autocompletes.
|
||||||
Debug mode only.
|
Debug mode only.\\
|
||||||
|
%.lp ""
|
||||||
|
Asks for confirmation; default is `{\tt n}' (no); continue playing.
|
||||||
|
To really panic, respond with `{\tt y}''.
|
||||||
|
You can set the
|
||||||
|
{\it paranoid\verb+_+confirmation:quit\/}
|
||||||
|
option to require a response of ``{\tt yes}'' instead.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#pay}]
|
\item[\tb{\#pay}]
|
||||||
Pay your shopping bill. Default key is `{\tt p}'.
|
Pay your shopping bill. Default key is `{\tt p}'.
|
||||||
@@ -1361,12 +1373,14 @@ Quaff (drink) something. Default key is `{\tt q}'.
|
|||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#quit}]
|
\item[\tb{\#quit}]
|
||||||
Quit the program without saving your game. Autocompletes.
|
Quit the program without saving your game. Autocompletes.
|
||||||
Default key is `{\tt M-q}'.
|
Default key is `{\tt M-q}'.\\
|
||||||
%.lp ""
|
%.lp ""
|
||||||
Since using this command by accident would throw away the current game,
|
Since using this command by accident would throw away the current game,
|
||||||
you are asked to confirm your intent before quitting. By default a
|
you are asked to confirm your intent before quitting.
|
||||||
response of `{\tt y}' acknowledges that intent. You can set the
|
Default response is `{\tt n}' (no); continue playing.
|
||||||
{\it paranoid\verb+_+confirmation\/}
|
To really quit, respond with `{\tt y}'.
|
||||||
|
You can set the
|
||||||
|
{\it paranoid\verb+_+confirmation:quit\/}
|
||||||
option to require a response of ``{\tt yes}'' instead.
|
option to require a response of ``{\tt yes}'' instead.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#quiver}]
|
\item[\tb{\#quiver}]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.92 $ $NHDT-Date: 1562806584 2019/07/11 00:56:24 $
|
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ $NHDT-Date: 1562838835 2019/07/11 09:53:55 $
|
||||||
|
|
||||||
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
||||||
@@ -104,6 +104,7 @@ detect unseen/secret door detection/^E failed to find monsters hiding under
|
|||||||
when farlook describes a monster at a visible spot as trapped, reveal the trap
|
when farlook describes a monster at a visible spot as trapped, reveal the trap
|
||||||
fix theft when poly'd into nymph form; 3.6.2 change made that anger the victim
|
fix theft when poly'd into nymph form; 3.6.2 change made that anger the victim
|
||||||
hero poly'd into nymph would steal gold along with other items
|
hero poly'd into nymph would steal gold along with other items
|
||||||
|
change wizard mode #panic to require "yes" if 'paranoid_confirm:quit' is set
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
||||||
@@ -175,6 +176,7 @@ curses: when map window was clipped, the 'scrollbars' shown to indicate which
|
|||||||
the 2nd and 3rd fifths (for example) were currently within view
|
the 2nd and 3rd fifths (for example) were currently within view
|
||||||
curses: support users's setting for erase char and kill char when getting a
|
curses: support users's setting for erase char and kill char when getting a
|
||||||
line of input with 'popup_dialog' Off (already supported for popup On)
|
line of input with 'popup_dialog' Off (already supported for popup On)
|
||||||
|
curses: support erase char and kill char when choosing an extended command
|
||||||
curses: attempting to use ^H to rush left actually executed ^G (#wizgenesis)
|
curses: attempting to use ^H to rush left actually executed ^G (#wizgenesis)
|
||||||
curses: disable the attempt to support Ctrl+Left_click as an alternate way
|
curses: disable the attempt to support Ctrl+Left_click as an alternate way
|
||||||
to generate Right_click for systems with one-button mouse or trackpad;
|
to generate Right_click for systems with one-button mouse or trackpad;
|
||||||
|
|||||||
@@ -404,6 +404,12 @@ struct early_opt {
|
|||||||
boolean valallowed;
|
boolean valallowed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* topline states */
|
||||||
|
#define TOPLINE_EMPTY 0 /* empty */
|
||||||
|
#define TOPLINE_NEED_MORE 1 /* non-empty, need --More-- */
|
||||||
|
#define TOPLINE_NON_EMPTY 2 /* non-empty, no --More-- required */
|
||||||
|
#define TOPLINE_SPECIAL_PROMPT 3 /* special prompt state */
|
||||||
|
|
||||||
/* special key functions */
|
/* special key functions */
|
||||||
enum nh_keyfunc {
|
enum nh_keyfunc {
|
||||||
NHKF_ESC = 0,
|
NHKF_ESC = 0,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1562532731 2019/07/07 20:52:11 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.339 $ */
|
/* NetHack 3.6 cmd.c $NHDT-Date: 1562838823 2019/07/11 09:53:43 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.340 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -990,7 +990,8 @@ wiz_panic(VOID_ARGS)
|
|||||||
u.uen = u.uenmax = 1000;
|
u.uen = u.uenmax = 1000;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (yn("Do you want to call panic() and end your game?") == 'y')
|
if (paranoid_query(ParanoidQuit,
|
||||||
|
"Do you want to call panic() and end your game?"))
|
||||||
panic("Crash test.");
|
panic("Crash test.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
#define strncasecmp strncmpi
|
#define strncasecmp strncmpi
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* defined in sys/<foo>/<foo>tty.c or cursmain.c as last resort;
|
||||||
|
set up by curses_init_nhwindows() */
|
||||||
|
extern char erase_char, kill_char;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note:
|
* Note:
|
||||||
*
|
*
|
||||||
@@ -412,7 +416,7 @@ curses_ext_cmd()
|
|||||||
wmove(extwin, starty, startx + 2);
|
wmove(extwin, starty, startx + 2);
|
||||||
waddstr(extwin, cur_choice);
|
waddstr(extwin, cur_choice);
|
||||||
wmove(extwin, starty, (int) strlen(cur_choice) + startx + 2);
|
wmove(extwin, starty, (int) strlen(cur_choice) + startx + 2);
|
||||||
wprintw(extwin, " ");
|
wclrtoeol(extwin);
|
||||||
|
|
||||||
/* if we have an autocomplete command, AND it matches uniquely */
|
/* if we have an autocomplete command, AND it matches uniquely */
|
||||||
if (matches == 1) {
|
if (matches == 1) {
|
||||||
@@ -421,12 +425,12 @@ curses_ext_cmd()
|
|||||||
wprintw(extwin, "%s",
|
wprintw(extwin, "%s",
|
||||||
extcmdlist[ret].ef_txt + (int) strlen(cur_choice));
|
extcmdlist[ret].ef_txt + (int) strlen(cur_choice));
|
||||||
curses_toggle_color_attr(extwin, NONE, A_UNDERLINE, OFF);
|
curses_toggle_color_attr(extwin, NONE, A_UNDERLINE, OFF);
|
||||||
mvwprintw(extwin, starty,
|
|
||||||
(int) strlen(extcmdlist[ret].ef_txt) + 2, " ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
curs_set(1);
|
||||||
wrefresh(extwin);
|
wrefresh(extwin);
|
||||||
letter = getch();
|
letter = getch();
|
||||||
|
curs_set(0);
|
||||||
prompt_width = (int) strlen(cur_choice);
|
prompt_width = (int) strlen(cur_choice);
|
||||||
matches = 0;
|
matches = 0;
|
||||||
|
|
||||||
@@ -448,8 +452,9 @@ curses_ext_cmd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (letter == '\177') /* DEL/Rubout */
|
if (letter == '\177') /* DEL/Rubout */
|
||||||
letter = '\b';
|
letter = '\b';
|
||||||
if (letter == '\b' || letter == KEY_BACKSPACE) {
|
if (letter == '\b' || letter == KEY_BACKSPACE
|
||||||
|
|| (erase_char && letter == (int) (uchar) erase_char)) {
|
||||||
if (prompt_width == 0) {
|
if (prompt_width == 0) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
@@ -458,7 +463,15 @@ curses_ext_cmd()
|
|||||||
letter = '*';
|
letter = '*';
|
||||||
prompt_width--;
|
prompt_width--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* honor kill_char if it's ^U or similar, but not if it's '@' */
|
||||||
|
} else if (kill_char && letter == (int) (uchar) kill_char
|
||||||
|
&& (letter < ' ' || letter >= '\177')) { /*ASCII*/
|
||||||
|
cur_choice[0] = '\0';
|
||||||
|
letter = '*';
|
||||||
|
prompt_width = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (letter != '*' && prompt_width < maxlen) {
|
if (letter != '*' && prompt_width < maxlen) {
|
||||||
cur_choice[prompt_width] = letter;
|
cur_choice[prompt_width] = letter;
|
||||||
cur_choice[prompt_width + 1] = '\0';
|
cur_choice[prompt_width + 1] = '\0';
|
||||||
@@ -486,7 +499,8 @@ curses_ext_cmd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
curses_destroy_win(extwin);
|
curses_destroy_win(extwin);
|
||||||
if (extwin2) curses_destroy_win(extwin2);
|
if (extwin2)
|
||||||
|
curses_destroy_win(extwin2);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ getlin_hook_proc hook;
|
|||||||
struct WinDesc *cw = wins[WIN_MESSAGE];
|
struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||||
boolean doprev = 0;
|
boolean doprev = 0;
|
||||||
|
|
||||||
if (ttyDisplay->toplin == 1 && !(cw->flags & WIN_STOP))
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE && !(cw->flags & WIN_STOP))
|
||||||
more();
|
more();
|
||||||
cw->flags &= ~WIN_STOP;
|
cw->flags &= ~WIN_STOP;
|
||||||
ttyDisplay->toplin = 3; /* special prompt state */
|
ttyDisplay->toplin = TOPLINE_SPECIAL_PROMPT;
|
||||||
ttyDisplay->inread++;
|
ttyDisplay->inread++;
|
||||||
|
|
||||||
/* issue the prompt */
|
/* issue the prompt */
|
||||||
@@ -193,7 +193,7 @@ getlin_hook_proc hook;
|
|||||||
} else
|
} else
|
||||||
tty_nhbell();
|
tty_nhbell();
|
||||||
}
|
}
|
||||||
ttyDisplay->toplin = 2; /* nonempty, no --More-- required */
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
ttyDisplay->inread--;
|
ttyDisplay->inread--;
|
||||||
clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */
|
clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ const char *str;
|
|||||||
end_glyphout(); /* in case message printed during graphics output */
|
end_glyphout(); /* in case message printed during graphics output */
|
||||||
putsyms(str);
|
putsyms(str);
|
||||||
cl_end();
|
cl_end();
|
||||||
ttyDisplay->toplin = 1;
|
ttyDisplay->toplin = TOPLINE_NEED_MORE;
|
||||||
if (ttyDisplay->cury && otoplin != 3)
|
if (ttyDisplay->cury && otoplin != 3)
|
||||||
more();
|
more();
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ const char *str;
|
|||||||
struct WinDesc *cw = wins[WIN_MESSAGE];
|
struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||||
|
|
||||||
if (!(cw->flags & WIN_STOP)) {
|
if (!(cw->flags & WIN_STOP)) {
|
||||||
if (ttyDisplay->cury && ttyDisplay->toplin == 2)
|
if (ttyDisplay->cury && ttyDisplay->toplin == TOPLINE_NON_EMPTY)
|
||||||
tty_clear_nhwindow(WIN_MESSAGE);
|
tty_clear_nhwindow(WIN_MESSAGE);
|
||||||
|
|
||||||
cw->curx = cw->cury = 0;
|
cw->curx = cw->cury = 0;
|
||||||
@@ -159,8 +159,8 @@ const char *str;
|
|||||||
cl_end();
|
cl_end();
|
||||||
addtopl(str);
|
addtopl(str);
|
||||||
|
|
||||||
if (ttyDisplay->cury && ttyDisplay->toplin != 3)
|
if (ttyDisplay->cury && ttyDisplay->toplin != TOPLINE_SPECIAL_PROMPT)
|
||||||
ttyDisplay->toplin = 2;
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ const char *s;
|
|||||||
tty_curs(BASE_WINDOW, cw->curx + 1, cw->cury);
|
tty_curs(BASE_WINDOW, cw->curx + 1, cw->cury);
|
||||||
putsyms(s);
|
putsyms(s);
|
||||||
cl_end();
|
cl_end();
|
||||||
ttyDisplay->toplin = 1;
|
ttyDisplay->toplin = TOPLINE_NEED_MORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -236,7 +236,7 @@ more()
|
|||||||
home();
|
home();
|
||||||
cl_end();
|
cl_end();
|
||||||
}
|
}
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
ttyDisplay->inmore = 0;
|
ttyDisplay->inmore = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ register const char *bp;
|
|||||||
/* If there is room on the line, print message on same line */
|
/* If there is room on the line, print message on same line */
|
||||||
/* But messages like "You die..." deserve their own line */
|
/* But messages like "You die..." deserve their own line */
|
||||||
n0 = strlen(bp);
|
n0 = strlen(bp);
|
||||||
if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP))
|
if ((ttyDisplay->toplin == TOPLINE_NEED_MORE || (cw->flags & WIN_STOP))
|
||||||
&& cw->cury == 0
|
&& cw->cury == 0
|
||||||
&& n0 + (int) strlen(g.toplines) + 3 < CO - 8 /* room for --More-- */
|
&& n0 + (int) strlen(g.toplines) + 3 < CO - 8 /* room for --More-- */
|
||||||
&& (notdied = strncmp(bp, "You die", 7)) != 0) {
|
&& (notdied = strncmp(bp, "You die", 7)) != 0) {
|
||||||
@@ -263,9 +263,9 @@ register const char *bp;
|
|||||||
addtopl(bp);
|
addtopl(bp);
|
||||||
return;
|
return;
|
||||||
} else if (!(cw->flags & WIN_STOP)) {
|
} else if (!(cw->flags & WIN_STOP)) {
|
||||||
if (ttyDisplay->toplin == 1) {
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE) {
|
||||||
more();
|
more();
|
||||||
} else if (cw->cury) { /* for when flags.toplin == 2 && cury > 1 */
|
} else if (cw->cury) { /* for toplin == TOPLINE_NON_EMPTY && cury > 1 */
|
||||||
docorner(1, cw->cury + 1); /* reset cury = 0 if redraw screen */
|
docorner(1, cw->cury + 1); /* reset cury = 0 if redraw screen */
|
||||||
cw->curx = cw->cury = 0; /* from home--cls() & docorner(1,n) */
|
cw->curx = cw->cury = 0; /* from home--cls() & docorner(1,n) */
|
||||||
}
|
}
|
||||||
@@ -381,10 +381,10 @@ char def;
|
|||||||
char prompt[BUFSZ];
|
char prompt[BUFSZ];
|
||||||
|
|
||||||
yn_number = 0L;
|
yn_number = 0L;
|
||||||
if (ttyDisplay->toplin == 1 && !(cw->flags & WIN_STOP))
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE && !(cw->flags & WIN_STOP))
|
||||||
more();
|
more();
|
||||||
cw->flags &= ~WIN_STOP;
|
cw->flags &= ~WIN_STOP;
|
||||||
ttyDisplay->toplin = 3; /* special prompt state */
|
ttyDisplay->toplin = TOPLINE_SPECIAL_PROMPT;
|
||||||
ttyDisplay->inread++;
|
ttyDisplay->inread++;
|
||||||
if (resp) {
|
if (resp) {
|
||||||
char *rb, respbuf[QBUFSZ];
|
char *rb, respbuf[QBUFSZ];
|
||||||
@@ -531,7 +531,7 @@ char def;
|
|||||||
dumplogmsg(g.toplines);
|
dumplogmsg(g.toplines);
|
||||||
#endif
|
#endif
|
||||||
ttyDisplay->inread--;
|
ttyDisplay->inread--;
|
||||||
ttyDisplay->toplin = 2;
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
if (ttyDisplay->intr)
|
if (ttyDisplay->intr)
|
||||||
ttyDisplay->intr--;
|
ttyDisplay->intr--;
|
||||||
if (wins[WIN_MESSAGE]->cury)
|
if (wins[WIN_MESSAGE]->cury)
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ int sig_unused UNUSED;
|
|||||||
new_status_window();
|
new_status_window();
|
||||||
if (u.ux) {
|
if (u.ux) {
|
||||||
i = ttyDisplay->toplin;
|
i = ttyDisplay->toplin;
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
docrt();
|
docrt();
|
||||||
bot();
|
bot();
|
||||||
ttyDisplay->toplin = i;
|
ttyDisplay->toplin = i;
|
||||||
@@ -418,7 +418,7 @@ char **argv UNUSED;
|
|||||||
|
|
||||||
/* set up tty descriptor */
|
/* set up tty descriptor */
|
||||||
ttyDisplay = (struct DisplayDesc *) alloc(sizeof (struct DisplayDesc));
|
ttyDisplay = (struct DisplayDesc *) alloc(sizeof (struct DisplayDesc));
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
ttyDisplay->rows = hgt;
|
ttyDisplay->rows = hgt;
|
||||||
ttyDisplay->cols = wid;
|
ttyDisplay->cols = wid;
|
||||||
ttyDisplay->curx = ttyDisplay->cury = 0;
|
ttyDisplay->curx = ttyDisplay->cury = 0;
|
||||||
@@ -1619,12 +1619,12 @@ winid window;
|
|||||||
|
|
||||||
switch (cw->type) {
|
switch (cw->type) {
|
||||||
case NHW_MESSAGE:
|
case NHW_MESSAGE:
|
||||||
if (ttyDisplay->toplin) {
|
if (ttyDisplay->toplin != TOPLINE_EMPTY) {
|
||||||
home();
|
home();
|
||||||
cl_end();
|
cl_end();
|
||||||
if (cw->cury)
|
if (cw->cury)
|
||||||
docorner(1, cw->cury + 1);
|
docorner(1, cw->cury + 1);
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NHW_STATUS:
|
case NHW_STATUS:
|
||||||
@@ -2315,12 +2315,13 @@ boolean blocking; /* with ttys, all windows are blocking */
|
|||||||
|
|
||||||
switch (cw->type) {
|
switch (cw->type) {
|
||||||
case NHW_MESSAGE:
|
case NHW_MESSAGE:
|
||||||
if (ttyDisplay->toplin == 1) {
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE) {
|
||||||
more();
|
more();
|
||||||
ttyDisplay->toplin = 1; /* more resets this */
|
ttyDisplay->toplin = TOPLINE_NEED_MORE; /* more resets this */
|
||||||
tty_clear_nhwindow(window);
|
tty_clear_nhwindow(window);
|
||||||
|
/* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
|
||||||
} else
|
} else
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
cw->curx = cw->cury = 0;
|
cw->curx = cw->cury = 0;
|
||||||
if (!cw->active)
|
if (!cw->active)
|
||||||
iflags.window_inited = TRUE;
|
iflags.window_inited = TRUE;
|
||||||
@@ -2328,8 +2329,8 @@ boolean blocking; /* with ttys, all windows are blocking */
|
|||||||
case NHW_MAP:
|
case NHW_MAP:
|
||||||
end_glyphout();
|
end_glyphout();
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
if (!ttyDisplay->toplin)
|
if (ttyDisplay->toplin != TOPLINE_EMPTY)
|
||||||
ttyDisplay->toplin = 1;
|
ttyDisplay->toplin = TOPLINE_NEED_MORE;
|
||||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2359,7 +2360,7 @@ boolean blocking; /* with ttys, all windows are blocking */
|
|||||||
cw->offx = 0;
|
cw->offx = 0;
|
||||||
if (cw->type == NHW_MENU)
|
if (cw->type == NHW_MENU)
|
||||||
cw->offy = 0;
|
cw->offy = 0;
|
||||||
if (ttyDisplay->toplin == 1)
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE)
|
||||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
#ifdef H2344_BROKEN
|
#ifdef H2344_BROKEN
|
||||||
if (cw->maxrow >= (int) ttyDisplay->rows
|
if (cw->maxrow >= (int) ttyDisplay->rows
|
||||||
@@ -2375,7 +2376,7 @@ boolean blocking; /* with ttys, all windows are blocking */
|
|||||||
cl_eos();
|
cl_eos();
|
||||||
} else
|
} else
|
||||||
clear_screen();
|
clear_screen();
|
||||||
ttyDisplay->toplin = 0;
|
ttyDisplay->toplin = TOPLINE_EMPTY;
|
||||||
} else {
|
} else {
|
||||||
if (WIN_MESSAGE != WIN_ERR)
|
if (WIN_MESSAGE != WIN_ERR)
|
||||||
tty_clear_nhwindow(WIN_MESSAGE);
|
tty_clear_nhwindow(WIN_MESSAGE);
|
||||||
@@ -2404,8 +2405,9 @@ winid window;
|
|||||||
|
|
||||||
switch (cw->type) {
|
switch (cw->type) {
|
||||||
case NHW_MESSAGE:
|
case NHW_MESSAGE:
|
||||||
if (ttyDisplay->toplin)
|
if (ttyDisplay->toplin != TOPLINE_EMPTY)
|
||||||
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
tty_display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
|
/* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_STATUS:
|
case NHW_STATUS:
|
||||||
case NHW_BASE:
|
case NHW_BASE:
|
||||||
@@ -3156,10 +3158,11 @@ const char *mesg;
|
|||||||
response to a prompt, we'll assume that the display is up to date */
|
response to a prompt, we'll assume that the display is up to date */
|
||||||
tty_putstr(WIN_MESSAGE, 0, mesg);
|
tty_putstr(WIN_MESSAGE, 0, mesg);
|
||||||
/* if `mesg' didn't wrap (triggering --More--), force --More-- now */
|
/* if `mesg' didn't wrap (triggering --More--), force --More-- now */
|
||||||
if (ttyDisplay->toplin == 1) {
|
if (ttyDisplay->toplin == TOPLINE_NEED_MORE) {
|
||||||
more();
|
more();
|
||||||
ttyDisplay->toplin = 1; /* more resets this */
|
ttyDisplay->toplin = TOPLINE_NEED_MORE; /* more resets this */
|
||||||
tty_clear_nhwindow(WIN_MESSAGE);
|
tty_clear_nhwindow(WIN_MESSAGE);
|
||||||
|
/* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
|
||||||
}
|
}
|
||||||
/* normally <ESC> means skip further messages, but in this case
|
/* normally <ESC> means skip further messages, but in this case
|
||||||
it means cancel the current prompt; any other messages should
|
it means cancel the current prompt; any other messages should
|
||||||
@@ -3199,7 +3202,7 @@ tty_wait_synch()
|
|||||||
(void) fflush(stdout);
|
(void) fflush(stdout);
|
||||||
} else if (ttyDisplay->inread > g.program_state.gameover) {
|
} else if (ttyDisplay->inread > g.program_state.gameover) {
|
||||||
/* this can only happen if we were reading and got interrupted */
|
/* this can only happen if we were reading and got interrupted */
|
||||||
ttyDisplay->toplin = 3;
|
ttyDisplay->toplin = TOPLINE_SPECIAL_PROMPT;
|
||||||
/* do this twice; 1st time gets the Quit? message again */
|
/* do this twice; 1st time gets the Quit? message again */
|
||||||
(void) tty_doprev_message();
|
(void) tty_doprev_message();
|
||||||
(void) tty_doprev_message();
|
(void) tty_doprev_message();
|
||||||
@@ -3528,8 +3531,9 @@ tty_nhgetch()
|
|||||||
i = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */
|
i = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */
|
||||||
else if (i == EOF)
|
else if (i == EOF)
|
||||||
i = '\033'; /* same for EOF */
|
i = '\033'; /* same for EOF */
|
||||||
if (ttyDisplay && ttyDisplay->toplin == 1)
|
/* topline has been seen - we can clear need for more */
|
||||||
ttyDisplay->toplin = 2;
|
if (ttyDisplay && ttyDisplay->toplin == TOPLINE_NEED_MORE)
|
||||||
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
#ifdef TTY_TILES_ESCCODES
|
#ifdef TTY_TILES_ESCCODES
|
||||||
{
|
{
|
||||||
/* hack to force output of the window select code */
|
/* hack to force output of the window select code */
|
||||||
@@ -3608,8 +3612,9 @@ tty_nhgetch()
|
|||||||
i = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */
|
i = '\033'; /* map NUL to ESC since nethack doesn't expect NUL */
|
||||||
else if (i == EOF)
|
else if (i == EOF)
|
||||||
i = '\033'; /* same for EOF */
|
i = '\033'; /* same for EOF */
|
||||||
if (ttyDisplay && ttyDisplay->toplin == 1)
|
/* topline has been seen - we can clear need for more */
|
||||||
ttyDisplay->toplin = 2;
|
if (ttyDisplay && ttyDisplay->toplin == TOPLINE_NEED_MORE)
|
||||||
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
#ifdef TTY_TILES_ESCCODES
|
#ifdef TTY_TILES_ESCCODES
|
||||||
{
|
{
|
||||||
/* hack to force output of the window select code */
|
/* hack to force output of the window select code */
|
||||||
@@ -3654,8 +3659,9 @@ int *x, *y, *mod;
|
|||||||
i = ntposkey(x, y, mod);
|
i = ntposkey(x, y, mod);
|
||||||
if (!i && mod && (*mod == 0 || *mod == EOF))
|
if (!i && mod && (*mod == 0 || *mod == EOF))
|
||||||
i = '\033'; /* map NUL or EOF to ESC, nethack doesn't expect either */
|
i = '\033'; /* map NUL or EOF to ESC, nethack doesn't expect either */
|
||||||
if (ttyDisplay && ttyDisplay->toplin == 1)
|
/* topline has been seen - we can clear need for more */
|
||||||
ttyDisplay->toplin = 2;
|
if (ttyDisplay && ttyDisplay->toplin == TOPLINE_NEED_MORE)
|
||||||
|
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
|
||||||
#else /* !WIN32CON */
|
#else /* !WIN32CON */
|
||||||
nhUse(x);
|
nhUse(x);
|
||||||
nhUse(y);
|
nhUse(y);
|
||||||
|
|||||||
Reference in New Issue
Block a user