Commit Graph
19246 Commits
Author SHA1 Message Date
Ray Chason 393130a629 Handle tabs in the message window 2026-08-30 17:51:10 -04:00
Ray Chason 98815bc739 Tabify the #wizcustom menu 2026-08-30 16:44:44 -04:00
Ray Chason c88403f4ec Correct display of tabified PICK_NONE menu 2026-08-30 16:44:26 -04:00
Ray Chason 564affea88 Remove limit in size of widget_table
It is difficult, but possible, to exceed 1024 widgets. One way is to
set a very large Unicode symbol set, and then use #wizcustom. As there
is no limit to how many objects can occupy a square, this limit is a
possible hazard even to a normal game.
2026-08-30 15:52:15 -04:00
nhmall 1b752f0e11 follow-up 2026-08-30 10:29:53 -04:00
nhmall 9c8b8249eb Linux build doc and a comment update 2026-08-30 09:59:10 -04:00
nhmall 845be15439 follow-up: stale comment removed altogether
The external reference was moved out of files.c elsewhere,
so the comment was no longer accurate.
2026-08-28 11:19:00 -04:00
nhmall 988eaa44b4 relocate declaration of sounddir
It shouldn't have been located inside an #ifdef USER_SOUNDS block.
2026-08-28 10:46:50 -04:00
nhmall ebe14f87d9 corpse age comment cleanup 2026-08-26 10:22:46 -04:00
nhmall 15a017c030 fix undead corpses being edible now
In 3.6.x, zombie corpses were always aged an extra 100:

NetHack/src/mon.c

Line 375 in 23d331a

 obj->age -= 100; /* this is an *OLD* corpse */
in 5.0.x, zombie corpses are always aged TAINT_AGE, which is only 50:

NetHack/src/mon.c

Line 648 in 97a6c13

 obj->age -= (TAINT_AGE + 1); /* this is an *OLD* corpse */

This is the result of commit 408321b.
The accompanying comment states that the purpose of that patch was meant to
just replace hard-coded numbers with symbolic values, but the commit set
two differing numeric values to the same symbol name, thus causing the
regression reported in:

https://github.com/NetHack/NetHack/issues/1664

Revert the values to match those of 3.6, and add the additional symbolic value.

Closes #1664
2026-08-24 21:56:18 -04:00
nhmall 97a6c131a9 Merge branch 'menu-columns' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-08-24 07:28:33 -04:00
nhmall b67553ccc7 follow-up 2026-08-23 19:33:39 -04:00
nhmall 9b4a8dfb05 mon interaction with terrain was postponed
Fix #576

Reported initially by @copperwater for polymorphed monsters:
"observe how the [polymorphed-monster] hovers placidly above the water for
several turns like Wile E. Coyote before it gets a move, realizes it's
above water, and drowns. Ditto for lava."

A comment in the GitHub issue thread by @Tomsod pointed out that a
revived corpse could do the same.

This should set things up for other terrain fallout if discovered or
implemented in the future.
   - consume an additional bit in enum mon_terrain_effects (hack.h)
   - include the additional bit in TERRAIN_FALLOUT_MASK (monst.h)
   - add detection to maybe_set_terrain_effects (mon.c)
   - add action to terrain_effects (mon.c)

Implemented by stealing some upper unused mstate bits to avoid
invalidating existing save and bones.
2026-08-23 18:51:13 -04:00
Ray Chason b61aef834e Set menu font to proportional 2026-08-22 20:46:13 -04:00
Ray Chason 7840d75365 X11: set menu font to proportional
Menus that needed to be tabified now are.
2026-08-22 20:43:46 -04:00
Pasi Kallinen f913cb3704 X11: support tab-separated menu columns 2026-08-22 10:59:12 +03:00
Ray Chason db32a639a7 Extend last column to end of line
If a line in the menu has fewer columns than the others, the last one
is deemed to extend to the right margin, and does not count toward the
maximum width of that column.

Also, revert the change to NetHack.font_menu.
2026-08-22 10:57:25 +03:00
Ray Chason cadde6d317 Use text window for display_file
The text window is assumed to use a monospaced font.
2026-08-22 10:57:25 +03:00
Ray Chason 84bf23640c Line up selectable items 2026-08-22 10:57:24 +03:00
Ray Chason ffb08d3be6 Don't set columns for rows without tabs 2026-08-22 10:57:24 +03:00
Ray Chason bc14bd7f30 Adjust extra menu width 2026-08-22 10:57:24 +03:00
Ray Chason ae8b4bf12a Add support for tabbed menu columns 2026-08-22 10:57:24 +03:00
nhmall 44b04064be static analyzer: use of uninitialized value 'origarg'
../sys/unix/unixmain.c: In function ‘process_options’:
  ../sys/unix/unixmain.c:458:9: warning: use of uninitialized value ‘origarg’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
    458 |         config_error_add("Unknown option: %.60s", origarg);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2026-08-21 09:36:17 -04:00
