Commit Graph

12755 Commits

Author SHA1 Message Date
nhkeni
6feb4f09bc enable NH_DATESUB for all .6 files 2022-01-29 16:09:26 -05:00
PatR
11c7643ea7 reformat dat/hh
For
 key name description
reduce the width of the first column from 8 spaces to 6 and increase
the width of the second column from 8 spaces to 10 so that fewer lines
have misaligned third column caused by long name.

Also a small amount of extra verbosity, mostly for I and A/P/R/T/W.
2022-01-29 12:26:22 -08:00
nhmall
8c7137613b move a file that is no longer used to outdated 2022-01-29 15:00:50 -05:00
PatR
a0964615af pull request #624 - Add missing const
git has me really confused right now, first requiring a merge, then
not needing any merge.  Anyway, add pull request #624 which was
unintentinoally closed and then couldn't re-opened.  Now it's been
incorporated so is intentionally closed.

Closes #624
2022-01-29 11:18:26 -08:00
SHIRAKATA Kentaro
cf810630de add missing const
If you want to declare a pointer which the address pointed to is constant,
you should declare it as like `static const char *const var = "...";`.

This commit supplies missing `const` and prevents some programming
error in the future.
2022-01-29 11:13:01 -08:00
nhmall
893d11f7d5 mingw symbols follow-up 2022-01-29 14:06:52 -05:00
nhmall
721db76189 do away with symbols.template in windows
If the one provided in the zip/distribution is newer, replace
the one used by the game after renaming the current one to
symbols.save.

If the one used by the game is newer, do nothing with it.
2022-01-29 14:04:20 -05:00
nhmall
9b38353833 update for mingw build within CI 2022-01-29 13:58:38 -05:00
nhmall
4db0afe785 fix a comment typo 2022-01-29 09:36:09 -05:00
nhmall
c03f24ceb7 try to work around a mingw shortcoming within CI
The mingw-w64 version on the CI platform is older and
is missing a sought copy of winres.h.

This attempts to work around that by having the Makefile
create a temporary copy of winres.h in the win/win32 directory
which that windres.exe is already search in. The file is
then immediately removed after windres uses it.

The contents of the temporary winres.h match the contents
of that file that is distributed with the more up-to-date msys2
distribution of mingw-w64.

It won't be known if this workaround solves all the CI issues
with the mingw build until after it is committed and observed.
2022-01-29 09:20:29 -05:00
nhmall
c2024b8990 remove some outdated references to travis 2022-01-29 08:34:58 -05:00
Pasi Kallinen
9f9551bdb3 Swap running and rushing modes back
I unintentionally swapped the shift and ctrl movement keys
when redoing the movement input - change them back to how
it was earlier.

Also change the number_pad meta-key bindings, and explain
in the comments why: We can't bind shift or ctrl numbers.
Meta (aka alt-key) works with number-pad numbers when
the altmeta-option is on. There was no altmeta in 3.4.3.

Here's a table of the flags.run/g.context.run values,
from 3.4.3 and 3.7 as of this commit:

             | num_pad:0 || num_pad:1
             | 343 | 370 || 343 | 370
-------------------------------------------------
 <dir>       |  0  |  0  ||  0  |  0
 shift-<dir> |  1  |  1  ||  0  | N/A
 ctrl-<dir>  |  3  |  3  ||  0  | N/A
 meta-<dir>  | N/A | N/A || N/A |  1 (with altmeta)
 m-prefix    |  0  |  -  ||  0  |  -
 G-prefix    |  3  |  3  ||  3  |  3
 g-prefix    |  2  |  2  ||  2  |  2
 5-prefix    | N/A | N/A ||  3  |  3
-------------------------------------------------

The m-prefix in 3.7 does not set the run-value, as it can now
be used with any movement key or prefix, which will set the run value.

New input system does not lose functionality when compared to 3.4.3.
Instead, the number_pad users gain the meta-<dir> running.

This doesn't fix the issue of three badly differentiated run values.
2022-01-29 12:58:06 +02:00
nhmall
b9228bd284 Jan 28 cron daily updates 2022-01-28 10:57:08 -05:00
Pasi Kallinen
af6f9b4594 X11 issue is already fixed 2022-01-28 17:28:54 +02:00
nhmall
fdaf6ab328 comment bit 2022-01-28 09:31:30 -05:00
nhmall
1b7ffcc87b Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-01-28 07:50:46 -05:00
nhmall
f5fd7e1557 CI mingw build should now invoke compile via gcc 2022-01-28 07:49:41 -05:00
Pasi Kallinen
c722962713 Cancellation explodes magical traps 2022-01-28 08:30:08 +02:00
nhmall
a6a7af368f mingw rc and lua version 2022-01-28 00:08:02 -05:00
nhmall
5d4fa475fa CI mingw build follow-up 2022-01-27 23:00:49 -05:00
nhmall
0431bcf3ac update CI build for mingw 2022-01-27 22:54:03 -05:00
PatR
03d1a2980b update male valkyrie tile
Basic stereotypical rendering:  shortens the hair and adds a beard;
removes the large, thin red X.  Needed when a valkyrie puts on an
amulet of change.
2022-01-27 16:15:07 -08:00
PatR
993477b48f X11 topten display
Make the same change as was done for Qt three or so weeks ago:  force
the 'toptenwin' option on in X11_init_nhwdinows() so that scores (or
wizard mode "your score is ignored") are shown in a popup text window
instead of being sent to stdout.
2022-01-27 16:11:22 -08:00
PatR
ea811e7087 X11 ant extermination
The X11 tiled map was being initialized to the tile for giant ant.
Visible during the role/race/&c selection dialog and if you get the
"already a game in progress under your name; destroy it?" prompt.
2022-01-27 16:10:11 -08:00
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