Commit Graph
19222 Commits
Author SHA1 Message Date
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
0xb1aded c99b485c78 fix: init color256 value to prevent color flickering 2026-08-21 19:54:05 +08: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
Ray Chason 9e57c85b16 Condition should be USE_XFT, not USE_XPM 2026-08-19 09:37:40 +03:00
Ray Chason 737b3ac89a Implement italic fonts 2026-08-19 09:37:40 +03:00
Ray Chason 9d1aac189e Convert TTY status to Xft 2026-08-19 09:37:40 +03:00
Ray Chason e53b76b0e5 Convert message window to use Xft 2026-08-19 09:37:40 +03:00
Ray Chason fbc586bf44 Convert map to use Xft 2026-08-19 09:37:40 +03:00
Pasi Kallinen d44b6385d7 Don't complain about MAXPLAYERS with unknown command line param
Unix command line handling treated an unknown command line parameter
as a maximum number of allowed concurrent players.  This emitted
a complaint about expected MAXPLAYERS, and as it can be now set
in sysconf, remove this - most likely unused - functionality.
2026-08-18 19:44:48 +03:00
nhmall f6a592b7f9 glob nutrition should match owt reduction
reported directly to devteam as an impossible() call
within eaten_stat()

(internal tracking number 3216)
2026-08-18 10:24:35 -04:00
nhmall 4474d3cb2a pcmain.c: remove added second early_init() call
early_init() was already being called at pcmain.c line 70,
so the recently added call at line 132 was problematic
because it cleared program_state values that had been
intentionally set since the call at line 70.
2026-08-18 07:54:46 -04:00
Pasi Kallinen 9de03944e8 fixes update 2026-08-18 13:42:24 +03:00
Ray Chason 23315cf857 Combine XLoadFont and XQueryFont calls
The separate calls crash if the font does not exist; the combined call
returns NULL, as the caller expects.

Resolves #1508 and possibly #569.
2026-08-18 13:40:35 +03:00
nhmall ef5beb917a fixes5-0-1.txt catch-up 2026-08-17 21:25:34 -04:00
k21971 7c13477d33 Fix: don't leak in_checkpoint on a failed level write.
save_currentstate() increments program_state.in_checkpoint and then
returns early without decrementing it when currentlevel_rewrite()
fails (full disk, quota, unwritable directory). The guard at the top
of the function suppresses every later checkpoint for the rest of the
game, leaving recover with nothing newer than the last checkpoint that
did get written, and nothing says so.
2026-08-18 00:30:41 +00:00
k21971 370c282240 Fix: first INSURANCE checkpoint is never written.
savestateinlock() returns early unless
program_state.something_worth_saving is set, but both call sites that
are meant to lay down the initial checkpoint run before that flag is
set: newgame() calls save_currentstate() two lines early, and
dorecover() calls savestateinlock() 73 lines before it, ahead of the
pass that writes out the level files.

Both calls are therefore no-ops, and the <uid><plname>.0 lock file
holds nothing but the pid written by getlock() until the hero first
changes dungeon level. A game that dies without a chance to save
during that window (SIGKILL, OOM killer, watchdog, host reboot)
cannot be rebuilt: recover has no save file name, no current level
number and no game state, and reports "Checkpointing was not in
effect", which is true of the outcome but misleading about the cause.
The window covers the whole of a long stay on one level, and in
particular the entire period right after a restore.

Set the flag before the call in newgame(). In dorecover(), drop the
ineffective call and checkpoint once the restore is complete instead;
at the original spot no level file for this session has been written
yet, so a checkpoint there would name a current level and save file
that are not on disk. The new call goes after program_state.restoring
is cleared, so that stairs and traps are written with the same
relative dlevel encoding a normal save uses, and it is
save_currentstate() rather than savestateinlock() so that
in_checkpoint is set while savegamestate() writes u.ustuck_mid and
u.usteed_mid.

This arrived with the something_worth_saving guard; 3.4.3, which has
no guard, is unaffected. Looks like this issue has been around since
version 3.6.0.
2026-08-18 00:30:23 +00:00
nhmall d8ea2087bc fixes5-0-1.txt update for prior commit 2026-08-16 10:35:31 -04:00
nhmall f11b65c680 don't call it "your pet" until after it is tamed
Reported directly to devteam, the code was using "Your little dog
devours the tripe ration" during the taming process, prior to the
pet becoming yours.
2026-08-16 10:31:31 -04:00
nhw_cron 845603e2d8 This is cron-daily v1-May-7-2026. 000files updated: Files 2026-08-16 07:47:27 -04:00
nhmall 9cf2b1bac9 early arg support for older platforms
The startup had fallen behind NetHack 5.0 startup for other platforms,
and lacked support for some of the early command line options.

Following this, if PC_EARLY_OPTIONS is defined in pcconf.h, the
port will support those options, such as --version, --showpaths,
--dumpenums, etc.)

Currently, MSDOS #defines's PC_EARLY_OPTIONS, but AMIGA, ATARI,
and MAC68K do not.
2026-08-16 07:09:22 -04:00
Pasi Kallinen 0a6c355678 fixes update 2026-08-14 11:08:26 +03:00
Pasi Kallinen 4652cd3ae7 Remove extra array indices 2026-08-14 11:08:26 +03:00
Ray Chason 0454838d13 Arrange labels more compactly 2026-08-14 11:08:26 +03:00
Ray Chason ddbea3b727 Implement remaining status labels 2026-08-14 11:08:26 +03:00
Ray Chason fbfac21aac Fix menu group accelerators
If there are, say, two or more potions in the menu, and multiple
selections are allowed, then '!' should select all potions. Such keys
were selecting only the first matching item.
2026-08-14 11:08:26 +03:00
Ray Chason 2d261f1398 Implement all text attributes for menus 2026-08-14 11:08:26 +03:00
Ray Chason 84ff4f8b7e Fix a null dereference when freeing fonts 2026-08-14 11:08:26 +03:00