Commit Graph

18480 Commits

Author SHA1 Message Date
a34a07bb75 Merge branch 'NetHack-3.7' into twitch-interact 2026-04-13 15:05:44 -07:00
Pasi Kallinen
10a47c0713 Remove unused curses define 2026-04-13 16:54:44 +03:00
nhmall
8c8121eb3c move a pair of functions from save.c to restore.c
A utility that links only with restore.o needs to find them.
2026-04-13 09:08:53 -04:00
nhmall
efaabc3203 more storing only relative times in save & bones 2026-04-13 07:53:51 -04:00
nhmall
4bd3f8398e whitespace cleanup: tabs to spaces 2026-04-13 07:35:23 -04:00
nhmall
36c3f208a6 again store relative timestamps in save and bones 2026-04-13 07:32:54 -04:00
nhmall
c249de0c2a timestamp change in save files requires EDITLEVEL bump 2026-04-13 07:11:47 -04:00
nhmall
4665b6c13c follow-up
staticfn define caused test to succeed when it shouldn't have
2026-04-13 06:47:10 -04:00
nhmall
337c5189dd store relative timestamps in save and bones 2026-04-13 06:39:54 -04:00
PatR
7ed50f6ef8 wand of stasis tweaks
When wand of stasis is zapped multiple times, keep the longest duration
rather than replace duration with each zap.

When current level is under the effect of a wand of stasis, have the
wizard-mode command #timeout say so.
2026-04-12 21:03:21 -07:00
Pasi Kallinen
8d6ab2f9ab Allow m-prefixing #annotate
This is the same as m-prefixing #overview
2026-04-12 19:55:12 +03:00
Pasi Kallinen
635dca05d5 Shapeshifters change shape less
Non-vampire shapeshifters were changing shape a lot; often you
could have a chameleon turning into a different monster each turn.

Now monster shape changing is actually their "special" power,
and it takes 3-12 turns until they can do it again.
2026-04-12 19:01:20 +03:00
Pasi Kallinen
26453eaea0 Allow polearming a monster in unlit space
... as long as you can see the monster, eg. via infravision
2026-04-12 15:54:18 +03:00
PatR
c7ccd4ca5d add pet->droptime check to monster sanity check
I don't see where loading or saving bones makes any attempt to fix up
pet->droptime at all.
2026-04-11 17:35:35 -07:00
Pasi Kallinen
8cf6c62862 Don't put non-m-prefix command msg into history 2026-04-11 23:05:41 +03:00
nhmall
80cc5ecb29 some windows cleanup at end of game 2026-04-11 14:08:36 -04:00
Pasi Kallinen
9d27cfe8b8 Prevent selecting all options in #optionsfull menu
No-one ever intentionally selected all entries in the options
menu.  Prevent it from happening by accident.
2026-04-11 18:37:56 +03:00
nhmall
f6e341546d thinko 2026-04-11 11:10:47 -04:00
nhmall
f29cea4a35 another impossible() update for dog_eat() 2026-04-11 07:17:20 -04:00
nhmall
85f03deca9 refine a dog_eat impossible()
Have the impossible message indicate whether the pointed-to
edog struct itself is still intact (not overwritten somewhere,
such as misuse of a stale or bad pointer) versus the apport field
itself being assigned an out-of-whack value some place.
2026-04-11 06:37:10 -04:00
PatR
b264e17cf2 fix use-after-free bug in curses shutdown
A year ago a use-free-bug was reported for curses.  I don't use ASAN
so haven't reproduced it, but I think this should fix it.

If the RIP window is deleted after the map window has gone away, the
code from commit 5e572d3d5f (post 3.6.7)
would execute and access the internals of the deleted map window.
2026-04-11 01:02:42 -07:00
nhmall
45b01cdb9a nomenclature of a couple of tasks in CI 2026-04-10 11:30:46 -04:00
nhmall
e8290bc275 try testing a Windows 11 snapdragon build in CI 2026-04-10 11:14:22 -04:00
nhmall
3acb327115 resolve a warning on one platform 2026-04-10 10:53:53 -04:00
nhmall
fffbf4c2e5 Windows option update for map_mode
Ensure preference_update() is called
2026-04-10 10:36:36 -04:00
Pasi Kallinen
9172b7eb09 Add tutorial and tips to Windows nethackrc template 2026-04-10 16:39:16 +03:00
nhmall
832db5b9e1 define TTY_PERM_INVENT in Windows console build 2026-04-10 09:26:24 -04:00
nhmall
e005c26fbd another safestartup vestige 2026-04-10 09:24:10 -04:00
nhmall
4dd47db3ad yet more Windows startup; also safestartup vestige 2026-04-09 15:08:07 -04:00
nhmall
3b7c0e8a19 follow-up: more Windows startup 2026-04-09 14:14:49 -04:00
nhmall
335cd65d5a some further Windows startup tweaking 2026-04-09 14:04:28 -04:00
nhmall
699c31459b follow-up: fix placement location 2026-04-09 10:32:24 -04:00
nhmall
8b2b749f6f quiet a warning observed when compiling consoletty
The warning was observed during CI build:
[warning]NetHack\sys\windows\consoletty.c(2573,29): Warning C4127: conditional expression is constant
2026-04-09 10:28:52 -04:00
nhmall
4f5146306b follow-up: punctuation 2026-04-09 10:20:01 -04:00
nhmall
213400529a follow-up comment bit 2026-04-09 10:18:00 -04:00
nhmall
49cccb5a8d quiet a warning compiling sys/share/uudecode in recent compiler
../sys/share/uudecode.c: In function ‘main’:
../sys/share/uudecode.c:131:32: warning: format ‘%o’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘int *’ [-Wformat=]
  131 |     (void) sscanf(buf, "begin %o %s", &mode, dest);
      |                               ~^      ~~~~~
      |                                |      |
      |                                |      int *
      |                                unsigned int *
      |                               %o
