Commit Graph
100 Commits
Author SHA1 Message Date
nhmall feaa9ed334 update tested versions of Visual Studio 2026-08-11 2026-08-11 14:15:24 -04:00
nhmall cd493962b1 don't catch thrown objects while asleep
Reported directly to devteam.
2026-08-07 08:46:53 -04:00
nhmall 411c8becb9 follow-up
scope of cmdstr
2026-08-06 10:35:46 -04:00
nhmall c3ce341434 Re: "Key binding failed?!--More--"; Strcat to an empty character buffer, causing garbage
This is intended to resolve GitHub Issue #1650, which I was unable to directly reproduce
on my test system.

This fix assumes that the reported issue was related to cmdstr[BUFSZ] buffer not
getting initialized, thus containing random memory values.
2026-08-06 10:22:24 -04:00
nhmall 15cfe90d62 follow-up: build with Qt6 support on Linux with Qt 6.1
1d3178a quieted the g++ build, but made the warnings even
worse with a clang build.

The addition of the -Wno-sfinae-incomplete caused an unrecognized
option warning using recent clang.

Recent clang build with Qt6.1 also caused several warnings
during the processing of the Qt6.1 header files related to
c++26-extensions.

This adds (under Linux) -Wnoc++-26-extensions to the clang++
command line to quiet those warnings and restricts the
-Wno-sfinae-incomplete command line option to the g++ build.
2026-08-06 10:05:27 -04:00
nhmall a8a13bed81 fixes5-0-1.txt update for previous commit 2026-07-31 15:07:53 -04:00
nhmall 29cb8b7d9a Windows: group accelerator and menu item collision
In the event that there is a collision between a menu group accelerator
and an individual menu item's accelerator, disregard the group
accelerator.

'$' is the only known collision in NetHack 5.0 presently.

Close #805
2026-07-31 14:53:19 -04:00
nhmall 9447bba227 Windows: don't revert -D on command line
Reported by @youbo0 in GitHub issue #1616

This issue text stated:
"To enter wizard mode, I have a shortcut with -D -u wizard as suggested by
the wiki for Windows players. However, the name is now overridden by a name
in .nethackrc since 5.0, resulting in me not actually entering wizard mode
due to having the wrong name despite using -u wizard. In the previous
version, -u wizard was applying properly regardless."

Closes #1616
2026-07-31 08:59:20 -04:00
nhmall 193da97bac fixes5-0-1.txt catch-up 2026-07-31 06:49:39 -04:00
nhmall 05733d28f4 food_disappears is missing a tin check #1648
Reported in GitHub issue #1648 by @janne-hmp
2026-07-31 06:25:58 -04:00
nhmall 404e949e95 one more follow-up 2026-07-30 22:35:47 -04:00
nhmall 1e749c28ce follow-up
adjust the mon_offmap(mon) macro to test any of the bits that
constitute being off the map, while ignoring some of the other bits
that do not.
2026-07-30 22:30:34 -04:00
nhmall 59080106b9 include clearing of MON_ENDGAME_FREE, MON_ENDGAME_MIGR bits in place_monster
Issue reported by @ars3niy

Fix #1647
2026-07-30 21:58:42 -04:00
nhmall ff87463e47 initial hilite_pet and hilite_pile msdos tiles
This is an initial attempt at adding support for hilite_pet and
hilite_pile to the msdos tile implementation, using the new
decal.txt tiles.

This initial attempt only supports a 16-bit vesa mode.

Other vesa modes and vga have not been done as of yet.
Hopefully, someone more familiar with vesa might contribute
improvements and support of the other modes at some point.
2026-07-29 20:48:44 -04:00
nhmall de842ec483 add a set of decals to stock tileset
win/share/decals.txt contains (initially) a decal_delimiter tile,
a decal_pet tile, and a decal_pile tile.
The latter two can be used for hilite_pet and hilite_pile implementations
that don't have something in place already. The implementation would
just need to apply (merge) the non-background decal pixels over a
regular tile.

