Commit Graph

18457 Commits

Author SHA1 Message Date
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
nhmall
92340a6827 consolidate some arg processing
Unix and Windows had diverged significantly for command line
options handling.

This:
   1. uses the the Unix processing as a baseline.
   2. consolidates the code in earlyarg.c, where it can
      be a common copy to be shared.
   3. start converting the Windows command line argument
      processing to the Unix code that now resides in earlyarg.c.
2026-04-04 13:44:23 -04:00
Pasi Kallinen
9c8c17b70c Tweak the blessed potion of see invisible
Blessed potion guarantees the intrinsic, if you're
invisible and can see invisible before quaffing.
2026-04-04 17:58:30 +03:00
Pasi Kallinen
87b3549134 Blessed potion of see invisible
Blessed potion of see invisible was guaranteed to give see invisible
intrinsic, making it far too easy to acquire.  It now has 1/10 chance
of giving it permanently, somewhat similarly to potion of invisibility.
2026-04-04 17:01:58 +03:00
Pasi Kallinen
c5efbf6cf7 Split level rnd mon generation into separate function 2026-04-04 16:08:58 +03:00
Pasi Kallinen
5f1163c11a Change the tips internal data struct
Previously adding any new tips invalidated saves; now you can have
up to the number of bits in a long without change in savefile.

Invalidates saves.
2026-04-04 15:39:46 +03:00
nhmall
7120a7190e some more discarded-qualifiers fixes 2026-04-04 07:52:06 -04:00
PatR
9bdc41b263 more mhitu.c style/formatting 2026-04-03 08:37:14 -07:00
Pasi Kallinen
8c55e7df1c Code style nit 2026-04-03 12:59:09 +03:00
Pasi Kallinen
b2a80ab87a Prevent phaseable monster hiding deep in undiggable walls
The outer edge of a random dungeon level can have undiggable
walls.  Phaseable monsters, such as earth elementals, could
hide deep inside that boundary.  Turn the walls beyond the
first layer of non-diggable walls also non-phaseable.
2026-04-02 15:43:13 +03:00
Pasi Kallinen
fc6c7d70be Give spellcast attack to monster priest and wizard
Acolytes grow up to priests, apprentices to wizards, but they
did not cast spells after they grew up.  Give the monster priests
and wizards the same spellcasting attack as all the other
priest and wizard -type monsters.

This lack of magical ability goes back at least to 3.3.1;
I didn't bother checking back further.
2026-04-02 12:28:00 +03:00
nhmall
3b4d4cd261 expand range of oc_weight 2026-04-01 12:56:37 -04:00
Pasi Kallinen
542d1db5f4 Another fix for #K4317 - monster grudge
Undead monsters created by the level creation routine do not grudge
other (zombifiable) monsters created during the level creation.

This of course doesn't prevent the grudge happening with monsters
created during gameplay.

Invalidates saves and bones.
2026-04-01 19:24:43 +03:00
nhw_cron
d911e4c4d3 This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-04-01 11:02:46 -04:00
nhmall
e377591240 follow-up: avoid issue with onefile concatenation 2026-04-01 10:59:22 -04:00
nhmall
ab459265b0 top line fixup 2026-04-01 09:09:39 -04:00
nhmall
396a3735ca follow-up for Xcode project 2026-04-01 08:48:05 -04:00
nhmall
686618f34d move early arg and enum dump processing to own file 2026-04-01 08:32:13 -04:00
Pasi Kallinen
3917f5493d More mcastu code reorg
Instead of using two separate functions with switch-cases for
wizard and clerical spell lists, define the spell lists
as arrays and use a single function to pick a spell
from the lists.

Adds levels to the monster spells, using the switch-case values,
with some minor fudging.
2026-04-01 13:17:09 +03:00
PatR
c8e97527f1 Schroedinger's live cat
Give a little experience when releasing live housecat from Schroedinger's
Box, similar to recent change giving experience when opening the Box
produces a dead cat.
2026-03-31 20:48:01 -07:00
nhmall
aa25005cf0 whitespace cleanup on recent file
replace leading tab with spaces to match include style
2026-03-31 12:57:41 -04:00
nhmall
90db8d7e2d clear up some warnings appearing with gcc 15.2.0
allmain.c: In function ‘debug_fields’:
allmain.c:1133:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1133 |     while ((op = strchr(opts, ',')) != 0) {
      |                ^
cfgfiles.c: In function ‘find_optparam’:
cfgfiles.c:590:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  590 |     bufp = strchr(buf, '=');
      |          ^
cfgfiles.c:591:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  591 |     altp = strchr(buf, ':');
      |          ^
end.c: In function ‘should_query_disclose_option’:
end.c:482:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  482 |     if ((dop = strchr(disclosure_options, category)) != 0) {
      |              ^
invent.c: In function ‘loot_classify’:
invent.c:175:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  175 |     p = strchr(classorder, oclass);
      |       ^
o_init.c: In function ‘dodiscovered’:
o_init.c:774:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  774 |     if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
      |                                 ^
o_init.c: In function ‘doclassdisco’:
o_init.c:907:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  907 |     if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
      |                                 ^
objnam.c: In function ‘the’:
objnam.c:2200:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2200 |         if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
      |                   ^
objnam.c:2200:53: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2200 |         if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
      |                                                     ^
options.c: In function ‘optfn_disclose’:
options.c:1529:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1529 |             dop = strchr(disclosure_options, c);
      |                 ^
pager.c: In function ‘add_cmap_descr’:
pager.c:1212:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1212 |                     || ((p = strchr(x_str, ' ')) != 0 && !strcmpi(p, " ice"))
      |                            ^
2026-03-31 10:16:28 -04:00