Commit Graph
18492 Commits
Author SHA1 Message Date
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
Pasi Kallinen 9bf90ee07f Replace magic number with define 2026-03-30 19:07:18 +03:00
Pasi Kallinen f68f15e3b5 Simplify some special level lua
These were generated by a script that converted the des-file
format to lua.
2026-03-30 18:27:10 +03:00
Pasi Kallinen f4173adc88 Use define for player name length in botl
This defines the cut-off how many characters of the player's name
is shown in the bottom status line.
Also increase the limit from 10 characters to 16.
2026-03-30 16:41:37 +03:00
Pasi Kallinen 9fba4af323 Status hilite menu retry limit
Fuzzer got stuck here for a very long time, so bail out
from the status hilite menu after few failed tries.
2026-03-30 13:29:12 +03:00
nhmall 12663473ab update tested versions of Visual Studio 2026-03-29 2026-03-29 20:20:56 -04:00
PatR 1813e27098 farlook of quest stairs down
When access to the quest isn't available yet, describe the stairs down
as "blocked staircase down" instead of the usual "staircase down".
Applies to mimics posing as stairs too.

Does not apply to the stairs when standing on them and using lookhere.

I was going to use "locked staircase down" but that would imply that a
key or unlocking magic could be applicable.
2026-03-29 14:02:21 -07:00
Pasi Kallinen e3e01267aa Debug panic when level has too many (sub)rooms 2026-03-29 18:47:55 +03:00
nhmall 5d814053a1 some outdated cleanup outdated/sys/windows 2026-03-27 06:59:49 -04:00
PatR f49ac037f9 release wish history memory
The memory leak only happened at end of game so wasn't a big deal.
2026-03-25 15:54:44 -07:00
nhw_cron d939238ea6 This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-25 15:26:08 -04:00
PatR 11f27226cb 'pauper' documentation
The LaTeX Guidebook has been updated but not tested.  It's unlikely that
this small change has introduced any problems though.
2026-03-25 11:18:15 -07:00
nhw_cron 7c9b4b9595 This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-25 09:10:17 -04:00
nhmall b58d2d4096 try to reduce some Amiga cross-compile warnings 2026-03-25 08:48:14 -04:00
nhmall 3c89dc2387 Guidebook date stamp to reflect most recent update 2026-03-25 08:06:12 -04:00
Pasi Kallinen f8bd79354c Add a history menu for wizwish
Use the 'm' Prefix to make wizwish show the history menu.
Also entries wished via WIZKIT are added to the history.

While debugging, I often need to wish the same thing multiple
times, and typing or pasting it with mouse is annoying...
2026-03-25 13:46:07 +02:00