The special decal_delimiter tile can be used to confirm the presence
of the delimiter tiles in the tileset and mark the end of the regular tiles,
and the start of the decal tiles.
   row 1 contains the background color whose pixels should be
   ignored when applying a decal to a tile.
   row 2 contains a row of pixels colored (0, 0, 0).
   row 3 contains a row of pixels colored pure green (0, 255, 0).
   row 3 contains a row of pixels colored pure blue  (0, 0, 255).
2026-07-29 20:47:50 -04:00
nhmall 1d3178a199 build with Qt6 support on Linux with Qt 6.1 2026-07-27 16:27:20 -04:00
nhmall 812a9f1435 Cross-compiling doc bit 2026-07-24 08:36:39 -04:00
nhmall 86cb47dd6b address a warning in cmd.c
cmd.c: In function ‘dokeylist’:
cmd.c:2961:23: warning: ‘]’ directive writing 1 byte into a region of size between 0 and 255 [-Wformat-overflow=]
 2961 |     Sprintf(buf2, "[%s]", key2txt(key, buf));
      |                       ^
2026-07-23 10:01:55 -04:00
nhmall d6da7e9819 fixes entry for pull request #1632 2026-07-23 09:46:03 -04:00
nhmall d428fb6708 Merge branch 'msdos-config' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-23 09:36:48 -04:00
nhmall 1a4cdff17f update tested versions of Visual Studio 2026-07-23 2026-07-23 09:34:33 -04:00
nhmall c2a3321684 follow-up bit 2026-07-21 12:13:17 -04:00
nhmall eb13f4de6d LUA version checking in nhl_init()
Use LUA_VERSION_NUM, not LUA_VERSION_RELEASE_NUM, for the check.

Move the definitions of the versions supported by this release of
NetHack to the top of nhlua.c, rather than 2300 lines into the file.

Close #1633
2026-07-21 12:07:45 -04:00
nhmall 85e080bb5d windows calls genl_prag() during startup
genl_prag() will process  the prag@ command line options, if present

Close #1634
2026-07-20 16:11:01 -04:00
nhmall f41f1aa09a resolve a cross-compile link error 2026-07-09 16:42:56 -04:00
nhmall 05d1ed365f follow-up fixes5-0-1.txt 2026-07-08 07:38:37 -04:00
nhmall 00ad0e6f76 fixes5-0-1.txt entry for pull request #1620 2026-07-08 07:24:16 -04:00
nhmall ec0f2f0f48 Merge branch 'msdos-vga-colors' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-08 07:22:52 -04:00
nhmall ac151181d2 more u.ustuck issues on save/restore
During a synchronous save operation initiated by the player (or
other trigger for dosave0()), the u.usteed_mid and u.ustuck_mid
values get set by savemonch(), and the monst pointers that
u.ustuck and u.usteed point to are no longer valid, but not
cleared.

The checkpoint operation, which also needs to ensure that
u.ustuck_mid and u.usteed_mid are set, must set them during
the checkpoint, which is okay because the u.usteed and
u.ustuck pointers _are_ valid during a checkpoint operation.

