Adjust window-port related option processing

to allow common parsing in the core, and direct access to the
results by the window port.

Notes:

o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports.  This allows
run-time determination of whether a particular option
setting is applicable to the running window port.  A
window-port is free to support as many, or as few,
of the available options as it wants.  Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]

o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them.  You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.

o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.

o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.

o this messes around heavily with iflags and the options
arrays in options.c

o I hope I didn't break any port's existing code. I
tried not to.  The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname.  It had
Mac specific font stuff in options.c. Please test
the Mac.
This commit is contained in:
nethack.allison
2002-02-03 05:31:47 +00:00
parent 830fc78d36
commit cb6a93641b
17 changed files with 992 additions and 362 deletions

View File

@@ -2053,10 +2053,6 @@ You may have to turn this off if you have more than 2 GB free space
on the partition used for your save and level files.
Only applies when MFLOPPY was defined during compilation.
%.lp
\item[\ib{color}]
Use color for different monsters, objects, and dungeon features
(default on for microcomputers).
%.lp
\item[\ib{confirm}]
Have user confirm attacks on pets, shopkeepers, and other
peaceable creatures (default on).
@@ -2167,11 +2163,6 @@ or the present ones rearranged.
Cannot be set with the `{\tt O}' command.
%.lp
\item[\ib{eight\_bit\_tty}]
Pass eight-bit character values (for example, specified with the {\it
traps \/} option) straight through to your terminal (default off).
Only applies to the tty port.
%.lp
\item[\ib{extmenu}]
Changes the extended commands interface to pop-up a menu of available commands.
It is keystroke compatible with the traditional interface except that it does
@@ -2208,12 +2199,6 @@ Turning help off makes just looking at things faster, since you aren't
interrupted with the ``{\tt More info?}'' prompt, but it also means that you
might miss some interesting and/or important information.
%.lp
\item[\ib{hilite\_pet}]
Visually distinguish pets from similar animals (default off).
The behavior of this option depends on the type of windowing you use.
In text windowing, text highlighting or inverse video is often used;
with tiles, generally displays a heart symbol near pets.
%.lp
\item[\ib{horsename}]
Name your starting horse (ex.\ ``{\tt horsename:Trigger}'').
Cannot be set with the `{\tt O}' command.
@@ -2397,12 +2382,6 @@ is on. Default is all types.
\item[\ib{prayconfirm}]
Prompt for confirmation before praying (default on).
%.lp
\item[\ib{preload\_tiles}]
For the protected mode MSDOS version, control whether tiles
get pre-loaded into RAM at the start of the game. Doing so
enhances performance of the tile graphics, but uses more memory. (default on).
Cannot be set with the `{\tt O}' command.
%.lp
\item[\ib{pushweapon}]
Using the `w' (wield) command when already wielding
something pushes the old item into your secondary weapon slot (default off).
@@ -2519,6 +2498,118 @@ Select which windowing system to use, such as ``{\tt tty}'' or ``{\tt X11}''
Cannot be set with the `{\tt O}' command.
\elist
%.hn 2
\subsection*{Window Port Customization options}
%.pg
Here are explanations of the various options that are
used to customize and change the characteristics of the
windowtype that you have chosen.
Character strings that are too long may be truncated.
Not all window ports will adjust for all settings listed
here. You can safely add any of these options to your
config file, and if the window port is capable of adjusting
to suit your preferences, it will attempt to do so. If it
can't it will silently ignore it. You can find out if an
option is supported by the window port that you are currently
using by checking to see if it shows up in the Options list.
Some options are dynamic and can be specified during the game
with the `{\tt O}' command.
\blist{}
%.lp
\item[\ib{align\_message}]
Where to align or place the message window (top, bottom, left, or right)
%.lp
\item[\ib{align\_status}]
Where to align or place the status window (top, bottom, left, or right).
%.lp
\item[\ib{ascii\_map}]
NetHack should display an ascii map if it can.
%.lp
\item[\ib{color}]
NetHack should display color if it can for different monsters,
objects, and dungeon features
%.lp
\item[\ib{eight\_bit\_tty}]
Pass eight-bit character values (for example, specified with the {\it
traps \/} option) straight through to your terminal (default off).
%.lp
\item[\ib{font\_map}]
NetHack should use a font by the chosen name for the map window.
%.lp
\item[\ib{font\_menu}]
NetHack should use a font by the chosen name for menu windows.
%.lp
\item[\ib{font\_message}]
NetHack should use a font by the chosen name for the message window.
%.lp
\item[\ib{font\_status}]
NetHack should use a font by the chosen name for the status window.
%.lp
\item[\ib{font\_text}]
NetHack should use a font by the chosen name for text windows.
%.lp
\item[\ib{font\_size\_map}]
NetHack should use this size font for the map window.
%.lp
\item[\ib{font\_size\_menu}]
NetHack should use this size font for menu windows.
%.lp
\item[\ib{font\_size\_message}]
NetHack should use this size font for the message window.
%.lp
\item[\ib{font\_size\_status}]
NetHack should use this size font for the status window.
%.lp
\item[\ib{font\_size\_text}]
NetHack should use this size font for text windows.
%.lp
\item[\ib{hilite\_pet}]
Visually distinguish pets from similar animals (default off).
The behavior of this option depends on the type of windowing you use.
In text windowing, text highlighting or inverse video is often used;
with tiles, generally displays a heart symbol near pets.
%.lp
\item[\ib{large\_font}]
NetHack should use a large font.
%.lp
\item[\ib{map\_mode}]
NetHack should display the map in the manner specified.
%.lp
\item[\ib{popup\_dialog}]
NetHack should pop up dialog boxes for input.
%.lp
\item[\ib{preload\_tiles}]
NetHack should preload tiles into memory.
For example, in the protected mode MSDOS version, control whether tiles
get pre-loaded into RAM at the start of the game. Doing so
enhances performance of the tile graphics, but uses more memory. (default on).
Cannot be set with the `{\tt O}' command.
%.lp
\item[\ib{scroll\_margin}]
NetHack should scroll the display when the hero or cursor
is this number of cells away from the edge of the window.
%.lp
\item[\ib{tiled\_map}]
NetHack should display a tiled map if it can.
%.lp
\item[\ib{tiles\_16x16}]
NetHack should display 16x16 tiles if it can.
%.lp
\item[\ib{tiles\_32x32}]
NetHack should display 32x32 tiles if it can.
%.lp
\item[\ib{tiles\_8x16}]
NetHack should display 8x16 tiles if it can.
%.lp
\item[\ib{use\_inverse}]
NetHack should display inverse when the game specifies it.
%.lp
\item[\ib{vary\_msgcount}]
NetHack should display this number of messages at a time in the message window.
\elist
%.hn 2
\subsection*{Configuring NetHack for Play by the Blind}