display effect. on MSDOS without the termcap
lib, whether or not to pause for visual effect. [TRUE]
-Boolean option if TTY_GRAPHICS was set at compile time:
-msg_window show previous messages in a screen-size window [FALSE]
-
Boolean option if USE_TILES was set at compile time (MSDOS protected mode only):
preload_tiles control whether tiles get pre-loaded into RAM at the
start of the game. Doing so enhances performance
default: ^^^^^^^^^^^^^^^^^"^^^^
windowtype windowing system to be used [depends on operating system]
+Compound option if TTY_GRAPHICS was set at compile time:
+msg_window the type of message window to use:
+ Single -- One message at a time
+ Full -- Full window with all saved top line messages
+ Reverse -- Same as full, but messages printed most-recent-first
+ Combination -- Two single messages, then as full
Some sample options lists are:
!autopickup,!tombstone,name:Gandalf,scores:own/3 top/2 around
.ds vr "NetHack 3.4
.ds f0 "\*(vr
.ds f1
-.ds f2 "April 3, 2002
+.ds f2 "April 20, 2002
.mt
A Guide to the Mazes of Menace
(Guidebook for NetHack)
The number of top line messages to save (and recall with ^P) (default 20).
Cannot be set with the `O' command.
.lp msg_window
-Use a screen-size window to show the previous messages with ^P instead of
-showing them one at a time. (Currently implemented for tty only.)
+Allows you to change the way recalled messages are displayed.
+(It is currently implemented for tty only.)
+The possible values are:
+.sd
+.si
+s - single message (the default prior to 3.4.0).
+c - combination, two messages as `single', then as `full'.
+f - full window, oldest message first.
+r - full window, newest message first.
+.ei
+.ed
+For backward compatibility, no value needs to be specified (which
+defaults to `full'), or it can be negated (which defaults to `single').
.lp "name "
Set your character's name (defaults to your user name). You can also
set your character's role by appending a dash and one or more letters of
\begin{document}
%
% input file: guidebook.mn
-% $Revision: 1.40 $ $Date: 2002/04/04 03:44:18 $
+% $Revision: 1.41 $ $Date: 2002/04/13 16:00:06 $
%
%.ds h0 "
%.ds h1 %.ds h2 \%
%.au
\author{Eric S. Raymond\\
(Extensively edited and expanded for 3.4)}
-\date{April 3, 2002}
+\date{April 20, 2002}
\maketitle
(default 20). Cannot be set with the `{\tt O}' command.
%.lp
\item[\ib{msg\_window}]
-Use a screen-size window to show the previous messages with `{\tt \^{}P}'
-instead of showing them one at a time. (Currently implemented for tty only.)
+Allows you to change the way recalled messages are displayed.
+(It is currently implemented for tty only.) The possible values are:
+
+%.sd
+%.si
+{\tt s} --- single message (the default prior to 3.4.0).\\
+{\tt c} --- combination, two messages as {\it single\/}, then as {\it full\/}.\\
+{\tt f} --- full window, oldest message first.\\
+{\tt r} --- full window, newest message first.
+%.ei
+%.ed
+
+For backward compatibility, no value needs to be specified (which
+defaults to {\it full\/}), or it can be negated (which defaults
+to {\it single\/}).
%.lp
\item[\ib{name}]
Set your character's name (defaults to your user name). You can also
boolean mon_polycontrol; /* debug: control monster polymorphs */
#endif
#ifdef TTY_GRAPHICS
- boolean prevmsg_window; /* show more old messages at a time */
+ char prevmsg_window; /* type of old message window to use */
boolean extmenu; /* extended commands use menu interface */
#endif
#ifdef MFLOPPY
-/* SCCS Id: @(#)patchlevel.h 3.4 2002/03/29 */
+/* SCCS Id: @(#)patchlevel.h 3.4 2002/04/20 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/*****************************************************************************/
/* Version 3.4.x */
-/* Patch 1, March 31, 2002
- * Fix a fatal error involving land mines and boulders/statues
- * Several message and other glitches corrected
+/* Patch 1, May 1, 2002
+ * Fix a couple of fatal errors including one for reentering shops, one
+ * involving land mines and boulders/statues, and one for delayed
+ * polymorph
+ * Dozens of general bug fixes
+ * Several message and other glitches corrected
+ * Travel command adjustments and ability to disable travel command
* win32: some interface improvements
* unix: improved tile support
+ * message recall window extensions (by Christian Cooper)
*/
/*
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
#else
{"menu_tab_sep", (boolean *)0, FALSE, SET_IN_FILE},
-#endif
-#ifdef TTY_GRAPHICS
- {"msg_window", &iflags.prevmsg_window, FALSE, SET_IN_GAME},
-#else
- {"msg_window", (boolean *)0, FALSE, SET_IN_FILE},
#endif
{"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/
#ifdef NEWS
MAXMCLASSES, SET_IN_FILE },
{ "msghistory", "number of top line messages to save",
5, DISP_IN_GAME },
+# ifdef TTY_GRAPHICS
+ {"msg_window", "the type of message window required",1, SET_IN_GAME},
+# else
+ {"msg_window", "the type of message window required", 1, SET_IN_FILE},
+# endif
{ "name", "your character's name (e.g., name:Merlin-W)",
PL_NSIZ, DISP_IN_GAME },
{ "objects", "the symbols to use for objects",
flags.end_top = 3;
flags.end_around = 2;
iflags.msg_history = 20;
+ iflags.prevmsg_window = 's';
/* Use negative indices to indicate not yet selected */
flags.initrole = -1;
return;
}
+#ifdef TTY_GRAPHICS
+ fullname="msg_window";
+ /* msg_window:single, combo, full or reversed */
+ if (match_optname(opts, fullname, 4, TRUE)) {
+ int tmp;
+ if (!(op = string_for_opt(opts, TRUE))) {
+ tmp = negated ? 's' : 'f';
+ } else {
+ if (negated) {
+ bad_negation(fullname, TRUE);
+ return;
+ }
+ tmp = tolower(*op);
+ }
+ switch (tmp) {
+ case 's': /* single message history cycle (default if negated) */
+ iflags.prevmsg_window = 's';
+ break;
+ case 'c': /* combination: two singles, then full page reversed */
+ iflags.prevmsg_window = 'c';
+ break;
+ case 'f': /* full page (default if no opts) */
+ iflags.prevmsg_window = 'f';
+ break;
+ case 'r': /* full page (reversed) */
+ iflags.prevmsg_window = 'r';
+ break;
+ default:
+ badoption(opts);
+ }
+ return;
+ }
+#endif
+
/* WINCAP
* setting font options */
fullname = "font";
char buf[BUFSZ];
boolean retval = FALSE;
- /* Special handling of menustyle, pickup_burden, and pickup_types, disclose options. */
+ /* Special handling of menustyle, pickup_burden, and pickup_types, disclose
+ and msg_window options. */
if (!strcmp("menustyle", optname)) {
const char *style_name;
menu_item *style_pick = (menu_item *)0;
}
}
retval = TRUE;
+ } else if (!strcmp("msg_window", optname)) {
+ /* by Christian W. Cooper */
+ menu_item *window_pick = (menu_item *)0;
+ tmpwin = create_nhwindow(NHW_MENU);
+ start_menu(tmpwin);
+ any.a_char = 's';
+ add_menu(tmpwin, NO_GLYPH, &any, 's', 0,
+ ATR_NONE, "single", MENU_UNSELECTED);
+ any.a_char = 'c';
+ add_menu(tmpwin, NO_GLYPH, &any, 'c', 0,
+ ATR_NONE, "combination", MENU_UNSELECTED);
+ any.a_char = 'f';
+ add_menu(tmpwin, NO_GLYPH, &any, 'f', 0,
+ ATR_NONE, "full", MENU_UNSELECTED);
+ any.a_char = 'r';
+ add_menu(tmpwin, NO_GLYPH, &any, 'r', 0,
+ ATR_NONE, "reversed", MENU_UNSELECTED);
+ end_menu(tmpwin, "Select message history display type:");
+ if (select_menu(tmpwin, PICK_ONE, &window_pick) > 0) {
+ iflags.prevmsg_window = window_pick->item.a_char;
+ free((genericptr_t)window_pick);
+ }
+ destroy_nhwindow(tmpwin);
+ retval = TRUE;
}
return retval;
}
Sprintf(buf, "%s", to_be_done);
else if (!strcmp(optname, "msghistory"))
Sprintf(buf, "%u", iflags.msg_history);
+ else if (!strcmp(optname, "msg_window"))
+ Sprintf(buf, "%s", (iflags.prevmsg_window=='s') ? "single" :
+ (iflags.prevmsg_window=='c') ? "combination" :
+ (iflags.prevmsg_window=='f') ? "full" : "reversed");
else if (!strcmp(optname, "name"))
Sprintf(buf, "%s", plname);
else if (!strcmp(optname, "objects"))
*bufp = 0;
}
if(c == '\020') { /* ctrl-P */
- if (iflags.prevmsg_window) {
+ if (iflags.prevmsg_window != 's') {
int sav = ttyDisplay->inread;
ttyDisplay->inread = 0;
(void) tty_doprev_message();
doprev = 1;
continue;
}
- } else if (doprev && !iflags.prevmsg_window) {
+ } else if (doprev && iflags.prevmsg_window == 's') {
tty_clear_nhwindow(WIN_MESSAGE);
cw->maxcol = cw->maxrow;
doprev = 0;
winid prevmsg_win;
int i;
-
- if (iflags.prevmsg_window && !ttyDisplay->inread) {
- prevmsg_win = create_nhwindow(NHW_MENU);
- putstr(prevmsg_win, 0, "Message History");
- putstr(prevmsg_win, 0, "");
- i = cw->maxcol;
- do {
- if(cw->data[i] && strcmp(cw->data[i], "") )
- putstr(prevmsg_win, 0, cw->data[i]);
- i = (i + 1) % cw->rows;
- } while (i != cw->maxcol);
- putstr(prevmsg_win, 0, toplines);
- display_nhwindow(prevmsg_win, TRUE);
- destroy_nhwindow(prevmsg_win);
- } else {
- ttyDisplay->dismiss_more = C('p'); /* <ctrl/P> allowed at --More-- */
- do {
- morc = 0;
- if (cw->maxcol == cw->maxrow)
- redotoplin(toplines);
- else if (cw->data[cw->maxcol])
- redotoplin(cw->data[cw->maxcol]);
- cw->maxcol--;
- if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
- if (!cw->data[cw->maxcol])
- cw->maxcol = cw->maxrow;
- } while (morc == C('p'));
- ttyDisplay->dismiss_more = 0;
+ if ((iflags.prevmsg_window != 's') && !ttyDisplay->inread) { /* not single */
+ if(iflags.prevmsg_window == 'f') { /* full */
+ prevmsg_win = create_nhwindow(NHW_MENU);
+ putstr(prevmsg_win, 0, "Message History");
+ putstr(prevmsg_win, 0, "");
+ cw->maxcol = cw->maxrow;
+ i = cw->maxcol;
+ do {
+ if(cw->data[i] && strcmp(cw->data[i], "") )
+ putstr(prevmsg_win, 0, cw->data[i]);
+ i = (i + 1) % cw->rows;
+ } while (i != cw->maxcol);
+ putstr(prevmsg_win, 0, toplines);
+ display_nhwindow(prevmsg_win, TRUE);
+ destroy_nhwindow(prevmsg_win);
+ } else if (iflags.prevmsg_window == 'c') { /* combination */
+ do {
+ morc = 0;
+ if (cw->maxcol == cw->maxrow) {
+ ttyDisplay->dismiss_more = C('p'); /* <ctrl/P> allowed at --More-- */
+ redotoplin(toplines);
+ cw->maxcol--;
+ if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
+ if (!cw->data[cw->maxcol])
+ cw->maxcol = cw->maxrow;
+ } else if (cw->maxcol == (cw->maxrow - 1)){
+ ttyDisplay->dismiss_more = C('p'); /* <ctrl/P> allowed at --More-- */
+ redotoplin(cw->data[cw->maxcol]);
+ cw->maxcol--;
+ if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
+ if (!cw->data[cw->maxcol])
+ cw->maxcol = cw->maxrow;
+ } else {
+ prevmsg_win = create_nhwindow(NHW_MENU);
+ putstr(prevmsg_win, 0, "Message History");
+ putstr(prevmsg_win, 0, "");
+ cw->maxcol = cw->maxrow;
+ i = cw->maxcol;
+ do {
+ if(cw->data[i] && strcmp(cw->data[i], "") )
+ putstr(prevmsg_win, 0, cw->data[i]);
+ i = (i + 1) % cw->rows;
+ } while (i != cw->maxcol);
+ putstr(prevmsg_win, 0, toplines);
+ display_nhwindow(prevmsg_win, TRUE);
+ destroy_nhwindow(prevmsg_win);
+ }
+
+ } while (morc == C('p'));
+ ttyDisplay->dismiss_more = 0;
+ } else { /* reversed */
+ morc = 0;
+ prevmsg_win = create_nhwindow(NHW_MENU);
+ putstr(prevmsg_win, 0, "Message History");
+ putstr(prevmsg_win, 0, "");
+ putstr(prevmsg_win, 0, toplines);
+ cw->maxcol=cw->maxrow-1;
+ if(cw->maxcol < 0) cw->maxcol = cw->rows-1;
+ do {
+ putstr(prevmsg_win, 0, cw->data[cw->maxcol]);
+ cw->maxcol--;
+ if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
+ if (!cw->data[cw->maxcol])
+ cw->maxcol = cw->maxrow;
+ } while (cw->maxcol != cw->maxrow);
+
+ display_nhwindow(prevmsg_win, TRUE);
+ destroy_nhwindow(prevmsg_win);
+ cw->maxcol = cw->maxrow;
+ ttyDisplay->dismiss_more = 0;
+ }
+ } else if(iflags.prevmsg_window == 's') { /* single */
+ ttyDisplay->dismiss_more = C('p'); /* <ctrl/P> allowed at --More-- */
+ do {
+ morc = 0;
+ if (cw->maxcol == cw->maxrow)
+ redotoplin(toplines);
+ else if (cw->data[cw->maxcol])
+ redotoplin(cw->data[cw->maxcol]);
+ cw->maxcol--;
+ if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
+ if (!cw->data[cw->maxcol])
+ cw->maxcol = cw->maxrow;
+ } while (morc == C('p'));
+ ttyDisplay->dismiss_more = 0;
}
return 0;
}
do { /* loop until we get valid input */
q = lowc(readchar());
if (q == '\020') { /* ctrl-P */
- if (iflags.prevmsg_window) {
+ if (iflags.prevmsg_window != 's') {
int sav = ttyDisplay->inread;
ttyDisplay->inread = 0;
(void) tty_doprev_message();