From 70bacac9e6f3b6613da51dd69c555107ebe62aa0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2019 17:59:12 -0500 Subject: [PATCH 01/11] Guidebook.mn bit --- doc/Guidebook.mn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index f389ef8b5..622ab30fc 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -511,8 +511,8 @@ information, then let you pick another location; you to choose another location to examine; \(oq:\(cq will show additional info, if any, without asking for confirmation. When picking a location, -pressing the ESC key will terminate this command, or pressing \(oq?\(cq -will give a brief reminder about how it works. +pressing the ESC key will terminate this command, or pressing \(oq?\(cq will +give a brief reminder about how it works. .lp "" If the .op autodescribe From 4dd39a0d7e033335ee98cfaa7ec38d85251ab956 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 01:15:09 -0800 Subject: [PATCH 02/11] fixes36.3 tidying Reword a few entries, remove a few trailing spaces. --- doc/fixes36.3 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d9db05039..e3d08f5ab 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.162 $ $NHDT-Date: 1573066356 2019/11/06 18:52:36 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ $NHDT-Date: 1573118102 2019/11/07 09:15:02 $ 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, @@ -152,9 +152,9 @@ zapping self with wand of opening or spell of knock to escape from a pit trap wielded aklys that returned to hero when thrown while inside an engulfer left a stale 'thrownobj' pointer that triggered "add_to_minv: obj not free" panic if same weapon killed any engulfer via melee from inside -uarmh null pointer dereference if a helm of opposite alignment came off due +uarmh null pointer dereference if a helm of opposite alignment came off due to being polymorphed -verb tense was inappropriate in some messages when a mon/pet had a name +verb tense was inappropriate in some messages when a mon/pet had a name ending in 's' orctown booty items should have been initialized in mksobj() query_category() and whatdoes_help() had early returns which could each leave @@ -176,7 +176,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or running told player about engravings as they were being moved over but buffered output didn't show it until hero stopped, so it wasn't possible to tell where they were, unlike all other forms of - multiple movement; stop running if/when an engraving is reached + multiple movement; so stop running if/when an engraving is reached fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error fix vault guard impossible when he could not relocate in certain situation @@ -239,8 +239,8 @@ monster throwing from stack of missiles (darts, daggers, spears) would cause surviving death while polymorphed would yield "You are a " without terminating period 'mksobj failure' commit resulted in wrong corpse types for dying monsters -a recent intended sanity check fix inadvertently bypassed placing - a thrown chained ball back onto the floor +a recent intended sanity check fix inadvertently bypassed placing a thrown + chained ball back onto the floor in symset:curses, symbol S_tree was accidentally set to horizontal line where plus-or-minus sign was meant; also, change S_bars to not-equals sign curses: sometimes the message window would show a blank line after a prompt @@ -284,10 +284,10 @@ curses: support EDIT_GETLIN (but like with tty, it's disabled by default) to (however, it's skipped if the 'popup_dialog' option is On) curses: when display windows get reconfigured (after setting align_status, align_message, statuslines, windowborders or due to external resize), - the message window was being refreshed with the oldest available N - messages rather than most recent N. [Still room for improvement; - when feasible it combines short lines, resulting in N messages on - fewer than N lines and leaving some of the available lines blank.] + the message window was being refreshed with most recent message and + the oldest available N-1 messages rather than next to most recent N-1. + [Still room for improvement when short lines are combined or long + ones are wrapped, where it still shows a subset of N original lines.] curses: plug memory leak when getting a line of input is cancelled by ESC curses: after requesting a line of input from player, next line of message window could end up being skipped @@ -301,7 +301,7 @@ curses: make text windows wider so that help feedback is more readable curses: using ':' for search string matching to toggle menu items in a multple page menu would highlight arbitrary items on the currently visible page in sync with the lines that matching items had on other pages -curses: when map window was clipped, the 'scrollbars' shown to indicate which +curses: when map window was clipped, position bars shown to indicate which part of the map was in view didn't work as intended, always drawing "*--------------" for horizontal (and comparable '*' with multiple '|' underneath for vertical) when it meant to show "---******------" if @@ -315,8 +315,8 @@ curses: disable the attempt to support Ctrl+Left_click as an alternate way the mouse data passed to nethack didn't match the curses (ncurses on OSX 10.11) documentation and things didn't work as intended curses: menu coloring required that both 'menucolors' and 'guicolor' be On; - for menus, override guicolor with more-specific menucolors -curses: support symset:DECgraphics for map display + for menus, ignore 'guicolor' and honor more-specific 'menucolors' +curses: support symset:curses and symset:DECgraphics for map display curses: enable the 'use_inverse' boolean option (via wincap WC_INVERSE flag) for extended monster detection and black&white lava; forced to True to override default of False (for tty's benefit) @@ -355,13 +355,13 @@ tty: take two, if/when autodecribe feedback wraps past top line, clear tty: video attributes (bold, inverse, &c) for status highlighting sometimes were scrambled unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username - failed even though it didn't need that username + failed even though it didn't need that to check player character name unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI -Windows: signifiant changes to default directory choices. see documentation - for details. +Windows: signifiant changes to default directory choices; see documentation + for details General New Features From 1908017e27667a6ca92d1ece0e22c84eda37b249 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 7 Nov 2019 11:23:28 +0200 Subject: [PATCH 03/11] Fixes typo --- doc/fixes36.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e3d08f5ab..9ff36d1d2 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -360,7 +360,7 @@ unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI -Windows: signifiant changes to default directory choices; see documentation +Windows: significant changes to default directory choices; see documentation for details From 2b98d161d6ff710bcabd9c2e7486a12953588ff3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 01:42:29 -0800 Subject: [PATCH 04/11] fixes36.3 again Noticed that "multiple" was misspelled for entry about menu action ':' misbehaving under curses, but the phrasing for whole entry was difficult to comprehend so try to word it better. [This one is in the highlights list with the old wording.] --- doc/fixes36.3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 9ff36d1d2..dc4e5aa1c 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.163 $ $NHDT-Date: 1573118102 2019/11/07 09:15:02 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ $NHDT-Date: 1573119743 2019/11/07 09:42:23 $ 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, @@ -298,9 +298,9 @@ curses: don't convert ^M (or or key) into ^J; both ^J and ^M cause the hero to try to move curses: draw map in screen columns 1..79 like tty, rather than in 2..80 curses: make text windows wider so that help feedback is more readable -curses: using ':' for search string matching to toggle menu items in a multple - page menu would highlight arbitrary items on the currently visible - page in sync with the lines that matching items had on other pages +curses: using ':' for toggling menu items which match a search string, in a + multi-page menu it would highlight arbitrary items on the currently + visible page in sync with lines that matched items have on other pages curses: when map window was clipped, position bars shown to indicate which part of the map was in view didn't work as intended, always drawing "*--------------" for horizontal (and comparable '*' with multiple '|' From 71d229a99dec0a172b750cec9ebe5703cf70e146 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 10:50:14 -0500 Subject: [PATCH 05/11] Update README and include/patchlevel.h --- README | 31 ++++++++++++++++++++++++++++--- include/patchlevel.h | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/README b/README index d7698ffd4..64ff6cb1c 100644 --- a/README +++ b/README @@ -16,9 +16,34 @@ the "new features" section. Below you will find some other general notes that were not considered spoilers: -* Over 30 refinements to the curses window port. -* Some refinements to status highlights. -* A couple of fixes to prevent potential game crashes. + * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed + * Fixed uarmh null pointer dereference if a helm of opposite alignment came + * off due to being polymorphed + * Fixed 'object lost' panic when attempting to crawl of of the water during + * emergency disrobing/dropping + * Running now stops when moving over engravings so you can tell where they are + * Fixed detection of unseen/secret doors which failed to find monsters hiding + * under objects and failed to find monsters hiding at trap locations + * Ensured fatal status conditions made it to disclosure and/or dumplog + * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On + * Fixed it so yellow dragons don't have green breath + * Added several grammar corrections + * Improved recognition of deafness for several situations including the + * playing of musical instruments and bribing negotiations with demon lords + * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed several cases where persistent inventory window was not updated + * Fixed temple priests or shopkeepers moving over other monsters + * Ensured that thrown or kicked objects will end up in bones + * Made water go all the way to the edges of level on the Plane of Water + * Made clouds disrupt line of sight along the edges of the Plane of Air + * Improved and expanded usage of status highlighting percentage rules + * Added more than 15 improvements and fixes to the curses window port + * Added and documented significant changes to default directory choices for + * the Windows platform + * Improved the layout and display of the player selection dialog used on the + * Windows graphical implementation + * Allowed the msdos implementation to build with curses and PDCurses + * Over 100 other fixes and improvements - - - - - - - - - - - diff --git a/include/patchlevel.h b/include/patchlevel.h index 13c8d4ae3..68061d695 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -37,12 +37,41 @@ /* Version 3.6.x */ /* Patch 3, - * + * + * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed + * Fixed uarmh null pointer dereference if a helm of opposite alignment came + * off due to being polymorphed + * Fixed 'object lost' panic when attempting to crawl of of the water during + * emergency disrobing/dropping + * Running now stops when moving over engravings so you can tell where they are + * Fixed detection of unseen/secret doors which failed to find monsters hiding + * under objects and failed to find monsters hiding at trap locations + * Ensured fatal status conditions made it to disclosure and/or dumplog + * Fixed "Bad fruit #N" warnings when saving bones with 'perm_invent' On + * Fixed it so yellow dragons don't have green breath + * Added several grammar corrections + * Improved recognition of deafness for several situations including the + * playing of musical instruments and bribing negotiations with demon lords + * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed several cases where persistent inventory window was not updated + * Fixed temple priests or shopkeepers moving over other monsters + * Ensured that thrown or kicked objects will end up in bones + * Made water go all the way to the edges of level on the Plane of Water + * Made clouds disrupt line of sight along the edges of the Plane of Air + * Improved and expanded usage of status highlighting percentage rules + * Added more than 15 improvements and fixes to the curses window port + * Added and documented significant changes to default directory choices for + * the Windows platform + * Improved the layout and display of the player selection dialog used on the + * Windows graphical implementation + * Allowed the msdos implementation to build with curses and PDCurses + * Included over 100 other fixes and improvements as outlined in doc/fixes36.3 */ /* Patch 2, May 7, 2019 * - * Over 320 bug fixes including a couple of crash bug fixes + * Over 320 bug fixes including a couple of crash bug fixes as outlined in + * doc/fixes36.2 * More than 15 enhancements or improvements * Ensuring that unix Makefiles do not rely on features unique to gnu make * Improvements to hilite_status parsing in an effort to ensure that expected @@ -54,13 +83,15 @@ */ /* Patch 1, April 27, 2018 - * Over four hundred and seventy bug fixes and improvements. + * + * Over four hundred and seventy bug fixes and improvements as outlined in + * doc/fixes36.1 */ /* * NetHack 3.6.0, December 7, 2015 * - * Hundreds of bug fixes. + * Hundreds of bug fixes as outlined in doc/fixes36.0. * Some code reorganization. * Some new features. * Variations of some community patches rolled in. From 96e7e11a5e2af67512680e2571663ccd54892084 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 10:59:20 -0500 Subject: [PATCH 06/11] typo --- README | 2 +- include/patchlevel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 64ff6cb1c..a8746c435 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ spoilers: * Added several grammar corrections * Improved recognition of deafness for several situations including the * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters * Ensured that thrown or kicked objects will end up in bones diff --git a/include/patchlevel.h b/include/patchlevel.h index 68061d695..2151087ee 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -52,7 +52,7 @@ * Added several grammar corrections * Improved recognition of deafness for several situations including the * playing of musical instruments and bribing negotiations with demon lords - * Fixed ignoring of god's wrath when hero injured himself during alter kick + * Fixed ignoring of god's wrath when hero injured himself during altar kick * Fixed several cases where persistent inventory window was not updated * Fixed temple priests or shopkeepers moving over other monsters * Ensured that thrown or kicked objects will end up in bones From ed3a87a07824fe07dc4b5520485860ade82ca8e7 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 16:10:55 -0800 Subject: [PATCH 07/11] more Guidebook tweaks Expand the sample configuration file a little and prevent it from going past the right margin in Guidebook.txt. Replace all instances of "config file" with "configuration file". Reformat the "notes" at the end of the table of map symbols. Unfortunately Guidebook.pdf from Guidebook.ps from Guidebook.mn puts a page break between the header line "notes" and the two actual notes. Value 1 for 'mouse_support' was not just exceeding the margin of Guidebook.txt but wrapping to the next line. Shorten it. Guidebook.tex had a typo "in the foler" (where 'folder' was meant) and Guidebook.mn didn't have that phrase at all. Remove a few trailing spaces. --- doc/Guidebook.mn | 87 +++++++++++++++++++++++++++------------------- doc/Guidebook.tex | 88 +++++++++++++++++++++++++---------------------- 2 files changed, 99 insertions(+), 76 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 622ab30fc..425fe413f 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,4 @@ -.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.325 $ $NHDT-Date: 1572735924 2019/11/02 23:05:24 $ +.\" $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.329 $ $NHDT-Date: 1573171723 2019/11/08 00:08:43 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. .\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. @@ -2625,7 +2625,7 @@ and Mac OS X it is \(lq.nethackrc\(rq in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. .pg -On Windows, it is \(lq.nethackrc\(rq in +On Windows, it is \(lq.nethackrc\(rq in the folder \(lq\\%USERPROFILE%\\NetHack\\3.6\(rq. The file may not exist, but it is a normal ASCII text file can can be created with any text editor. @@ -2775,26 +2775,38 @@ Example: .sd \f(CRWIZKIT=\(ti/wizkit.txt\fP \" \(ti == '~' .ed -.lp "" -.pg \" this would look better outdented -Here is a short example of config file contents: -.sd +. +.pg +\ \" dummy paragraph to force some separation [.BR isn't working as intended] +.pg +.SD n \" suppress indentation +Here is an example of configuration file contents: +.ED +.\" [conditional indentation; see description of NETHACKOPTIONS below] +.ds sD i \" assume proportional, indentation acceptable and preferred +.\" Check for fixed-width font; 'f' will be same width as 'F'. +.if (\w'f'p)=(\w'F'p) .ds sD n \" if same width, suppress indentation +.SD \*(sD \" string variable sD will expand to either 'i' or 'n' .ft CR \" set font to constant-width Roman # Set your character's role, race, gender, and alignment. OPTIONS=role:Valkyrie, race:Human, gender:female, align:lawful # # Turn on autopickup, set automatically picked up object types OPTIONS=autopickup,pickup_types:$"=/!?+ -# Show colored text if possible -OPTIONS=color -# Show lit corridors differently -OPTIONS=lit_corridor +# +# Map customization +OPTIONS=color # Display things in color if possible +OPTIONS=lit_corridor # Show lit corridors differently +OPTIONS=hilite_pet,hilite_pile +# Replace small punctuation (tick marks) with digits +SYMBOLS=S_boulder:0,S_golem:7 # # No startup splash screen. Windows GUI only. OPTIONS=!splash_screen .ft \" revert to previous font -.ed -.BR 2 +.ED +.pg +\ \" another dummy paragraph [.BR 2] .hn 2 Using the NETHACKOPTIONS environment variable .pg @@ -3195,7 +3207,7 @@ Valid settings are: .sd .si .CC 0 "disabled" -.CC 1 "enabled and make OS adjustments to support mouse use in the game" +.CC 1 "enabled and make OS adjustments to support mouse use" .CC 2 "like 1 but does not make any OS adjustments" .ei .ed @@ -3612,7 +3624,7 @@ 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 +here. You can safely add any of these options to your configuration 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 @@ -3811,7 +3823,8 @@ May be used to alter the value of keystrokes that the operating system returns to NetHack to help compensate for international keyboard issues. OPTIONS=subkeyvalue:171/92 will return 92 to NetHack, if 171 was originally going to be returned. -You can use multiple subkeyvalue statements in the config file if needed. +You can use multiple subkeyvalue statements in the configuration file +if needed. Cannot be set with the \(oqO\(cq command. .lp video Set the video mode used (PC NetHack only). @@ -3875,12 +3888,12 @@ character in the pattern, specifically: .ed The .op autopickup_exception -rules are processed in the order in which they appear in your config file, -thus allowing a later rule to override an earlier rule. +rules are processed in the order in which they appear in your configuration +file, thus allowing a later rule to override an earlier rule. .lp "" Exceptions can be set with the \(oqO\(cq command, but because they are not -included in your config file, they won't be in effect if you save and then -restore your game. +included in your configuration file, they won't be in effect if you save +and then restore your game. .op autopickup_exception rules and not saved with the game. .\" end of ``.lp autopickup_exception'' entry; continue enclosing page... @@ -3923,8 +3936,8 @@ You can bind multiple keys to the same extended command. Unbind a key by using \(lqnothing\(rq as the extended command to bind to. You can also bind the \(lq\(rq, \(lq\(rq, and \(lq\(rq keys. .lp "Menu accelerator keys" -The menu control or accelerator keys can also be rebound via OPTIONS-lines -in the config file. +The menu control or accelerator keys can also be rebound via OPTIONS lines +in the configuration file. You cannot bind object symbols into menu accelerators. .lp "Special command keys" Below are the special commands you can rebind. @@ -4083,7 +4096,7 @@ Configuring Message Types You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. .pg -In general, the config file entries to configure the message types +In general, the configuration file entries to describe the message types look like this: .si MSGTYPE=type "pattern" @@ -4123,16 +4136,17 @@ the user is prompted with more-prompt, and a message matching .\" historical trivia: "You displaced Fido." was the sort of message you .\" got when swapping places with your pet, but that was changed long ago... .lp "" -The order of the defined MSGTYPE-lines is important; the last matching +The order of the defined MSGTYPE lines is important; the last matching rule is used. Put the general case first, exceptions below them. .hn 2 Configuring Menu Colors .pg Some platforms allow you to define colors used in menu lines when the -line matches a user-defined pattern. At this time the tty, win32tty and -win32gui support this. +line matches a user-defined pattern. +At this time the tty, curses, win32tty and +win32gui interfaces support this. .pg -In general, the config file entries to configure the menu color mappings +In general, the configuration file entries to describe the menu color mappings look like this: .si .lp MENUCOLOR="pattern"=color&attribute @@ -4175,8 +4189,8 @@ in it will be shown in green color, lines with \(lq\ cursed\ \(rq will be shown in red, and lines with \(lq\ cursed\ \(rq followed by \(lq(being worn)\(rq on the same line will be shown in red color and underlined. -You can have multiple MENUCOLOR entries in your config file, -and the last MENUCOLOR-line in your config file that matches +You can have multiple MENUCOLOR entries in your configuration file, +and the last MENUCOLOR line that matches a menu line will be used for the line. .pg Note that if you intend to have one or more color specifications match @@ -4192,7 +4206,7 @@ that matches a user-defined pattern is delivered to the message window. At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. .pg -The following config file entries are relevant to mapping user sounds +The following configuration file entries are relevant to mapping user sounds to messages: .lp SOUNDDIR The directory that houses the sound files to be played. @@ -4361,7 +4375,7 @@ is tested; the character's name is ignored. .ei .pg The in-game options menu can help you determine the correct syntax for a -config file. +configuration file. .pg The whole feature can be disabled by setting option .op statushilites @@ -4397,7 +4411,7 @@ Set the name of the symbol set that you want to load for display on the rogue level. .pg You can also override one or more symbols using the SYMBOLS and -ROGUESYMBOLS config file options. +ROGUESYMBOLS configuration file options. Symbols are specified as name:value pairs. Note that NetHack escape-processes the value string in conventional C fashion. @@ -4607,11 +4621,13 @@ z S_zruty (zruty) .\" don't hyphenate file name across lines .hw sysconf .pg -Notes: several symbols in this table appear to be blank. +.lp "Notes:" +.lp "*" +Several symbols in this table appear to be blank. They are the space character, except for S_pet_override and S_player_override which don't have any default value and can only be used if enabled in the \(lqsysconf\(rq file. -.pg +.lp "*" S_rock is misleadingly named; rocks and stones use S_gem. Statues and boulders are the rock being referred to, but since version 3.6.0, statues are displayed as the monster they depict. @@ -5114,7 +5130,7 @@ The NetHack Development Team at the time of release of 3.6.1 consisted of \fBPat Rankin\fP, \fBDerek S. Ray\fP, \fBAlex Smith\fP, \fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP. .pg -In early May 2019, another 320 bug fixes along with some enhancements and +In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. .pg \fBBart House\fP, who had contributed to the game as a porting team @@ -5132,7 +5148,7 @@ again to \fBM. Drew Streib\fP and \fBPasi Kallinen\fP for providing a public NetHack server at nethack.alt.org. Thanks to \fBKeith Simpson\fP and \fBAndy Thomson\fP for hardfought.org. Thanks to all those unnamed dungeoneers who invest their time and effort into annual -NetHack tournaments such as Junethack, The November NetHack Tournament +NetHack tournaments such as Junethack, The November NetHack Tournament and in days past, devnull.net (gone for now, but not forgotten). .pg .ce @@ -5199,3 +5215,4 @@ Izchak Miller Mike Stephenson .\"Amiga is a trademark of Commodore-Amiga, Inc .sm "Brand and product names are trademarks or registered trademarks \ of their respective holders." +.\"EOF diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 818cce066..4faefff0a 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2044,8 +2044,8 @@ will result in it disappearing from your map, similarly if it is the one who moved rather than you. %.pg -However, if you encounter a monster which you can't see or -sense---perhaps it is invisible and has just tapped you on the +However, if you encounter a monster which you can't see or +sense---perhaps it is invisible and has just tapped you on the noggin---a special ``remembered, unseen monster'' marker will be displayed at the location where you think it is. That will persist until you have @@ -2701,8 +2701,8 @@ you are carrying (shopkeepers aside). Normally, if you have seen an object at a particular map location and move to another location where you can't directly see that object any more, if will continue to be displayed on your map. -That remains the case even if it is not actually there any -more---perhaps a monster has picked it up or it has rotted +That remains the case even if it is not actually there any +more---perhaps a monster has picked it up or it has rotted away---until you can see or feel that location again. One notable exception is that if the object gets covered by the ``remembered, unseen monster'' marker. @@ -2875,7 +2875,7 @@ directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor.\\ %.lp "" -On Windows, it is \mbox{``.nethackrc''} in the foler +On Windows, it is \mbox{``.nethackrc''} in the folder \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash 3.6''}}. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. @@ -2886,7 +2886,7 @@ If you had not created the configuration file, {\it NetHack\/} will create the configuration file for you using the default template file. %.lp "" -On MS-DOS it is \mbox{``defaults.nh''} in the same folder as +On MS-DOS it is \mbox{``defaults.nh''} in the same folder as \mbox{{\it nethack.exe\/}}.\\ %.lp "" @@ -3065,7 +3065,7 @@ Example: %.lp "" %.pg -Here is a short example of config file contents: +Here is an example of configuration file contents: %.sd \begin{verbatim} # Set your character's role, race, gender, and alignment. @@ -3073,10 +3073,13 @@ Here is a short example of config file contents: # Turn on autopickup, set automatically picked up object types OPTIONS=autopickup,pickup_types:$"=/!?+ - # Show colored text if possible - OPTIONS=color - # Show lit corridors differently - OPTIONS=lit_corridor + + # Map customization + OPTIONS=color # Display things in color if possible + OPTIONS=lit_corridor # Show lit corridors differently + OPTIONS=hilite_pet,hilite_pile + # Replace small punctuation (tick marks) with digits + SYMBOLS=S_boulder:0,S_golem:7 # No startup splash screen. Windows GUI only. OPTIONS=!splash_screen @@ -3518,7 +3521,7 @@ Valid settings are: %.sd %.si {\tt 0} --- disabled\\ -{\tt 1} --- enabled and make OS adjustment to support mouse use in the game\\ +{\tt 1} --- enabled and make OS adjustment to support mouse use\\ {\tt 2} --- enabled like {\tt 1}, but does not make any OS adjustments\\ %.ei %.ed @@ -3997,7 +4000,7 @@ 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 +configuration 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 @@ -4254,7 +4257,8 @@ returns to {\it NetHack\/} to help compensate for international keyboard issues. OPTIONS=subkeyvalue:171/92 will return 92 to {\it NetHack\/}, if 171 was originally going to be returned. -You can use multiple subkeyvalue statements in the config file if needed. +You can use multiple subkeyvalue statements in the configuration file +if needed. Cannot be set with the `{\tt O}' command. %.lp \item[\ib{video}] @@ -4324,13 +4328,14 @@ character in the pattern, specifically: %.ei %.ed -The {\it autopickup\verb+_+exception\/} rules are processed in the order -in which they appear in your config file, thus allowing a later rule to override -an earlier rule. +The {\it autopickup\verb+_+exception\/} rules are processed in the order +in which they appear in your configuration file, thus allowing a +later rule to override an earlier rule. %.lp "" -Exceptions can be set with the `{\tt O}' command, but because they are not included -in your config file, they won't be in effect if you save and then restore your game. +Exceptions can be set with the `{\tt O}' command, but because they are not +included in your configuration file, they won't be in effect if you save +and then restore your game. {\it autopickup\verb+_+exception\/} rules are not saved with the game. \elist @@ -4379,8 +4384,9 @@ the ``{\tt }'', ``{\tt }'', and ``{\tt }'' keys. %.lp "Menu accelerator keys" \item[\tb{Menu accelerator keys}] -The menu control or accelerator keys can also be rebound via OPTIONS-lines -in the config file. You cannot bind object symbols into menu accelerators. +The menu control or accelerator keys can also be rebound via OPTIONS lines +in the configuration file. +You cannot bind object symbols into menu accelerators. %.lp "Special command keys" \item[\tb{Special command keys}] @@ -4550,7 +4556,7 @@ You can change the way the messages are shown in the message area, when the message matches a user-defined pattern. %.pg -In general, the config file entries to configure the message types +In general, the configuration file entries to describe the message types look like this: \begin{verbatim} MSGTYPE=type "pattern" @@ -4588,7 +4594,7 @@ the user is prompted with more-prompt, and a message matching ``You displaced \verb+<+something\verb+>+'' is not shown at all. %.lp -The order of the defined MSGTYPE-lines is important; the last matching +The order of the defined MSGTYPE lines is important; the last matching rule is used. Put the general case first, exceptions below them. %.pg @@ -4599,11 +4605,12 @@ rule is used. Put the general case first, exceptions below them. %.pg Some platforms allow you to define colors used in menu lines when the -line matches a user-defined pattern. At this time the tty, win32tty and -win32gui support this. +line matches a user-defined pattern. +At this time the tty, curses, win32tty and +win32gui interfaces support this. %.pg -In general, the config file entries to configure the menu color mappings +In general, the configuration file entries to describe the menu color mappings look like this: \begin{verbatim} MENUCOLOR="pattern"=color&attribute @@ -4655,8 +4662,8 @@ specifies that any menu line with ``~blessed~'' contained in it will be shown in green color, lines with ``~cursed~'' will be shown in red, and lines with ``~cursed~'' followed by ``(being worn)'' on the same line will be shown in red color and underlined. -You can have multiple MENUCOLOR entries in your config file, -and the last MENUCOLOR-line in your config file that matches +You can have multiple MENUCOLOR entries in your configuration file, +and the last MENUCOLOR line that matches a menu line will be used for the line. %.pg @@ -4677,7 +4684,7 @@ At this time the Qt port and the win32tty and win32gui ports support the use of user sounds. %.pg -The following config file entries are relevant to mapping user sounds +The following configuration file entries are relevant to mapping user sounds to messages: \blist{} @@ -4856,7 +4863,7 @@ is tested; the character's name is ignored. \elist The in-game options menu can help you determine the correct syntax for a -config file. +configuration file. The whole feature can be disable by setting option {\it statushilites} to 0. @@ -4898,7 +4905,7 @@ on the rogue level. \elist You can also override one or more symbols using the {\it SYMBOLS\/} and -{\it ROGUESYMBOLS\/} config file options. +{\it ROGUESYMBOLS\/} configuration file options. Symbols are specified as {\it name:value\/} pairs. Note that {\it NetHack\/} escape-processes the {\it value\/} string in conventional C fashion. @@ -5098,13 +5105,16 @@ Default & Symbol Name & Description\\ } \hyphenation{sysconf} %no syllable breaks => don't hyphenate file name -%.pg -Notes: several symbols in this table appear to be blank. +%.lp +Notes: + +%.lp "*" +Several symbols in this table appear to be blank. They are the space character, except for S\verb+_+pet\verb+_+override and S\verb+_+player\verb+_+override which don't have any default value and can only be used if enabled in the ``sysconf'' file. -%.pg +%.lp "*" S\verb+_+rock is misleadingly named; rocks and stones use S\verb+_+gem. Statues and boulders are the rock being referred to, but since version 3.6.0, statues are displayed as the monster they depict. @@ -5720,7 +5730,7 @@ time of release of 3.6.1 consisted of %.pg \medskip -In early May 2019, another 320 bug fixes along with some enhancements and +In early May 2019, another 320 bug fixes along with some enhancements and the adopted curses window port, were released as 3.6.2. %.pg @@ -5746,7 +5756,7 @@ again to {\it M. Drew Streib} and {\it Pasi Kallinen} for providing a public NetHack server at nethack.alt.org. Thanks to {\it Keith Simpson} and {\it Andy Thomson} for hardfought.org. Thanks to all those unnamed dungeoneers who invest their time and effort into annual -{\it NetHack\/} tournaments such as {\it Junethack}, +{\it NetHack\/} tournaments such as {\it Junethack}, {\it The November NetHack Tournament} and in days past, {\it devnull.net\/} (gone for now, but not forgotten). \clearpage @@ -5755,7 +5765,7 @@ unnamed dungeoneers who invest their time and effort into annual \section*{Dungeoneers} %.pg \nd From time to time, some depraved individual out there in netland sends a -particularly intriguing modification to help out with the game. The +particularly intriguing modification to help out with the game. The {\it NetHack Development Team} sometimes makes note of the names of the worst of these miscreants in this, the list of Dungeoneers: %.sd @@ -5824,7 +5834,3 @@ Izchak Miller & Mike Stephenson %\end{flushleft} \end{document} - - - - From 7502a2e05f3259934b7a07edfce5d564db8cea42 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 7 Nov 2019 19:15:34 -0500 Subject: [PATCH 08/11] bump the Guidebook date --- doc/Guidebook.mn | 2 +- doc/Guidebook.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 425fe413f..f3a8a9818 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -24,7 +24,7 @@ .ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "November 2, 2019 +.ds f2 "November 7, 2019 . .\" A note on some special characters: .\" \(lq = left double quote diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4faefff0a..290373dae 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -45,7 +45,7 @@ %.au \author{Original version - Eric S. Raymond\\ (Edited and expanded for 3.6 by Mike Stephenson and others)} -\date{November 2, 2019} +\date{November 7, 2019} \maketitle From 2058ad10f9f2d75be2205c538869663cc97f3f4a Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 16:21:52 -0800 Subject: [PATCH 09/11] missing data file on vms vms's install.com was processing bigrm-%.lev (which corresponds to bigrm-?.lev on unix) so missed two-digit bigrm-10.lev. --- doc/fixes36.3 | 3 ++- sys/vms/install.com | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index dc4e5aa1c..e71e94dba 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ $NHDT-Date: 1573119743 2019/11/07 09:42:23 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ $NHDT-Date: 1573172442 2019/11/08 00:20:42 $ 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, @@ -358,6 +358,7 @@ unix: sysconf CHECK_PLNAME=1 wouldn't work if attempt to obtain unix username failed even though it didn't need that to check player character name unix+curses: startup error only reset terminal for tty; one noticeable example was answering 'n' to "Destroy old game?" +vms: update install.com to include overlooked file bigrm-10.lev in nh-data.dlb Windows: some startup error messages were not being delivered successfully WindowsGUI: player selection dialog box layout was not being adjusted for DPI Windows: significant changes to default directory choices; see documentation diff --git a/sys/vms/install.com b/sys/vms/install.com index eecbca319..09f6f839d 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -1,9 +1,9 @@ $ ! vms/install.com -- set up nethack 'playground' -$! $NHDT-Date: 1542388600 2018/11/16 17:16:40 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.11 $ +$! $NHDT-Date: 1573172443 2019/11/08 00:20:43 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $! Copyright (c) 2016 by Robert Patrick Rankin $! NetHack may be freely redistributed. See license for details. $ ! -$ ! $NHDT-Date: 1542388600 2018/11/16 17:16:40 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.11 $ +$ ! $NHDT-Date: 1573172452 2019/11/08 00:20:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $ ! $ ! Use vmsbuild.com to create nethack.exe, makedefs, and lev_comp *first*. $ ! @@ -35,7 +35,7 @@ $ sysconf_file = "[.sys.vms]sysconf" $ guidebook = "[.doc]Guidebook.txt" $ invoc_proc = "[.sys.vms]nethack.com" $ trmcp_file = "[.sys.share]termcap" -$ spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-%.LEV," - +$ spec_files = "AIR.LEV,ASMODEUS.LEV,ASTRAL.LEV,BAALZ.LEV,BIGRM-*.LEV," - + "CASTLE.LEV,EARTH.LEV,FAKEWIZ%.LEV,FIRE.LEV," - + "JUIBLEX.LEV,KNOX.LEV,MEDUSA-%.LEV,MINEFILL.LEV," - + "MINETN-%.LEV,MINEND-%.LEV,ORACLE.LEV,ORCUS.LEV," - From 6afb780d98cf762d098165cf22f84bbc02e4a820 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 7 Nov 2019 17:54:57 -0800 Subject: [PATCH 10/11] status highlight fix for experience level When I expanded the Guidebook's sample configuration file I added several status_hilite options. I decided that I'd better test what was written and discovered that if Xp had an up or changed rule as well as one or more percentage rules, it was showing bogus changes whenever the integer value of the percentage changed. The fix turned out to be simple but it took a while to figure out. I ultimately left the status_hilite settings out of the sample options, because they tended to be too wide for Guidebook.txt's formatting rather than because they weren't working as expected. --- doc/fixes36.3 | 4 +++- src/botl.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index e71e94dba..d8c5ae5ce 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ $NHDT-Date: 1573172442 2019/11/08 00:20:42 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ $NHDT-Date: 1573178084 2019/11/08 01:54:44 $ 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, @@ -243,6 +243,8 @@ a recent intended sanity check fix inadvertently bypassed placing a thrown chained ball back onto the floor in symset:curses, symbol S_tree was accidentally set to horizontal line where plus-or-minus sign was meant; also, change S_bars to not-equals sign +percentage highlighting for Xp broke up/down/changed highlighting for it; + it was flagged as having gone up every time the percentage changed curses: sometimes the message window would show a blank line after a prompt curses: the change to show map in columns 1..79 instead of 2..80 made the highlight for '@' show up in the wrong place if clipped map had been diff --git a/src/botl.c b/src/botl.c index 4a856a211..4c7dbf33a 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 botl.c $NHDT-Date: 1562114350 2019/07/03 00:39:10 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.146 $ */ +/* NetHack 3.6 botl.c $NHDT-Date: 1573178085 2019/11/08 01:54:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.148 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2006. */ /* NetHack may be freely redistributed. See license for details. */ @@ -142,9 +142,9 @@ do_statusline2() if (Upolyd) Sprintf(expr, "HD:%d", mons[u.umonnum].mlevel); else if (flags.showexp) - Sprintf(expr, "Xp:%u/%-1ld", u.ulevel, u.uexp); + Sprintf(expr, "Xp:%d/%-1ld", u.ulevel, u.uexp); else - Sprintf(expr, "Exp:%u", u.ulevel); + Sprintf(expr, "Exp:%d", u.ulevel); xln = strlen(expr); /* time/move counter */ @@ -850,6 +850,12 @@ boolean *valsetlist; if (anytype != ANY_MASK32) { #ifdef STATUS_HILITES if (chg || *curr->val) { + /* if Xp percentage changed, we set 'chg' to 1 above; + reset that if the Xp value hasn't actually changed + or possibly went down rather than up (level loss) */ + if (chg == 1 && fld == BL_XP) + chg = compare_blstats(prev, curr); + curr->hilite_rule = get_hilite(idx, fld, (genericptr_t) &curr->a, chg, pc, &color); From 2835d8774e77167b5e546bad0f82c23569ba4915 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 8 Nov 2019 11:22:50 -0500 Subject: [PATCH 11/11] one more "Deaf-aware" comment --- src/engrave.c | 147 +++++++++++++++++++++++++++++--------------------- 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index d81144cc0..42cd49aa4 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -5,9 +5,11 @@ #include "hack.h" #include "lev.h" +#include "sfproto.h" -STATIC_VAR NEARDATA struct engr *head_engr; -STATIC_DCL const char *NDECL(blengr); + +static NEARDATA struct engr *head_engr; +static const char *NDECL(blengr); char * random_engraving(outbuf) @@ -159,7 +161,7 @@ boolean check_pit; return (boolean) ((!Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) - && (!u.uundetected || !is_hider(youmonst.data) + && (!u.uundetected || !is_hider(g.youmonst.data) || u.umonnum == PM_TRAPPER)); } @@ -269,7 +271,7 @@ boolean strict; { register struct engr *ep = engr_at(x, y); - if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) { + if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= g.moves) { return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE)) : (strstri(ep->engr_txt, s) != 0); } @@ -378,7 +380,7 @@ int x, y; et = ep->engr_txt; } You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et); - if (context.run > 0) + if (g.context.run > 0) nomul(0); } } @@ -405,7 +407,7 @@ xchar e_type; ep->engr_txt = (char *) (ep + 1); Strcpy(ep->engr_txt, s); /* engraving Elbereth shows wisdom */ - if (!in_mklev && !strcmp(s, "Elbereth")) + if (!g.in_mklev && !strcmp(s, "Elbereth")) exercise(A_WIS, TRUE); ep->engr_time = e_time; ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1); @@ -494,8 +496,8 @@ doengrave() struct obj *otmp; /* Object selected with which to engrave */ char *writer; - multi = 0; /* moves consumed */ - nomovemsg = (char *) 0; /* occupation end message */ + g.multi = 0; /* moves consumed */ + g.nomovemsg = (char *) 0; /* occupation end message */ buf[0] = (char) 0; ebuf[0] = (char) 0; @@ -503,7 +505,7 @@ doengrave() maxelen = BUFSZ - 1; if (oep) oetype = oep->engr_type; - if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE) + if (is_demon(g.youmonst.data) || is_vampire(g.youmonst.data)) type = ENGR_BLOOD; /* Can the adventurer engrave at all? */ @@ -532,7 +534,7 @@ doengrave() You_cant("write here."); return 0; } - if (cantwield(youmonst.data)) { + if (cantwield(g.youmonst.data)) { You_cant("even hold anything!"); return 0; } @@ -544,10 +546,10 @@ doengrave() */ otmp = getobj(styluses, "write with"); - if (!otmp) /* otmp == zeroobj if fingers */ + if (!otmp) /* otmp == cg.zeroobj if fingers */ return 0; - if (otmp == &zeroobj) { + if (otmp == &cg.zeroobj) { Strcat(strcpy(fbuf, "your "), body_part(FINGERTIP)); writer = fbuf; } else @@ -576,7 +578,7 @@ doengrave() return 0; } if (IS_GRAVE(levl[u.ux][u.uy].typ)) { - if (otmp == &zeroobj) { /* using only finger */ + if (otmp == &cg.zeroobj) { /* using only finger */ You("would only make a small smudge on the %s.", surface(u.ux, u.uy)); return 0; @@ -762,7 +764,7 @@ doengrave() ? "Chips fly out from the headstone." : is_ice(u.ux, u.uy) ? "Ice chips fly up from the ice surface!" - : (level.locations[u.ux][u.uy].typ + : (g.level.locations[u.ux][u.uy].typ == DRAWBRIDGE_DOWN) ? "Splinters fly up from the bridge." : "Gravel flies up from the floor."); @@ -792,7 +794,7 @@ doengrave() doblind = TRUE; } else Strcpy(post_engr_text, !Deaf - ? "You hear crackling!" + ? "You hear crackling!" /* Deaf-aware */ : "Your hair stands up!"); break; @@ -906,7 +908,7 @@ doengrave() } /* Something has changed the engraving here */ if (*buf) { - make_engr_at(u.ux, u.uy, buf, moves, type); + make_engr_at(u.ux, u.uy, buf, g.moves, type); if (!Blind) pline_The("engraving now reads: \"%s\".", buf); ptext = FALSE; @@ -1013,7 +1015,7 @@ doengrave() } /* Tell adventurer what is going on */ - if (otmp != &zeroobj) + if (otmp != &cg.zeroobj) You("%s the %s with %s.", everb, eloc, doname(otmp)); else You("%s the %s with your %s.", everb, eloc, body_part(FINGERTIP)); @@ -1069,21 +1071,21 @@ doengrave() */ switch (type) { default: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish your weird engraving."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish your weird engraving."; break; case DUST: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish writing in the dust."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish writing in the dust."; break; case HEADSTONE: case ENGRAVE: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->oclass == WEAPON_CLASS && (otmp->otyp != ATHAME || otmp->cursed)) { - multi = -len; + g.multi = -len; maxelen = ((otmp->spe + 3) * 2) + 1; /* -2 => 3, -1 => 5, 0 => 7, +1 => 9, +2 => 11 * Note: this does not allow a +0 anything (except an athame) @@ -1093,45 +1095,45 @@ doengrave() pline("%s dull.", Yobjnam2(otmp, "get")); costly_alteration(otmp, COST_DEGRD); if (len > maxelen) { - multi = -maxelen; + g.multi = -maxelen; otmp->spe = -3; } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite engraving */ } else if (otmp->oclass == RING_CLASS || otmp->oclass == GEM_CLASS) { - multi = -len; + g.multi = -len; } - if (multi) - nomovemsg = "You finish engraving."; + if (g.multi) + g.nomovemsg = "You finish engraving."; break; case BURN: - multi = -(len / 10); - if (multi) - nomovemsg = is_ice(u.ux, u.uy) + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = is_ice(u.ux, u.uy) ? "You finish melting your message into the ice." : "You finish burning your message into the floor."; break; case MARK: - multi = -(len / 10); + g.multi = -(len / 10); if (otmp->otyp == MAGIC_MARKER) { maxelen = otmp->spe * 2; /* one charge / 2 letters */ if (len > maxelen) { Your("marker dries out."); otmp->spe = 0; - multi = -(maxelen / 10); + g.multi = -(maxelen / 10); } else if (len > 1) otmp->spe -= len >> 1; else otmp->spe -= 1; /* Prevent infinite graffiti */ } - if (multi) - nomovemsg = "You finish defacing the dungeon."; + if (g.multi) + g.nomovemsg = "You finish defacing the dungeon."; break; case ENGR_BLOOD: - multi = -(len / 10); - if (multi) - nomovemsg = "You finish scrawling."; + g.multi = -(len / 10); + if (g.multi) + g.nomovemsg = "You finish scrawling."; break; } @@ -1142,8 +1144,8 @@ doengrave() maxelen--; if (!maxelen && *sp) { *sp = '\0'; - if (multi) - nomovemsg = "You cannot write any more."; + if (g.multi) + g.nomovemsg = "You cannot write any more."; You("are only able to write \"%s\".", ebuf); } } @@ -1152,11 +1154,11 @@ doengrave() Strcpy(buf, oep->engr_txt); (void) strncat(buf, ebuf, BUFSZ - (int) strlen(buf) - 1); /* Put the engraving onto the map */ - make_engr_at(u.ux, u.uy, buf, moves - multi, type); + make_engr_at(u.ux, u.uy, buf, g.moves - g.multi, type); if (post_engr_text[0]) pline("%s", post_engr_text); - if (doblind && !resists_blnd(&youmonst)) { + if (doblind && !resists_blnd(&g.youmonst)) { You("are blinded by the flash!"); make_blinded((long) rnd(50), FALSE); if (!Blind) @@ -1178,49 +1180,70 @@ sanitize_engravings() } void -save_engravings(fd, mode) -int fd, mode; +save_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep, *ep2; unsigned no_more_engr = 0; for (ep = head_engr; ep; ep = ep2) { ep2 = ep->nxt_engr; - if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(mode)) { - bwrite(fd, (genericptr_t) &ep->engr_lth, sizeof ep->engr_lth); - bwrite(fd, (genericptr_t) ep, sizeof (struct engr) + ep->engr_lth); + if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(nhfp)) { + if (nhfp->structlevel) { + bwrite(nhfp->fd, (genericptr_t)&(ep->engr_lth), sizeof(ep->engr_lth)); + bwrite(nhfp->fd, (genericptr_t)ep, sizeof(struct engr) + ep->engr_lth); + } + if (nhfp->fieldlevel) { + sfo_unsigned(nhfp, &(ep->engr_lth), "engravings", "engr_lth", 1); + sfo_engr(nhfp, ep, "engravings", "engr", 1); + sfo_str(nhfp, ep->engr_txt, "engravings", "engr_txt", ep->engr_lth); + } } - if (release_data(mode)) + if (release_data(nhfp)) dealloc_engr(ep); } - if (perform_bwrite(mode)) - bwrite(fd, (genericptr_t) &no_more_engr, sizeof no_more_engr); - if (release_data(mode)) + if (perform_bwrite(nhfp)) { + if (nhfp->structlevel) + bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr); + if (nhfp->fieldlevel) + sfo_unsigned(nhfp, &no_more_engr, "engravings", "engr_lth", 1); + } + if (release_data(nhfp)) head_engr = 0; } void -rest_engravings(fd) -int fd; +rest_engravings(nhfp) +NHFILE *nhfp; { struct engr *ep; unsigned lth; head_engr = 0; while (1) { - mread(fd, (genericptr_t) <h, sizeof lth); + if (nhfp->structlevel) + mread(nhfp->fd, (genericptr_t) <h, sizeof(unsigned)); + if (nhfp->fieldlevel) + sfi_unsigned(nhfp, <h, "engravings", "engr_lth", 1); + if (lth == 0) return; ep = newengr(lth); - mread(fd, (genericptr_t) ep, sizeof (struct engr) + lth); + if (nhfp->structlevel) { + mread(nhfp->fd, (genericptr_t) ep, sizeof(struct engr) + lth); + } + if (nhfp->fieldlevel) { + sfi_engr(nhfp, ep, "engravings", "engr", 1); + ep->engr_txt = (char *) (ep + 1); + sfi_str(nhfp, ep->engr_txt, "engravings", "engr_txt", lth); + } ep->nxt_engr = head_engr; head_engr = ep; - ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ - /* Mark as finished for bones levels -- no problem for + ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */ + /* mark as finished for bones levels -- no problem for * normal levels as the player must have finished engraving - * to be able to move again. - */ - ep->engr_time = moves; + * to be able to move again */ + ep->engr_time = g.moves; } } @@ -1325,7 +1348,7 @@ static const char blind_writing[][21] = { 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; -STATIC_OVL const char * +static const char * blengr(VOID_ARGS) { return blind_writing[rn2(SIZE(blind_writing))];