Ray Chason 94834df5d1 Revise the column width calculation
The last column in a line continues to the end of the line, and may
overhang any subsequent columns in other lines.
2026-08-21 08:19:04 -04:00
0xb1aded c99b485c78 fix: init color256 value to prevent color flickering 2026-08-21 19:54:05 +08:00
Ray Chason b08c4f92b2 Tabify more menus
* Status hilites
* Disclose option
* Symbol set selection
2026-08-20 08:14:13 -04:00
Ray Chason b52ea09e25 Tabify the extended command list 2026-08-20 07:28:01 -04:00
Ray Chason c5181b9cb8 Improve support for tabbed columns
* Set the menu font to proportional
* Do not consider the last column of a line when calculating maximum
  column widths
* Use U+200A HAIR SPACE for finer column padding
* Track errors in column padding and adjust subsequent columns so that
  these errors do not accumulate across a row
2026-08-20 07:25:36 -04:00
nhmall 540c0549d8 follow-up: MSYS2 build fix 2026-08-19 08:00:15 -04:00
nhmall 6950543bb9 build fix under MSYS2
../src/pline.c: In function 'execplinehandler':
../src/pline.c:678:15: error: implicit declaration of function '_spawnv' [-Wimplicit-function-declaration]
  678 |         ret = _spawnv(_P_NOWAIT, sysopt.msghandler, args);
      |               ^~~~~~~
../src/pline.c:678:23: error: '_P_NOWAIT' undeclared (first use in this function); did you mean 'MM_NOWAIT'?
  678 |         ret = _spawnv(_P_NOWAIT, sysopt.msghandler, args);
      |                       ^~~~~~~~~
      |                       MM_NOWAIT
../src/pline.c:678:23: note: each undeclared identifier is reported only once for each function it appears in
make: *** [GNUmakefile:1376: o/nethack/pline.o] Error 1
2026-08-19 07:36:21 -04:00
nhmall 4c4867d586 map_mode may appear more than once without a gripe 2026-08-19 07:16:57 -04:00
nhmall a2e805aee2 CI: fontconfig 2026-08-19 06:43:27 -04:00
nhmall dd94830c10 CI: add libxft-dev 2026-08-19 06:39:36 -04:00
nhmall f61709ab36 update CI Linux versions 2026-08-19 06:07:11 -04:00
Pasi Kallinen 94336e6b63 fixes update 2026-08-19 09:47:11 +03:00
Ray Chason 6dc9ac1c31 Adjust font hights so underscores are not cut off 2026-08-19 09:37:41 +03:00
Ray Chason b8dc070d07 Fix right side of border rectangle 2026-08-19 09:37:41 +03:00
Ray Chason 392142d322 For menu items, set up pixmap and then manage
The widget is created with a label but not a pixmap, and then a pixmap
is set up for display. If the label is already realized and managed, it
will not resize when the pixmap is set up. This causes problems when
the inventory window is updated: unlike other menus, the parent Form
widget is already realized. The fix is to create the item widget in an
unmanaged state (XtCreateWidget), set up the pixmap (X11_wrap_widget
and X11_set_attrs), and then manage it (XtManageChild).
2026-08-19 09:37:41 +03:00
Ray Chason 9179d5d960 Adjustments for MacOS compile
per comments by Michael Allison
2026-08-19 09:37:41 +03:00
Ray Chason e3170cdedc Provide more space between TTY-style status fields 2026-08-19 09:37:41 +03:00
Ray Chason 3f8e704231 More ifdefs; use Xft font to split messages 2026-08-19 09:37:41 +03:00
Ray Chason cada45a786 Apply appropriate #ifdefs and static declarations 2026-08-19 09:37:41 +03:00
Ray Chason 5883fe4abb Declutter the rendering code a bit 2026-08-19 09:37:41 +03:00
Ray Chason 7e39b3faf1 Note Xft support in option window 2026-08-19 09:37:41 +03:00
Ray Chason faba01dd25 Dismiss the text window on key press 2026-08-19 09:37:41 +03:00
Ray Chason 6e80039c49 Convert the tombstone window to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 31f5ca334d Convert the text window to Xft 2026-08-19 09:37:41 +03:00
Ray Chason cfe67ecc62 Convert dialogs to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 8ae58f9347 Convert the one line message prompt to Xft 2026-08-19 09:37:41 +03:00
Ray Chason 7c9cf20d1d Convert fancy status and menus to Xft 2026-08-19 09:37:41 +03:00