2026-04-09 10:06:24 -04:00
nhmall
f8fbd9848e a couple more minor startup tweaks 2026-04-08 10:32:29 -04:00
nhmall
0085feb56a follow-up: remove one unnecessary change 2026-04-07 14:29:58 -04:00
nhmall
8cbbb74f3b more early config file pass
Because some optlist entries were ignored in the early pass,
some non OPTIONS= lines in the config file were having issues
due to those options not being set.

Extend what is being disregarded in the early config file pass
to include other config file statements.
2026-04-07 14:22:07 -04:00
nhmall
cf7a514596 consoletty.c bit
restrict a debugging line
2026-04-07 13:59:43 -04:00
nhmall
fdbf84b9b7 remove some dead code 2026-04-06 13:17:32 -04:00
nhmall
8716d92280 objects.txt tile numbering
Closes #1496 reported by @horlogeislux
2026-04-06 12:38:25 -04:00
nhmall
b2b2c3f6f2 remove extraneous line 2026-04-06 11:00:12 -04:00
Pasi Kallinen
190cbfa2b7 Fix segfault when binding keys in-game 2026-04-06 11:50:22 +03:00
nhmall
0a3b8a7b72 Makefile.nmake tweaking 2026-04-05 20:28:43 -04:00
nhw_cron
2790fa22b2 This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-04-05 13:40:19 -04:00
nhmall
1745d0bcce follow-up: cross compile for msdos 2026-04-05 13:36:06 -04:00
nhmall
6234e96b57 Change Windows startup - take 2
remove the safeproc pseudo-windowport routines from
almost a decade ago.

A very early pass is made through the config file,
seeking out just the interface-related OPTIONS=windowport
and OPTIONS=soundlib and ignoring all other options in the
config file during that early pass, so the windowport
can be activated without the NetHack core initialization
in place that some of the other rcfile OPTIONS require.

Bundles the existing rcfile processing code into rcfile().

New functions to control which rcfile options will be
disregarded in the early config file pass, and which will be
processed:

    set_all_options_disregarded();
    set_all_options_heeded();
    disregard_this_option(opt_xx);
    heed_this_option(opt_xx);

Windows calls rcfile_interface_options(), which is
a bundling of a series of function calls to achieve
the desired result.

    void
    rcfile_interface_options(void)
    {
        allopt_array_init();
        set_all_options_disregarded();
        heed_this_option(opt_windowtype);
        heed_this_option(opt_soundlib);
        rcfile();
        set_all_options_heeded();
        disregard_this_option(opt_windowtype);
        disregard_this_option(opt_soundlib);
    }
2026-04-05 13:11:14 -04:00
nhmall
db1f230772 Revert "Change Windows startup"
This reverts commit acb85b18cf.

Some optlist issues arose on some platforms, but not all.
I need to investigate the cause of those.
2026-04-05 12:07:57 -04:00
nhmall
acb85b18cf Change Windows startup
remove the safeproc pseudo-windowport routines from
almost a decade ago.

A very early pass is made through the config file,
seeking out just the interface-related OPTIONS=windowport
and OPTIONS=soundlib and ignoring all other options in the
config file during that early pass, so the windowport
can be activated without the NetHack core initialization
in place that some of the other rcfile OPTIONS require.

Bundles the existing rcfile processing code into rcfile().

New functions to control which rcfile options will be
disregarded in the early config file pass, and which will be
processed:

    set_all_options_disregarded();
    set_all_options_heeded();
    disregard_this_option(opt_xx);
    heed_this_option(opt_xx);

Windows calls rcfile_interface_options(), which is
a bundling of a series of function calls to achieve
the desired result.

    void
    rcfile_interface_options(void)
    {
        allopt_array_init();
        set_all_options_disregarded();
        heed_this_option(opt_windowtype);
        heed_this_option(opt_soundlib);
        rcfile();
        set_all_options_heeded();
        disregard_this_option(opt_windowtype);
        disregard_this_option(opt_soundlib);
    }
2026-04-05 11:37:20 -04:00