From: nethack.allison Date: Thu, 14 Aug 2003 11:04:33 +0000 (+0000) Subject: wraptext port option (from ) X-Git-Tag: MOVE2GIT~1854 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e94d4478bd6c19f0feed8e22d27673e6cc4fdd2;p=nethack wraptext port option (from ) WC2_WRAPTEXT option was added but core changes were not included in the previous wince patch. --- diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 1c0fd5945..f9b1a8839 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -5,7 +5,7 @@ .ds vr "NetHack 3.4 .ds f0 "\*(vr .ds f1 -.ds f2 "July 16, 2003 +.ds f2 "August 14, 2003 .mt A Guide to the Mazes of Menace (Guidebook for NetHack) @@ -2188,6 +2188,9 @@ the message window. .lp windowcolors NetHack should display windows with the specified foreground/background colors if it can. +.lp wraptext +NetHack port should wrap long lines of text if they don't fit in +the visible area of the window. .hn 2 Platform-specific Customization options .pg diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index a652241ec..2680019ed 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -27,7 +27,7 @@ \begin{document} % % input file: guidebook.mn -% $Revision: 1.67 $ $Date: 2003/06/30 02:08:55 $ +% $Revision: 1.68 $ $Date: 2003/07/17 01:34:40 $ % %.ds h0 " %.ds h1 %.ds h2 \% @@ -40,7 +40,7 @@ %.au \author{Eric S. Raymond\\ (Extensively edited and expanded for 3.4)} -\date{July 16, 2003} +\date{August 14, 2003} \maketitle @@ -2697,6 +2697,10 @@ NetHack should display this number of messages at a time in the message window. \item[\ib{windowcolors}] NetHack should display windows with the specified foreground/background colors if it can. +%.lp +\item[\ib{wraptext}] +NetHack port should wrap long lines of text if they don't fit in +the visible area of the window. \elist %.hn 2 diff --git a/doc/window.doc b/doc/window.doc index 05996f264..cbfc57147 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -517,6 +517,7 @@ to support: |--------------------+--------------------+--------------------+--------+ | fullscreen | WC2_FULLSCREEN | wc2_fullscreen |boolean | | softkeyboard | WC2_SOFTKEYBOARD | wc2_softkeyboard |boolean | + | wraptext | WC2_WRAPTEXT | wc2_wraptext |boolean | +--------------------+--------------------+--------------------+--------+ align_message -- where to place message window (top, bottom, left, right) @@ -561,6 +562,8 @@ windowcolors -- port should use these colors for window foreground/background colors. Syntax: menu fore/back message fore/back status fore/back text fore/back +wraptext -- port should wrap long lines of text if they don't fit in + the visible area of the window mouse_support -- port should enable mouse support if possible Whenever one of these settings is adjusted, the port is notified of a change diff --git a/include/flag.h b/include/flag.h index 8b5c6e05d..4148de389 100644 --- a/include/flag.h +++ b/include/flag.h @@ -265,6 +265,7 @@ struct instance_flags { boolean wc_mouse_support; /* allow mouse support */ boolean wc2_fullscreen; /* run fullscreen */ boolean wc2_softkeyboard; /* use software keyboard */ + boolean wc2_wraptext; /* wrap text */ boolean cmdassist; /* provide detailed assistance for some commands */ boolean clicklook; /* allow right-clicking for look */ diff --git a/include/winprocs.h b/include/winprocs.h index 5d52fb7b7..2e1f2e995 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -174,9 +174,10 @@ extern NEARDATA struct window_procs windowprocs; #define WC_MOUSE_SUPPORT 0x80000000L /* 32 mouse support */ /* no free bits */ -#define WC2_FULLSCREEN 0x01L /* 01 mouse support */ +#define WC2_FULLSCREEN 0x01L /* 01 display full screen */ #define WC2_SOFTKEYBOARD 0x02L /* 02 software keyboard */ - /* 30 free bits */ +#define WC2_WRAPTEXT 0x04L /* 04 wrap long lines of text */ + /* 29 free bits */ #define ALIGN_LEFT 1 #define ALIGN_RIGHT 2 diff --git a/src/options.c b/src/options.c index 1ee7c5950..02138dd69 100644 --- a/src/options.c +++ b/src/options.c @@ -195,6 +195,7 @@ static struct Bool_Opt {"use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME}, /*WC*/ #endif {"verbose", &flags.verbose, TRUE, SET_IN_GAME}, + {"wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME}, {(char *)0, (boolean *)0, FALSE, 0} }; @@ -3314,6 +3315,7 @@ struct wc_Opt wc_options[] = { struct wc_Opt wc2_options[] = { {"fullscreen", WC2_FULLSCREEN}, {"softkeyboard", WC2_SOFTKEYBOARD}, + {"wraptext", WC2_WRAPTEXT}, {(char *)0, 0L} }; @@ -3411,7 +3413,7 @@ const char *optnam; * the appropriate bits for each option that you * are setting in the optmask argument * prior to calling. - * example: set_wc2_option_mod_status(WC2_FULLSCREEN|WC2_SOFTKEYBOARD, SET_IN_FILE); + * example: set_wc2_option_mod_status(WC2_FULLSCREEN|WC2_SOFTKEYBOARD|WC2_WRAPTEXT, SET_IN_FILE); */ void