Commit Graph

12731 Commits

Author SHA1 Message Date
nhmall
b50d78231c fixes37.0 entry for pr#661
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".
2022-01-27 18:40:53 -05:00
Feiyun Wang
96de8d58d6 Some improvements in Makefile.mingw32.depend
- Change $(cce) to output .d file prerequisite too, the same as .o
- Replace $(CLEAN_FILE) handling w/ "clean: cleandep", for more encapsulation
2022-01-27 18:34:50 -05:00
nhmall
8a26e01397 remove sys/windows/Makefile.gcc
It has been superseded by sys/windows/Makefile.mingw32
2022-01-27 18:34:23 -05:00
Feiyun Wang
2ba0ef0579 Add Makefile.mingw32 and Makefile.mingw32.depend 2022-01-27 18:33:52 -05:00
Feiyun Wang
4827540305 Make WinMain() to call mingw_main() instead of main() for mingw32 version. 2022-01-27 18:33:52 -05:00
Feiyun Wang
1cb0260b1c Fix panic "Unexpected DpiAwareness state" in Windows 10 for mingw32 version. 2022-01-27 18:33:52 -05:00
Feiyun Wang
3de2b825b0 Fix mingw32 building errors. 2022-01-27 18:33:52 -05:00
Feiyun Wang
4b4070fb57 Remove DPI_AWARENESS stuff for mingw32 in win10.h 2022-01-27 18:33:52 -05:00
nhmall
5f0b52cf83 utilize the submodules for Windows build 2022-01-27 18:30:43 -05:00
nhmall
13ee03be1f support for build with current Lua version 5.4.4
On some platforms this may require:
       re-using a sys/unix/hints file to generate updated Makefiles
       make spotless
       make fetch-lua
2022-01-27 18:23:17 -05:00
nhmall
5928f8f70a windows date updates
Also remove reference to sys/windows/Makefile.gcc
2022-01-27 16:59:00 -05:00
Pasi Kallinen
95acaf2989 Falling through a hole or trap door will cause damage 2022-01-25 14:17:43 +02:00
Pasi Kallinen
61f78318a5 X11: Fix map expose area
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.
2022-01-25 11:26:47 +02:00
Pasi Kallinen
0652f7f774 Mindless monsters shouldn't cringe stepping on squeaky boards 2022-01-24 23:13:36 +02:00
Pasi Kallinen
4130a3a6ae Fix ESC so it cancels the movement prefix commands
My changes to turn the movement and prefix commands into
extended commands broke this.
2022-01-24 19:48:43 +02:00
Pasi Kallinen
6ed315ecf8 Don't stop running next to a peaceful monster
... unless the monster blocks the way.
2022-01-24 18:45:57 +02:00
PatR
6d67f56eab throttle excessive HP and En gains
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.
2022-01-23 17:18:05 -08:00
PatR
e9b4ce1f5b more 'O' tinkering
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.
2022-01-23 11:02:26 -08:00
Pasi Kallinen
a6816824c7 Lua: Pass more data to room contents function 2022-01-23 13:27:00 +02:00
Pasi Kallinen
7b87f7b495 X11: Fix map display for hypothetical huge map
memsets don't work very well when xchar isn't char sized.
2022-01-23 01:14:26 +02:00
Pasi Kallinen
d92d5f2268 Fix possibly uninitialized error 2022-01-22 21:53:15 +02:00
Pasi Kallinen
3b542e3cab Fix vision if xchar is defined larger than char 2022-01-22 21:15:44 +02:00
Pasi Kallinen
738a225011 Replace a return value with ECMD define 2022-01-22 16:04:02 +02:00
Pasi Kallinen
f698d48ba0 Avoid generating monsters on boulders
... unless the monster can go through walls.
2022-01-22 15:41:18 +02:00
Pasi Kallinen
9d64d135b8 Curses: fix extended command input
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.
2022-01-22 14:32:53 +02:00
PatR
fe4ae913cc more 'rest_on_space'
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.
2022-01-22 00:30:39 -08:00
PatR
6a72e48a40 fix rest_on_space
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.
2022-01-21 15:51:05 -08:00
PatR
75fed4b92b autodig '>'
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.
2022-01-21 14:27:21 -08:00
PatR
afc2e1592d reconcile toss_up() with hmon_hitmon()
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.
2022-01-21 13:37:33 -08:00
PatR
aab21eba95 blessed objects vs vulnerable creatures
Collect creatures that don't like being hit by blessed objects in one
place.  No change in behavior.
2022-01-21 13:19:57 -08:00
PatR
182abe6b60 wet towel tweaks
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.
2022-01-21 11:38:21 -08:00
PatR
76df2ffcf5 slippery fingers
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.
2022-01-20 16:31:34 -08:00
PatR
fc76beaf1d more 'O' tinkering
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.
2022-01-20 12:44:43 -08:00
PatR
0416f7f297 'O' help bulletproofing
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.
2022-01-20 12:25:24 -08:00
PatR
bb9754195c fix 'O' typo 2022-01-20 10:42:38 -08:00
nhmall
f4331a2d03 adjust build procedures for added file
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
2022-01-20 10:37:53 -05:00
nhw_cron
c47934d087 This is cron-daily v1-Jan-11-2022. 000files updated: Files 2022-01-19 18:52:52 -05:00
PatR
5f14f0ff57 options help one more time...
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.
2022-01-19 14:22:21 -08:00
nhmall
30af8e0ddc more if (c) XtSetArg(...); num_args++; braces 2022-01-19 11:01:52 -05:00
PatR
aaa49e3e96 fix #K3520 - typo in dry_a_towel()
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.
2022-01-19 00:58:08 -08:00
PatR
ec06e03dd4 redo the help for the 'O' command
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.
2022-01-18 16:27:32 -08:00
PatR
9f6f6c1250 fix #K3518 - "WHAMMM!!!" vs deafness
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!!".
2022-01-18 14:13:56 -08:00
PatR
f420b9672f Qt: more '#' support
Add an entry for running an extended command to Qt's 'game' menu.
2022-01-17 14:38:16 -08:00
PatR
0a47a6fd3d Qt vs #repeat
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.
2022-01-17 11:22:13 -08:00
nhw_cron
9cca0d88d8 This is cron-daily v1-Jan-11-2022. 005guidebook updated: doc/Guidebook.txt 2022-01-17 12:51:40 -05:00
nhw_cron
d781c4172e This is cron-daily v1-Jan-11-2022. 001datesub updated: ./doc/Guidebook.tex ./doc/Guidebook.mn 2022-01-17 12:51:25 -05:00
Pasi Kallinen
2e144e814d Change repeat into extended command 2022-01-17 17:13:59 +02:00
PatR
a0f222fe66 Qt extended commands
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.
2022-01-16 14:41:17 -08:00
Pasi Kallinen
89cfea0085 Fix up/down movement
I broke these in the recent commit changing the movement commands.
2022-01-16 21:46:46 +02:00
nhw_cron
8fa1e1ffa6 This is cron-daily v1-Jan-11-2022. 005guidebook updated: doc/Guidebook.txt 2022-01-16 12:59:47 -05:00