So, we need to distinguish between a save game sequence,
and a checkpoint sequence when writing out the u struct.
2026-07-06 14:16:15 -04:00
nhmall 81ac4deb1e follow-up: fixes5-0-1.txt update 2026-07-06 11:04:13 -04:00
nhmall 98bb86ab33 Windows: fix ascii map hilite_pet
hilite_pet was working with tiles, but not with ascii map.
2026-07-06 11:00:50 -04:00
nhmall bb0016db0a Windows:OPTIONS=windowtype:tty NetHackW.exe issue 2026-07-06 10:59:53 -04:00
nhmall 749646e8d3 follow-up: fix a paste error 2026-07-06 08:17:38 -04:00
nhmall a6308ad5db follow-up: eliminate a fall through warning 2026-07-06 08:03:58 -04:00
nhmall 2f76934ded Merge branch 'preserve-ghost-info' of https://github.com/copperwater/NetHack into NetHack-5.0 2026-07-06 08:01:56 -04:00
nhmall 3d0fe29ff7 Merge branch 'improve-herecmd' of https://github.com/JodiJodington/NetHack into NetHack-5.0 2026-07-06 07:59:37 -04:00
nhmall f5f498eb9e fixes5-0-1.txt entry for pull request #1617 2026-07-06 07:58:16 -04:00
nhmall a4dbd17d15 Merge branch 'msdos-tile-processing' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-06 07:53:06 -04:00
nhmall 4761d45deb Guidebook.txt update - July 4, 2026 2026-07-04 23:43:41 -04:00
nhmall 25be684830 trailing spaces removed from generated nhlua.h 2026-07-04 14:29:54 -04:00
nhmall adbab7f767 periodic style check: whitespace cleanup
leading tabs and trailing blanks
2026-07-04 14:17:43 -04:00
nhmall 2afd03e015 Guidebook update - July 4, 2026 2026-07-04 13:16:31 -04:00
nhmall 228576628c fix spot_monsters give-away
Resolves #1603
2026-07-04 12:53:33 -04:00
nhmall 7c418cff6a follow-up: a compiler warning fix 2026-07-03 09:39:02 -04:00
nhmall ece0c3ce3c fixes5-0-1.txt entries for three pull requests 2026-07-03 08:45:04 -04:00
nhmall d912ab5e6a Merge branch 'start-time' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-03 08:36:12 -04:00
nhmall 454ab83a36 Merge branch 'msdos-font-null-ptr' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-03 08:35:32 -04:00
nhmall 9abb13dfcf Merge branch 'msdos-fonts' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-07-03 08:34:53 -04:00
nhmall edb99dcf8f fixes5-0-1.txt catch-up; also fix some whitespace 2026-07-03 08:30:40 -04:00
nhmall 5e80fd3b93 wand of stasis when off level
Account for the time spent on other levels for
wand of stasis

Resolves #1608
2026-07-02 17:48:29 -04:00
nhmall aaf601ffc8 follow-up bit 2026-06-28 17:49:00 -04:00
nhmall bfa924bb0e replace hardcoded number with correct enum value 2026-06-28 17:46:17 -04:00
nhmall c918878299 follow-up: field name typo 2026-06-27 11:45:36 -04:00
nhmall 90aaeb53cd follow-up: zero out puzzling_criteria 2026-06-27 11:41:54 -04:00
nhmall ac3d71a82a give player an inkling of why corpses didn't stack
When corpses haven't stacked, and there is no player-discernable
reason why, provide some additional information in some cases,
but only when it is required.

Gender variance is the supported case in this commit.

Related to GitHub issue #1607.

This commit doesn't change the underlying mechanics to allow
the corpses to stack, but it does help the player understand
why that's the case in this instance.
2026-06-27 11:18:44 -04:00
nhmall 6fee8a4e78 yet another warning bit
In file included from ../include/hack.h:34,
                 from sp_lev.c:14:
In function ‘create_monster’,
    inlined from ‘lspo_monster’ at sp_lev.c:3386:5:
../include/rm.h:528:32: warning: array subscript -1 is below array bounds of ‘struct monst *[80][21]’ [-Warray-bounds=]
  528 |         if (!svl.level.monsters[x][y])                     \
      |              ~~~~~~~~~~~~~~~~~~^~~
sp_lev.c:2045:25: note: in expansion of macro ‘remove_monster’
 2045 |                         remove_monster(x, y);
      |                         ^~~~~~~~~~~~~~
../include/rm.h: In function ‘lspo_monster’:
../include/rm.h:476:19: note: while referencing ‘monsters’
  476 |     struct monst *monsters[COLNO][ROWNO];
      |                   ^~~~~~~~
In function ‘create_monster’,
    inlined from ‘lspo_monster’ at sp_lev.c:3386:5:
../include/rm.h:530:27: warning: array subscript -1 is below array bounds of ‘struct monst *[80][21]’ [-Warray-bounds=]
  530 |         svl.level.monsters[x][y] = (struct monst *) 0;     \
      |         ~~~~~~~~~~~~~~~~~~^~~
sp_lev.c:2045:25: note: in expansion of macro ‘remove_monster’
 2045 |                         remove_monster(x, y);
      |                         ^~~~~~~~~~~~~~
