window.doc cleanup
Remove a bunch of trailing spaces and shorten some long lines.
This commit is contained in:
+44
-40
@@ -1,4 +1,4 @@
|
|||||||
NetHack 3.7 window.doc $NHDT-Date: 1596498145 2020/08/03 23:42:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.58 $
|
NetHack 3.7 window.doc $NHDT-Date: 1615154657 2021/03/07 22:04:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.63 $
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
|
|
||||||
@@ -142,8 +142,8 @@ putmixed(window, attr, str)
|
|||||||
the glyph value, it can use genl_putmixed (windows.c)
|
the glyph value, it can use genl_putmixed (windows.c)
|
||||||
which converts the encoded glyph into a character symbol.
|
which converts the encoded glyph into a character symbol.
|
||||||
|
|
||||||
Multiple putmixed()s are output on separate lines. Attributes
|
Multiple putmixed()s are output on separate lines.
|
||||||
can be one of
|
Attributes can be one of
|
||||||
ATR_NONE (or 0)
|
ATR_NONE (or 0)
|
||||||
ATR_ULINE
|
ATR_ULINE
|
||||||
ATR_BOLD
|
ATR_BOLD
|
||||||
@@ -198,17 +198,17 @@ print_glyph(window, x, y, glyphinfo, bkglyphinfo)
|
|||||||
port wants (symbol, font, color, attributes, ...there's
|
port wants (symbol, font, color, attributes, ...there's
|
||||||
a 1-1 map between glyphs and distinct things on the map).
|
a 1-1 map between glyphs and distinct things on the map).
|
||||||
-- bkglyphinfo contains a background glyph for potential use
|
-- bkglyphinfo contains a background glyph for potential use
|
||||||
by some graphical or tiled environments to allow the depiction
|
by some graphical or tiled environments to allow the
|
||||||
to fall against a background consistent with the grid
|
depiction to fall against a background consistent with the
|
||||||
around x,y. If bkglyphinfo->glyph is NO_GLYPH, then the
|
grid around x,y. If bkglyphinfo->glyph is NO_GLYPH, then
|
||||||
parameter should be ignored (do nothing with it).
|
the parameter should be ignored (do nothing with it).
|
||||||
-- glyph_info struct fields:
|
-- glyph_info struct fields:
|
||||||
int glyph; /* the display entity */
|
int glyph; /* the display entity */
|
||||||
int color; /* color for window ports not using a tile */
|
int color; /* color for window ports not using a tile */
|
||||||
int ttychar; /* the character mapping for the original tty
|
int ttychar; /* the character mapping for the original tty
|
||||||
interface. Most or all window ports wanted
|
* interface. Most or all window ports wanted
|
||||||
and used this for various things so it is
|
* and used this for various things so it is
|
||||||
provided in 3.7+ */
|
* provided in 3.7+ */
|
||||||
short int symidx; /* offset into syms array */
|
short int symidx; /* offset into syms array */
|
||||||
unsigned glyphflags; /* more detail about the entity */
|
unsigned glyphflags; /* more detail about the entity */
|
||||||
|
|
||||||
@@ -413,7 +413,8 @@ status_enablefield(int fldindex, char fldname, char fieldfmt, boolean enable)
|
|||||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX,
|
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX,
|
||||||
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
BL_LEVELDESC, BL_EXP, BL_CONDITION
|
||||||
-- There are MAXBLSTATS status fields (from botl.h)
|
-- There are MAXBLSTATS status fields (from botl.h)
|
||||||
status_update(int fldindex, genericptr_t ptr, int chg, int percentage, int color, long *colormasks)
|
status_update(int fldindex, genericptr_t ptr, int chg, int percentage, \
|
||||||
|
int color, long *colormasks)
|
||||||
-- update the value of a status field.
|
-- update the value of a status field.
|
||||||
-- the fldindex identifies which field is changing and
|
-- the fldindex identifies which field is changing and
|
||||||
is an integer index value from botl.h
|
is an integer index value from botl.h
|
||||||
@@ -474,13 +475,12 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, int color
|
|||||||
This contains the color and attribute that the field should
|
This contains the color and attribute that the field should
|
||||||
be displayed in.
|
be displayed in.
|
||||||
|
|
||||||
This is relevant for everything except BL_CONDITION fldindex.
|
This is relevant for everything except BL_CONDITION.
|
||||||
If fldindex is BL_CONDITION, this parameter should be ignored,
|
If fldindex is BL_CONDITION, this parameter should be
|
||||||
as condition hilighting is done via the next colormasks
|
ignored, as condition hilighting is done via the next
|
||||||
parameter instead.
|
colormasks parameter instead.
|
||||||
|
|
||||||
-- colormasks - pointer to cond_hilites[] array of colormasks.
|
-- colormasks - pointer to cond_hilites[] array of colormasks.
|
||||||
|
|
||||||
Only relevant for BL_CONDITION fldindex. The window port
|
Only relevant for BL_CONDITION fldindex. The window port
|
||||||
should ignore this parameter for other fldindex values.
|
should ignore this parameter for other fldindex values.
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, int color
|
|||||||
+------+----------------------+--------------------+
|
+------+----------------------+--------------------+
|
||||||
| 20 | HL_ATTCLR_BOLD | |
|
| 20 | HL_ATTCLR_BOLD | |
|
||||||
+------+----------------------+--------------------+
|
+------+----------------------+--------------------+
|
||||||
| 21 | beyond array boundary | BL_ATTCLR_MAX
|
| 21 | beyond array boundary| | BL_ATTCLR_MAX
|
||||||
|
|
||||||
The window port can AND (&) the bits passed in the
|
The window port can AND (&) the bits passed in the
|
||||||
ptr argument to status_update() with any non-zero
|
ptr argument to status_update() with any non-zero
|
||||||
@@ -621,12 +621,12 @@ preference_update(preference)
|
|||||||
|
|
||||||
getmsghistory(init)
|
getmsghistory(init)
|
||||||
-- This is used to preserve message history between games by
|
-- This is used to preserve message history between games by
|
||||||
obtaining the messages from the window port so that the core
|
obtaining the messages from the window port so that the
|
||||||
can put them into the savefile.
|
core can put them into the savefile.
|
||||||
The routine is called repeatedly from the core save routine,
|
The routine is called repeatedly from the core save routine,
|
||||||
and the window port routine is expected to successively return
|
and the window port routine is expected to successively
|
||||||
each message that it wants the game to store in the savefile,
|
return each message that it wants the game to store in the
|
||||||
starting with the oldest message first, finishing
|
savefile, starting with the oldest message first, finishing
|
||||||
with the most recent.
|
with the most recent.
|
||||||
If init is TRUE, start over again from most recent message.
|
If init is TRUE, start over again from most recent message.
|
||||||
|
|
||||||
@@ -635,10 +635,11 @@ putmsghistory(msg)
|
|||||||
used to reload the port's message recall buffer.
|
used to reload the port's message recall buffer.
|
||||||
The routine is called repeatedly from the core restore
|
The routine is called repeatedly from the core restore
|
||||||
routine, starting with the oldest message first, and
|
routine, starting with the oldest message first, and
|
||||||
finishing with the most recent one that it read from the savefile.
|
finishing with the most recent one that it read from the
|
||||||
The window port routine is expected to load the message
|
savefile. The window port routine is expected to load the
|
||||||
recall buffers in such a way that the ordering remains correct.
|
message recall buffers in such a way that the ordering
|
||||||
The window port routine should make no assumptions about how
|
remains correct. The window port routine should make no
|
||||||
|
assumptions about how
|
||||||
many messages are forthcoming, nor should it assume that
|
many messages are forthcoming, nor should it assume that
|
||||||
another message will follow this one, so it must be careful
|
another message will follow this one, so it must be careful
|
||||||
to keep all pointers/indexes intact at the end of each call.
|
to keep all pointers/indexes intact at the end of each call.
|
||||||
@@ -661,7 +662,8 @@ winid WIN_MESSAGE, WIN_MAP, WIN_INVEN
|
|||||||
only for backward compatibility in the genl_status_*
|
only for backward compatibility in the genl_status_*
|
||||||
set of generic status display functions.
|
set of generic status display functions.
|
||||||
char *AE, *AS; Checked in options.c to see if we should load and
|
char *AE, *AS; Checked in options.c to see if we should load and
|
||||||
switch to DECGraphics symset. It is #ifdefed VMS and UNIX.
|
switch to DECGraphics symset. It is #ifdefed VMS
|
||||||
|
and UNIX.
|
||||||
int LI, CO; Set in sys/unix/ioctl.c.
|
int LI, CO; Set in sys/unix/ioctl.c.
|
||||||
|
|
||||||
The following appears to be Unix specific. Other ports using the tty
|
The following appears to be Unix specific. Other ports using the tty
|
||||||
@@ -774,6 +776,7 @@ to support:
|
|||||||
| font_size_text | WC_FONTSIZ_TEXT | wc_fontsiz_text |int |
|
| font_size_text | WC_FONTSIZ_TEXT | wc_fontsiz_text |int |
|
||||||
| hilite_pet | WC_HILITE_PET | wc_hilite_pet |boolean |
|
| hilite_pet | WC_HILITE_PET | wc_hilite_pet |boolean |
|
||||||
| map_mode | WC_MAP_MODE | wc_map_mode |int |
|
| map_mode | WC_MAP_MODE | wc_map_mode |int |
|
||||||
|
| perm_invent | WC_PERM_INVENT | wc_perm_invent |boolean |
|
||||||
| player_selection | WC_PLAYER_SELECTION| wc_player_selection|int |
|
| player_selection | WC_PLAYER_SELECTION| wc_player_selection|int |
|
||||||
| popup_dialog | WC_POPUP_DIALOG | wc_popup_dialog |boolean |
|
| popup_dialog | WC_POPUP_DIALOG | wc_popup_dialog |boolean |
|
||||||
| preload_tiles | WC_PRELOAD_TILES | wc_preload_tiles |boolean |
|
| preload_tiles | WC_PRELOAD_TILES | wc_preload_tiles |boolean |
|
||||||
@@ -857,14 +860,14 @@ selectsaved -- if port can display a menu of the user's saved games do so.
|
|||||||
softkeyboard -- handhelds should display an on-screen keyboard if possible.
|
softkeyboard -- handhelds should display an on-screen keyboard if possible.
|
||||||
splash_screen -- port should/should not display an opening splashscreen.
|
splash_screen -- port should/should not display an opening splashscreen.
|
||||||
term_cols -- Terminal should size itself to specified width, if possible.
|
term_cols -- Terminal should size itself to specified width, if possible.
|
||||||
term_rows -- Terminal should size itself to specified height, if possible.
|
term_rows -- Terminal should size to specified height, if possible.
|
||||||
tiled_map -- port should display a tiled map if it can.
|
tiled_map -- port should display a tiled map if it can.
|
||||||
tile_width -- port should display tiles with this width or round to closest
|
tile_width -- port should display tiles with this width or round to
|
||||||
if it can.
|
closest if it can.
|
||||||
tile_height -- port should display tiles with this height or round to closest
|
tile_height -- port should display tiles with this height or round to
|
||||||
if it can.
|
closest if it can.
|
||||||
tile_file -- open this alternative tile file. The file name is likely to be
|
tile_file -- open this alternative tile file. The file name is likely to
|
||||||
window-port or platform specific.
|
be window-port or platform specific.
|
||||||
use_inverse -- port should display inverse when NetHack asks for it.
|
use_inverse -- port should display inverse when NetHack asks for it.
|
||||||
vary_msgcount -- port should display this number of messages at a time in
|
vary_msgcount -- port should display this number of messages at a time in
|
||||||
the message window.
|
the message window.
|
||||||
@@ -998,13 +1001,14 @@ init_nhwindows() is expected to display a gee-whiz banner window, including
|
|||||||
the Copyright message. It is recommended that the COPYRIGHT_BANNER_A,
|
the Copyright message. It is recommended that the COPYRIGHT_BANNER_A,
|
||||||
COPYRIGHT_BANNER_B, COPYRIGHT_BANNER_C, and COPYRIGHT_BANNER_D macros from
|
COPYRIGHT_BANNER_B, COPYRIGHT_BANNER_C, and COPYRIGHT_BANNER_D macros from
|
||||||
patchlevel.h and date.h be used for constructing the Copyright message.
|
patchlevel.h and date.h be used for constructing the Copyright message.
|
||||||
COPYRIGHT_BANNER_A is a quoted string that has the NetHack copyright declaration,
|
COPYRIGHT_BANNER_A is a quoted string that has NetHack copyright declaration,
|
||||||
COPYRIGHT_BANNER_B is a quoted string that states who the copyright belongs to,
|
COPYRIGHT_BANNER_B is a quoted string that states who the copyright belongs to,
|
||||||
COPYRIGHT_BANNER_C is a quoted string generated by makedefs that includes version
|
COPYRIGHT_BANNER_C is a quoted string generated by makedefs that includes
|
||||||
and build information. and COPYRIGHT_BANNER_D simply says "See License for details."
|
version and build information, and
|
||||||
Be sure to #include "patchlevel.h" and date.h to define these macros. Using the
|
COPYRIGHT_BANNER_D simply says "See License for details."
|
||||||
macros will prevent having to update the Copyright information in each window-port
|
Be sure to #include "patchlevel.h" and date.h to define these macros. Using
|
||||||
prior to each release.
|
the macros will prevent having to update the Copyright information in each
|
||||||
|
window-port prior to each release.
|
||||||
|
|
||||||
Ports (MSDOS, TOS, MAC, etc) _may_ use window-port specific routines in
|
Ports (MSDOS, TOS, MAC, etc) _may_ use window-port specific routines in
|
||||||
their port specific files, _AT_THEIR_OWN_RISK_. Since "port" and
|
their port specific files, _AT_THEIR_OWN_RISK_. Since "port" and
|
||||||
|
|||||||
Reference in New Issue
Block a user