Commit Graph
19240 Commits
Author SHA1 Message Date
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
Ray Chason 3398d250aa Implement blink on fancy status
and fix a bug with condition labels on the TTY status
2026-08-14 11:08:26 +03:00
Ray Chason 24d9c19378 Parenthesize the HL_ATTCLR_* symbols 2026-08-14 11:08:26 +03:00
Ray Chason 514669823b Implement bold, dim, italic, inverse, underline
Didn't get everything the last time.
2026-08-14 11:08:26 +03:00
Ray Chason 8d7d609a56 Implement attributes: bold, dim, italic, inverse
Track highlighting of recent changes separately from inverse, and
display highlight plus inverse as bordered text
2026-08-14 11:08:25 +03:00
Ray Chason 0ee7eef3ef Implement a hit point bar 2026-08-14 11:08:25 +03:00
Ray Chason 6043d189e1 Define wrapper for Label widgets
Renders to a Pixmap and then sets the Pixmap. This in itself does not
change the appearance, but provides a means to do percentage bars,
italics and more.
2026-08-14 11:08:25 +03:00
Ray Chason f7bb4eaae8 Fix timeout of fancy status colors
This was trying to retrieve the foreground color of the form created
in create_value(). Forms don't have colors, and so this was failing,
and update_color() didn't update the color.
2026-08-14 11:08:25 +03:00
Pasi Kallinen b56189cfcd X11: toggle off perm_invent if the window is closed manually 2026-08-13 11:16:45 +03:00
Pasi Kallinen a64c7c64e5 X11: Allow scrolling menus with PageUp/PageDown/Home/End
Change the menu_key() translation table command so it accepts
a parameter, and we can pass a (default) menu control key to it.
2026-08-12 12:37:37 +03:00
nhmall feaa9ed334 update tested versions of Visual Studio 2026-08-11 2026-08-11 14:15:24 -04:00
Pasi Kallinen f019d03a2f X11: fix menu windows being taller than the screen
Menu windows with lots of entries (such as #optionsfull) were taller
than the screen, making them awkward to use.

The widget needs to be realized before we can get the size.
Also, we need to set the size of the parent popup, not the
acting widget.
2026-08-11 11:46:24 +03:00
Pasi Kallinen e9a9f63b4f fixes-5-0-1.txt update 2026-08-10 09:36:40 +03:00
Ray Chason c50f9d8176 Draw the hitpoint bar in the hitpoint colors 2026-08-10 09:28:04 +03:00
Ray Chason b9bf823100 Implement a hit point bar 2026-08-10 09:28:04 +03:00
Ray Chason ac169e7100 Clean up, and block out with STATUS_HILITES 2026-08-10 09:28:04 +03:00
Ray Chason ba2c99f28c Remove old code 2026-08-10 09:28:04 +03:00
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