Commit Graph
19156 Commits
Author SHA1 Message Date
Ray Chason b763944fb4 Implement three line status 2026-08-10 09:28:04 +03:00
Ray Chason 7521e7120a Implement blink 2026-08-10 09:28:04 +03:00
Ray Chason 8137f6cf3d Remove some debug code 2026-08-10 09:28:03 +03:00
Ray Chason 0f39437315 Implement underline and italic 2026-08-10 09:28:03 +03:00
Ray Chason a7eb50fb36 Query font for status window height 2026-08-10 09:28:03 +03:00
Ray Chason 647fd71a2d Implement bold and dim attributes 2026-08-10 09:28:03 +03:00
Ray Chason 5dd1673678 Implement colors 2026-08-10 09:28:03 +03:00
Ray Chason 725bb3d05f Display gold symbol as Unicode if so configured
Some Unicode bits from winmap.c are moved to winX.c, so that winstat.c
can also use them.
2026-08-10 09:28:03 +03:00
Ray Chason c2b4ee53e5 Begin reimplemented TTY-style status 2026-08-10 09:28:03 +03: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
Ray Chason e0ecf0e5f2 Fix highlighting in 16 color text map
vga_redrawmap did not have the inverse flag available. Provide it.
2026-08-04 16:05:27 -04:00
Ray Chason 3e800b90d3 Support pet and tile decals in 16 color mode 2026-08-04 15:55:36 -04:00
Ray Chason 9d5184562e More decal support for VESA
* Support decals in overview mode
* Draw decals when redrawing the map
2026-08-04 09:38:38 -04:00
Ray Chason 85bb8c1fbc Simplify the 24-bit case 2026-08-03 22:20:18 -04:00
Ray Chason 0c044e9c90 Add hilite flags 2026-08-03 22:12:32 -04:00
Ray Chason bd68058327 Extend decal support to all VESA modes 2026-08-03 22:12:14 -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
nhw_cron 5f1183d1ef This is cron-daily v1-May-7-2026. 000files updated: Files 2026-07-30 08:15:08 -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
PatR a3a587dcf3 fix #K4498 - stethoscope vs double trouble Wizard
When the Wizard is diguised as some other monster, applying a stethscope
described him as "that <foo> is really a <foo>".
2026-07-25 13:33:39 -07: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
Ingo Paschke 3b05012624 sfstruct: buffered stdio writes on amiga and atari st
Enable USE_BUFFERING for the structlevel savefile write path on AMIGA
and TOS via a new SFSTRUCT_BUFFERING config define, with a 16 KB
setvbuf on the fdopen'd write stream so many small bwrite()s coalesce
into few dos.library Write() packets.  Leaves mread() unbuffered.

Mainline UNIX/WIN32 are unchanged (setvbuf is gated on the new define);
MAC68K is not enabled, avoiding fdopen()/fclose() on its remapped
non-libc file handles.
2026-07-23 09:01:57 -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
Francium-223 1821a6b2e3 a typo fix in data.base
Close #1618
2026-07-11 15:40:30 -04:00
Ray Chason e00b32263e Support the Curses-only configuration 2026-07-10 09:08:55 -04:00
Ray Chason 7889eedfa5 MS-DOS: Support no-tiles and no-graphics builds
In previous versions of NetHack, setting -DUSE_TILES enabled the tile
support, while setting -DSUPPRESS_GRAPHICS produced a NetHack that
would write its TTY output to standard output, and rely on ANSI.SYS or
similar to do screen control. (USE_TILES is now TILES_IN_GLYPHMAP.)

This change ensures that the current NetHack can be built the same
ways.

One twist is that previous NetHacks would drop all support for graphical
modes when tiles were not supported. Thus sys/msdos/vid{vga,vesa}.c have
very disordered use of TILES_IN_GLYPHMAP. There was no need to check
this. But now, the graphical modes also support Unicode. A non-tiled
build should have the graphical modes, with only the text functions
present, provided that ENHANCED_SYMBOLS is defined.

Some unused and locally used symbols were cleaned up along the way.
2026-07-09 23:48:14 -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
Ray Chason f3f39311e5 MS-DOS: Define a separate palette for VGA text
In 16 color mode, text colors are mapped onto the colors available in
the tileset. The mapping is a compromise, and is not one-to-one: cyan
and bright cyan are the same, and magenta and bright magenta are the
same.

This change defines a separate palette for use by the text map, and
switches palettes on any transition between text and tiled maps.
2026-07-07 16:24:35 -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