../include/rm.h: In function ‘lspo_monster’:
../include/rm.h:476:19: note: while referencing ‘monsters’
  476 |     struct monst *monsters[COLNO][ROWNO];
      |                   ^~~~~~~~
2026-06-26 15:21:19 -04:00
nhmall 2b2f949484 address another warning
sounds.c: In function ‘domonnoise’:
sounds.c:818:40: warning: array subscript [0, 1] is outside array bounds of ‘const char * const[2]’ [-Warray-bounds=]
  818 |                     verbl_msg = vampmsg[vampindex];
      |                                 ~~~~~~~^~~~~~~~~~~
sounds.c:786:38: note: while referencing ‘vampmsg’
  786 |             static const char *const vampmsg[] = {
      |                                      ^~~~~~~
2026-06-26 15:11:42 -04:00
nhmall c40bf4658d more warning cleanup
The use of strncat and eos(buf) together was odd anyway.
2026-06-26 14:56:26 -04:00
nhmall e3407a923f address some compiler complaints 2026-06-26 12:30:36 -04:00
nhmall e6b5338441 some windows build updates 2026-06-21 14:18:00 -04:00
nhmall 186d9524de missed a line in this file 2026-06-20 20:02:31 -04:00
nhmall 6808e87869 yet more 3.7 cleanup 2026-06-20 18:55:28 -04:00
nhmall 6399e0070b dat/*.lua 3.7 vestiges 2026-06-20 18:35:38 -04:00
nhmall 198ac655e5 more 3.7 vestiges
A little later than this probably should have been committed.
2026-06-20 18:26:43 -04:00
nhmall f5f87c7ee9 missed version bit 2026-06-20 11:18:14 -04:00
nhmall 43ae611d64 fixes5-0-1.txt entries following pull request 2026-06-19 10:20:50 -04:00
nhmall 33e2f54e7c Merge branch 'correct-regions-with-ball-travel' of https://github.com/copperwater/NetHack into NetHack-5.0 2026-06-19 10:17:40 -04:00
nhmall 04963ecf81 follow-up: add a general catch for "says" 2026-06-19 10:08:42 -04:00
nhmall 8705d12046 Merge branch 'shopkeeper-voice-respects-deaf' of https://github.com/copperwater/NetHack into NetHack-5.0 2026-06-19 10:07:11 -04:00
nhmall 118899a5f0 update tested versions of Visual Studio 2026-06-18 2026-06-18 09:48:34 -04:00
nhmall 6d0757fc86 Fix MS-DOS crosscompile on macOS host 2026-06-16 19:56:30 -04:00
nhmall d13eceb28b eliminate one more source of vault guard newsym msgs
see_monsters() was producing spurious vault guard at 0,0
messages

Reproduce issue by:
    1. Entering vault via teleport.
    2. Wait for guard to enter.
    3. Drop gold (if necessary) and follow guard.
    4. Right after the guard disappears, but before
       the corridor does, the following can lead to
       the messages:
       a) control-R to refresh the display.
          or
       b) save the game and restore.

       In both cases, see_monsters() will get called and lead
       to the spurious messages for the vault guard that is
       parked.

Also, add a macro PARKEDMONSTER(mon) instead of checking the
the isgd bit and the value of mon->mx being zero in multiple
places

Also, adds MON_PARKED bit to mstate.
Currently the PARKEDMONSTER(mon) macro mentioned above,
does not use the new bit.
2026-06-14 14:31:18 -04:00
nhmall 8e9d23b578 msdos warning bit
../sys/msdos/font.c: In function 'load_font':
../sys/msdos/font.c:89:22: warning: unused variable 'j' [-Wunused-variable]
   89 |             unsigned j;
      |                      ^
2026-06-12 11:00:28 -04:00
nhmall b0e24236e3 update tested versions of Visual Studio 2026-06-12 2026-06-12 06:07:27 -04:00
nhmall 6c11cac0f7 fixes5-0-1.txt entry for pull request #1581 2026-06-11 14:09:25 -04:00
nhmall 958415607b periodic style check: whitespace cleanup
leading tabs and trailing blanks
2026-06-10 15:52:13 -04:00
nhmall 178b295701 Merge branch 'fix/overflow-checks' of https://github.com/0x0b1ade/NetHack into NetHack-5.0 2026-06-09 22:54:20 -04:00
nhmall e5a3ec9219 follow-up: whitespace bit 2026-06-09 22:50:33 -04:00
nhmall 9d44b1dbce follow-up: fixes5-0-1.txt 2026-06-09 22:49:36 -04:00
nhmall e34238d2bc MS-DOS: several fixes for the tiled map 2026-06-09 16:48:02 -04:00
nhmall 1faa85010d Merge branch 'msdos-map-fixes' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-06-09 16:36:21 -04:00
nhmall 57111e3c1f update pdcursesmod submodule 2026-06-09 09:40:15 -04:00
nhmall 917cc1a596 add pair of generated files to .gitignore 2026-06-08 13:47:55 -04:00
nhmall 7e18df3c5f ensure sane values for monst fields from bones 2026-06-08 00:06:59 -04:00
nhmall c0f06ac4fd follow-up to 84a6eb5e
Ensure MON_STILL_ARRIVING bit is cleared before an early return.
2026-06-07 23:54:43 -04:00
nhmall 28cc7cb6bf Merge branch 'msdos-colors' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-06-07 17:29:42 -04:00
nhmall cbfd3aa944 placement for the added save_currentstate() call wasn't right
in gulpmu() that particular placement would result in u.uswallow = 0,
and u.ustuck set.

A better optimal location needs to be sought.
2026-06-07 01:52:54 -04:00
nhmall 51486d0c02 fix recover failure after unexpected exit
u.ustuck and u.usteed are handled differently in 5.0.0 than
in previous releases, and an unexpected halt to NetHack could
result in an inability to use recover to get the game back.

If the hero was engulfed, u.uswallow, could get saved to the
checkpoint file with a value of 1 without a corresponding
u.ustuck_mid value representing the m_id of the engulfing monster.

Recover had no information to use to restore the u.ustuck pointer
when loading the monsters on the level.

With u.uswallow set to 1, the game would proceed to enter if-blocks
based on that, and then crash/fault when it attempted to dereference
u.ustuck, during the recover attempt.

This updates the values of u.ustuck_mid immediately before saving
struct you during a checkpoint, so that the resulting file had
u.uswallow and u.ustuck_mid values that were in concert.

It does the same for u.usteed and u.usteed_mid.

This also now adds a save_currentstate() checkpoint call when
the swallowed/unswallowed status changes, that is whenever set_ustuck()
is called.
2026-06-07 01:31:19 -04:00
nhmall 1f4198c705 aklys message improvements 2026-06-06 15:01:54 -04:00
nhmall 498db90437 follow-up: fixes5-0-1.txt entry 2026-06-06 12:29:39 -04:00
nhmall 7f787a372a Merge branch 'pl_character-overflow' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-06-06 12:27:03 -04:00
nhmall ed1b4af5cd fix build on Windows arm64 2026-06-06 10:36:47 -04:00
nhmall 393f42cd6f follow-up: grammar and format string 2026-06-05 20:17:48 -04:00
nhmall 2950bd85cb Revert "don't attempt with a blank host name in fetch-lua"
This reverts commit 9566605ba2.
2026-06-04 21:17:41 -04:00
nhmall f2fc324bef Revert "follow-up"
This reverts commit 0ea0de5301.
2026-06-04 21:17:15 -04:00
nhmall d1f9c17418 Revert "yet another follow-up for Makefile.top fetch-Lua"
This reverts commit 784692fd40.
2026-06-04 21:16:44 -04:00
nhmall c20f5acbb5 Revert "one more follow-up"
This reverts commit 1c649facea.
2026-06-04 21:16:17 -04:00
nhmall 1c649facea one more follow-up 2026-06-04 20:32:50 -04:00
nhmall 784692fd40 yet another follow-up for Makefile.top fetch-Lua 2026-06-04 20:22:50 -04:00
nhmall 0ea0de5301 follow-up 2026-06-04 20:14:29 -04:00