Makefile.mingw32 and Makefile.mingw32.depend are intended to replace
Makefile.gcc.
To use them:
cd /d/prj/NetHack/src
cp ../sys/windows/Makefile.mingw32* .
mingw32-make -f Makefile.mingw32 clean
mingw32-make -f Makefile.mingw32 depend
mingw32-make -f Makefile.mingw32
Improvements:
Add $(USE_LUADLL) to release lua-5.4.3.dll, instead of link static
lua.lib into .exe files.
Add windres "--target" option, to fix the NetHackW.exe startup problem.
Add "-s" option to $(LDFLAGS) in release mode, to make exe/dll smaller.
Add $(CLEAN_DIR) and $(CLEAN_FILE) to track what to clean.
Remove *.tag, but use "order-only prerequisites" to make directory
before any '.o' is built.
Use make variables and functions to improve readability.
Each project has its own directory to hold object files, to fix the
interference problem between different projects, like NetHack.exe object
files were built with "-DTILES".
Add "-mconsole" option when linking NetHack.exe, to fix that sometimes
GetStdHandle returned with invalid handle error.
Add ".PHONY" statements.
Use "gcc -E -MM -MT" to implement semi-auto "Prerequisites Generating".
The stop_row and stop_col were off-by-one in some cases, leaving
black lines on the map when a window on top was closed.
Simplify the calculation by always going one row/col further,
ensuring previously covered area gets redrawn for sure.
This should not affect speed or resource usage noticeably these days.
The priest/cleric quest provides unlimited wraiths and a player
(not a robot with limitless patience) posting on reddit gave up
building up his character by killing them and eating the corpses
after accumulating 40K HP and 20K En. (Or something close to that;
I can't get back to the post right now.) His character might have
been capable of surviving decapitation or bisection.
Make it very much harder to get to 5 digits of HP or En via level
gains after reaching level 30. If maxhp < 300, new gains will be
capped at 5 extra HP; 300..599, cap is 4; 600..899, cap is 3;
900..1199, cap is 2; and once 1200 is reached, further level gains
will only add 1 HP. For maxen < 200, extra En is capped at 4;
200..399, cap is 3; 400..599, cap is 2; and once 600 is reached,
further gains only add 1 En. Note: this only kicks in when gaining
levels while already at level 30.
Make the code for setting up the 'O' menu's '?' entry more compact.
Also adds 'skipinvert' flag for that entry but it doesn't do anthing
here. I thought that it had been implemented, but aside from the
flag itself, it doesn't seem to exist.
The extended command input prompt was behaving in an unintended way:
Typing #a<enter> executed #adjust. Spaces in the entry prevented matching
any command. No error message was given when no command was matched.
Fix all of those, so it behaves more like the tty.
Clean up the tty, curses, and X11 windowport code, so they don't use
the extcmdlist array directly, but query with extcmds_match
and extcmds_getentry.
Honor any key binding for <space> when rest_on_space is Off.
Toggling it On and Off remembers the key binding if there is one.
So if the RC file has BIND=\32:attributes, <space> will run #wait
when rest_on_space is On and run #attributes when it's Off.
When rest_on_space is On, assign same function as for #wait to the
<space> key. When Off, set that key to Null instead. Binding some
other command to <space> when rest_on_space is Off doesn't work but
I would classify that as something to be discouraged anyway.
This fixes moving in direction '>' while wielding a pick-axe with
the 'autodig' option On. Attempting to dig assumed size-to-side
activity because u.dz wasn't being set, so the pick-axe was swung at
thin air instead making a pit or turning an existing pit into a hole.
dodown() and doup() should probably call set_move_cmd() instead of
manipulating u.dz directly. But they would also need to suppress
g.move_attempting or the game says "you can't get there from here..."
after successfully digging or plunging into a pit.
Throwing silver or blessed non-weapons upward and having them fall
back onto susceptible hero's head wasn't adding the extra bonus damage
that a weapon would get in that situation.
Make hitting vulnerable monsters with blessed just-about-anything get
the 1d4 bonus that blessed weapons get for that. Doesn't apply to
things that have their own special handing, like potions or eggs.
When hitting with a wielded wet towel, use "you lash <mon>" like
bullwhip. If you continue with the towel after it has dried out,
message reverts to ordinary "you hit <mon>".
Enhance damage slightly and double the wetness bonus when target
is an iron golem. Damage was (tmp=rnd(1..7), max(tmp,6)); now it's
rnd(1 + 1..7) for other monsters, rnd(1 + 2*(1..7)) for iron golem,
with no cap of 6 for either.
Sequencing: defer "your towel dries" until after the lash message.
When the hero has the Glib condition, ^X reports "you have slippery
fingers" or "you have slippery gloves" but self-probing (either wand
or stethoscope aimed at self) was reporting "you have slippery hands."
Change self-probing to match enlightenment for this.
When picking '?', showing help, and then re-executing the 'O' menu,
let doset() perform its normal cleanup after the first pass instead
of duplicating that prior to making the second pass.
When using the 'O' menu, if player picks '?' plus additional choices,
it shows help and then operates on the other choices as if normal.
But for the latter, it was re-using the '?' pick as an option to
change, attempting (and silently failing) to toggle the legacy option
because it happens to be allopts['?' - 1]. It was also relying on
the list of picks being sorted in menu order rather than in player's
selection order or some other arbitrary ordering, something not
specified by the windowing specs.
Instead of looking for '?' as the first selection, process the list
normally and show the options menu help if '?' is found as a choice.
If any interface doesn't return a set of multiple picks in menu
order, the help might not be seen before prompting for compounds,
but it would be very unusual to ask for help and also try to make
changes at the same time so this doesn't seem worth worrying about.
Builds for:
sys/msdos/Makefile.GCC - for local build on msdos itself (untested)
sys/unix/NetHack.xcodeproj/project.pbxproj - for Xcode build
sys/windows/Makefile.gcc - for Windows build via Ming-w64 (untested)
sys/windows/Makefile.msc - for visual studio nmake build
sys/windows/vs/files.props for visual studio solution/project build
Move the help text for the 'O' command from the code into its own file
and allow that to be accessed from the '?' menu as well as by choosing
entry '?' in the 'O' menu.
sys/unix/Makefile.top has been updated to handle new 'optmenu', others
need to catch up. The game will still build and run without the file
but asking for options menu help won't work until they do.
Message shown when hero sees a monster's wet towel become less wet:
"<Mon>'s {moist|wet} towel drie[ out]." Corresponding message for
hero's towel spelled "dries" correctly.
Reported for to-be-3.7 but present since 3.6.0.
This is a bit more complicated but far less intrusive. Instead of
three dozen lines of introductory text before the menu entries start,
it now has one extra menu choice at the start:
|
| For a brief explanation of how this works, type '?' to select
| the next menu choice, then press <enter> or <return>.
|? - view help for options menu
| [To suppress this menu help, toggle off the 'cmdaddist' option.]
|
Picking '?' shows essentially the same text as was in-line text in
the menu before. Then doset() goes back to the start and re-runs the
options setting menu but without that extra entry the second time.
Kicking a door can produce "WHAMMM!!!". "Wham" doesn't necessarily
imply any noise but there's a strong suggestion that it does, so a
deaf hero shouldn't be able to hear it. Give alternate feedback,
"Thwack!!" when deaf, and sometimes give that even when not deaf.
Also tone down "WHAMMM!!!" to Whammm!!".
For Qt's extended command selector, gray out the button for "repeat"
because picking it just causes the '#' command that led to that to
be repeated, bringing the extended command selector up again.
It can be chosen by typing "rep" but at each keystroke the grayed
out button is visible so having that behave differently from what
was probably expected should not come as a surprise.
The substantial increase in extended commands has forced the grid of
commands to be expanded, otherwise the bottom of each column ends up
off the bottom of the screen.
The widget supporting the '#' command doesn't include scrollbars.
It really needs to be able to include those when needed but I don't
know how to do that.