Bart House [Tue, 8 May 2018 14:25:24 +0000 (07:25 -0700)]
Fix for bug H7132.
In nethackw, there can be conflicts between menu accelerators and an extra
choice accelerator. For example, when engraving the using fingers options
conflicts with the unselect all menu accelerator. The extra choice
accelerator should take precedence.
Specify both width and height when creating font for width testing
From Bart...
When we are creating the console font for testing character widths,
we were not specifying width. Because of this, the created font's
average width might be larger then what we expect and we might
falsely detect that the font was inappropriate for playing Nethack.
Fix provides the width that we are expecting when creating the font.
default to using latest SDK available on build machine
From Bart...
Modified build configuration to use latest SDK available by default.
This change will eliminate the need for us to hard code an SDK
version into our configuration file and will eliminate the need
for developers to set the SDK version when they do not have the
matching SDK version installed. Updated the Install.nt file removing
the mention of having to set the SDK version.
Noticed while testing the fix for the recently reported clairvoyance
bug. I saw a '1' move onto an 'I', then when it moved again the 'I'
reappeared. The remembered unseen monster couldn't be there anymore
if the warned-of monster was able to walk through that spot, so
remove any 'I' when showing a warning (digit) to stop remembering an
unseen monster at the warning spot.
Nobody has ever reported this so fixing it isn't urgent, but fixing
it is trivial so I'm doing it in now (without the clairvoyance fix).
Alex wrote: in nethackw, getlin clears message
window, so any unread messages are scrolled off the screen without
"--more--" prompt. If vary_msgcount is set to 1 and "potion shatters", it
is not easy to see the effect to name the potion correctly.
Instead of replacing the check for DRAWBRIDGE_UP with one for
DRAWBRIDGE_DOWN, the correct fix is to check for both because
replacing either one with water breaks the two-square dbridge.
Mostly add a paragraph clarifying the classification of WONTFIX for
a reported bug ('I' unseen monster clobbers remembered object at the
location). It felt like it needed a parallel paragraph for monsters.
> When moving from a pit into an adjacent pit, you "fall into" the pit and take
> damage. This happens even when you are walking back and forth between two pits,
> repeatedly, where you should have no way to fall.
>
> The intent seems to be that you can move into the adjacent pit without having
> to climb out of the first one, and this works properly - the only problem is
> that the pit gets triggered when you ought to have no distance to fall.
This is really just stumbling over uncleared clutter, not a pit fall.
There was already a way to clear the clutter between adjacent pits.
A couple of \e to \\ changes, a whole bunch of ^ to \(ha changes
(similar character but bigger so easier to see), ~ to \(ti (ditto),
and - to \- (first is a hyphen, second is a minus sign which is
bigger; see the difference for "- and | The walls of a room...").
As well as horizontal walls, open doors, top and bottom of swallow
and explode octagons, I changed command line switches -s, -X, and -D
to use minus sign. I was unsure whether the umpteen M-C should be
changed too. Since it was less work to leave them as-is, that's
what I did. I also left ^C with smaller circumflex punctation
instead of changing to bigger circumflex character for same reason.
The [much smaller] Guidebook.tex changes need testing.
Not fixed:
I think the sentence "you can type 'nethack -s all' on most versions"
is very misleading. Using 'versions' to refer to the various ports
rather than different releases is iffy, but my complaint is that
"typing something" sounds like an action you would perform while in
the game. Access to a command line and figuring out how to invoke
nethack from there is probably not something where "most versions"
applies any more. But I don't know how to rephrase that succinctly.
If I did, I would have just changed it....
The sample map was being rendered in a proportional-width font for
Guidebook.mn -> Guidebook.ps -> Guidebook.pdf so looked awful. It
is quite hard to believe that no one ever noticed this. I wasn't
sure how to force tty font, but it is straightforward to pick
constant-width variant of Roman which seems to be 'roff's universal
font.
Prevent ".nethackrc" from being hyphenated and split across lines.
Ditto for other file names in the same section even though they
hadn't been positioned in spots where they got split. I put same
thing into Guidebook.tex but I don't know whether their embedded
dots will become a problem there.
Loads of unmatched double quotes were confusing Emacs' nroff-mode
(which unlike tex-mode for Guidebook.tex, wasn't being activated
by default for Guidebook.mn). Supply missing closing quote for a
bunch of things, convert literal '"' to '\(dq' for ones that aren't
intended to have matching close quote. And change a bunch of
instances of "text" to ``text'' for rendering as quoted strings.
(There are a lot of single-quoted characters 'c' which should
probably be `c' instead, but I haven't touched those.)
There were several '\e' to render the 'escape' character, but that
is something which can be changed at will. Use '\\' to explicitly
show backslash instead. Change several ' - ' and '--' to '\(em'
for M-sized dash. Right now they all have <space>\(em<space> but
the spaces probably shouldn't be there.
Change instances of 'number_pad' to '.op number_pad' to have it
rendered as an option name.
Remove the obsolete sentence which said that "Elbereth" might be
conditionally excluded. (This change also made in Guidebook.tex.)
Split some wide lines (wide in the source, not after rendering),
although this wasn't done exhaustively. For the re-split lines,
put each sentence on its own line as suggested by 'roff' man page.
Fix the alignment of three short tables which use 'key dash meaning'
so that the dashes line up using Keni's .PS/.PL/.PE macros. (There
might be others that need this.)
Center the "- - - -" separator which precedes the list of dungeoneers
at the end. (Thinking about it now, possibly it should be forced to
have zero paragraph indentation prior to centering rather than tacking
on some trailing spaces to shift the non-blank part to the left. The
title for the table of display symbols might be in the same boat here.
But I'm roff'd out for the time being.)
Try to explain object filtering for commands that can take multiple
object classes combined with multiple BUCX states (and/or 'unpaid').
At the moment it is attached to the 'D' command where it is most
likely to be used, but probably ought to have its own subsection in
the Objects chapter so that it doesn't bog down the command list.
The filtering paragraph ought to be duplicated in Guidebook.tex, but
there's enough quoting going on that I didn't trust myself to attempt
an untested change.
Instead of modifying tmac.n's '.ux' macro, replace usage of it with
clone '.UX' (inline in Guidebook.mn in order to avoid modifying tmac.n
according to the author's wishes). '.ux' was used in several places
and neglected in a few others. Now all "UNIX" references use '.UX'
(unless I missed some...). Only the first generates a trademark
footnote. Also only the first adds the (r) superscript for registered
trademark; it would be better if that macro always showed (r) while
continued to show the footnote only once.
I made the mistake of making a bunch of small revisions all at once
and am not going to try to separate them out for separate commit.
I'm not sure they all got reviewed closely; I didn't spot any glaring
errors while scrolling through the formatted file.
The table of display symbols wasn't quoting the backslash used for
thrones so that symbol showed erroneously as blank. hbeam, vbeam,
lslant, and rslant (used for zap animations) were mislabeled as
"wall". (drawing.c used to have the same bug but it got fixed about
two years ago. Guidebook.tex still needs to have this fixed.)
In the section 'using a configuration file', the file name ".nethackrc"
ended up as a hyphenated split across two lines. That needs to be
fixed; the presence of a dash makes the spelling of the name become
ambiguous.
Several small tables that use <something><space+dash+space><something>
don't line up their dashes correctly.
I replaced most blank lines and also lines which begin with whitespace.
One notable exception is the sample map excerpt. It seems to format
as intended so I didn't try to tinker with it.
tmac.n contains a comment asking that modified versions not be
distributed. So back out the change which updated '.ux' with
the current trademark owner for "UNIX" so that we can continue
distributing with Guidebook.mn. We'll handle the out of date
trademark issue in another fashion.
The 'roff Guidebook's first reference to UNIX includes a footnote with
the trademark notice. Several subsequent ones do not. I think that's
ok; I think the '.ux' macro even keeps track and only issues it once.
But the extra ones aren't currently using '.ux' and probably should in
order to get the '(tm)' character. I'll leave that for someone else....
The history section mentions quite a few trademarked names. I hope
that the blanket "brand and product names are trademarks or registered
trademarks of their respective holders" is sufficient for them.
Remove trailing spaces from doc/fixes36.1 (only a couple),
doc/Guidebook.mn (several), and doc/Guidebook.tex (many). I re-split
some lines made wider by embedded formatting directives, but tried to
avoid getting carried away with that.
I think I added one missing period to Guidebook.mn and one missing
comma to Guidebook.tex. Aside from that, they should format the same
as they did before this patch.
A bunch of trailing spaces crept in with the most recent udpate;
remove them. Also, most sentences are separated from each other by
two spaces, but 2 or 3 had only one space. Also, rewrap a couple of
the widest lines although none of them were too wide for displaying
within 80 columns.
When a getlin() response is being typed, it wraps to second line if
the cursor tries to go past COLNO-1, but if a previous response is
treated as part of the prompt, using pline() to write prompt+space+text
wraps at a whole word boundary. tty's getlin() assumes that the screen
position can be derived from that prompt+space+text_so_far but that
doesn't match if wrapping at a word boundary leaves blank space at end
of the top line.
When a prompt is accompanied by default answer, output the answer
separately instead of pretending it is part of the prompt. Line-wrap
should occur at same point as when it was originally typed and avoid
the confusion about how far to back up when deleting characters.
This hasn't been exhaustively tested but it seems to work correctly
for ordinary input, input erased one character at a time, and input
killed all at once. One thing which definitely hasn't been tested is
having the prompt itself be so long that it needs to wrap.
The #wizwhere command (formerly ^O) has given the location of the
invocation position when on the relevant level for ages. It was
extended in 3.6.0 to give magic portal location when on the any
of the four elemental plane levels. Extend it again to show the
location of any magic portal when on a level which has one (so an
extra line of feedback at end of ^O output for quest entry, quest
home, Ft.Ludios entry once that's been assigned, and Ft.Ludios).
Allow the 'm' prefix for wizard mode level teleport command. Using
it skips the initial prompt for level destination and goes directly
to the menu of special level locations that you get when answering
'?' to that prompt.
Some github feedback pointed out that getting annotation input from
the player behaved differently from similar input for naming of
monsters and objects. The complaint stated that hitting <return>
without supplying any input removed the old annotation, where other
naming would leave the old name intact. 3.6.0 did misbehave that
way; current code does too if EDIT_GETLIN is disabled but behaves
as desired when it's enabled. (There's nothing that I can spot in
donamelevel() to explain why. I'm confused. Is tty_getlin()
returning the default answer instead of empty if that default text
is deleted at the prompt and no new text entered prior to <return>?)
Make donamelevel() work like mon/obj naming. Empty input leaves
existing annotation, if any, intact.
Having the autodescribe feature enabled and moving the cursor onto
a statue yields "statue of a <mon>" under normal circumtances, but
when done while hallucinating the feedback was just blank (because
the lookat() code couldn't find any monster at statue's location).
Now it will be "<random mon>" (not "statue of a <random mon>")
instead, same as when moving cursor over glyphs of actual monsters.
When the fire command prompts for missile, it autoquivers the chosen
item. Originally that was only done when the chosen item was a stack
but that got changed (back in 2007...) and the relevant comment was
not updated at the time.
I once changed dump_map() to suppress blank lines as it processed the
known portion of current dungeon level so that no blank lines would
be shown above the mapped area and at most one would be shown below.
Any blank lines within were put back. But the count of the current
block of suppressed lines wasn't being zeroed when an internal gap
did get put back, so after that every line got spurious blank lines
inserted in front of it. I'm surprised that no one seems to have
discovered this problem.
This fix also changes the dumped map to suppress trailing spaces. In
the process, I noticed that the original DUMPLOG code was clobbering
column COLNO-1 if that was ever part of known map. buf[x - 2] = '\0'
overwrote the final map character in buf[] with the terminator.
After about the third time typing '#' and getting a prompt of "# K", I
decided that it wasn't clumsy typing. The call chain for get_ext_cmd()
was passing an uninitialized output buffer to [hooked_tty_]getlin()
which treated random junk as the previous result to be used as current
default. Other interfaces may need a similar fix.
The cavemen quest description includes an 'S' in the lower right
corner of the MAP...ENDMAP section of the locate level. It produced
a secret door as intended but did not have horizontal vs vertical set
because the latter was only being done for DOOR directives. Instead
of adding an explicit directive, make the loading code set horizontal
vs vertical for all doors.
This fixes the orientation of that secret door in the Cav locate
level, but I noticed that it showed up an a visible horizontal wall
when the spots on either side were still blank. It's behaving as
if the door is on a lit spot and the adjacent walls are unlit (this
misbehavior was already present before the current change; it was
just shown incorrectly as a visible vertical wall before).
PatR [Sat, 31 Mar 2018 23:55:29 +0000 (16:55 -0700)]
steed sanity check
Wizard mode sanity checking gave spurious "mon not on map" warnings
for steed when hero is mounted. Steed is in the fmon list but not
expected to be present on the map.
PatR [Sat, 31 Mar 2018 00:05:23 +0000 (17:05 -0700)]
fix #H7015 - explosion chain reaction bug
The fix to prevent "crushed by a gas spore's explosion" set killer.name
to an empty string after a gas spore explosion finished, but that made
nested explosions end up with empty killer.name after the innermost
call completed. explode() shouldn't have been hanging on to a pointer
to a global value that is subject to change while it executes. Making
a local copy of the current value at the time explode() is called will
solve that (I hope...).
Simply reverting the reset of killer.name wouldn't have been correct.
The innermost explosion would still be clobbering killer.name for any
outer MON_EXPLODE explosions in progress. When the only exploding
monster is gas spore, that wouldn't be noticeable. But having other
types of exploding monsters and a chain reaction which affected more
than one type would have exposed that bug. I think this fixes both
aspects of this problem but don't have a second type of exploding
monster to verify the second part.