Commit Graph
100 Commits
Author SHA1 Message Date
nhmall ea4ffba1ce another visual studio follow-up 2025-09-26 09:13:38 -04:00
nhmall 976aca6530 follow-up bit for visual studio 2025-09-26 08:59:49 -04:00
nhmall 32873218cd update tested versions of Visual Studio 2025-09-26 2025-09-26 08:57:31 -04:00
nhmall 9b7b2421ac update tested versions of Visual Studio 2025-09-17 2025-09-17 12:39:32 -04:00
nhmall 349fbe93b1 less verbose compiler command lines during build
If using hints file sys/unix/hints/linux.370 or sys/unix/hints/macOS.370
allow the majority of the boilerplate compile switches to reside in a
compiler response file, instead of on the command line.

Include one of the following on your make command line:

make response=1
  or
make resp=1

It can be combined with other make command line options. See
sys/unix/README-hints for further information about those.

The response files that it uses are:
    CC   (clang or gcc)    src/nethack_cc.rsp
    CXx  (clang++ or g++)  src/nethack_cxx.rsp

Note: I think the reduced clutter should actually become the default,
and the override should be noresponse=1 to NOT use it, but I'm
not sure how others feel, so for now, it requires
    make resp=1
Feedback on whether that should become the default or not
is welcome.

Tested on Linux with gcc-15 and on Linux with clang-20.

I haven't had a chance to test it on macOS yet.
2025-09-07 12:50:54 -04:00
nhmall d5d40b322c fix broken Windows GUI ascii mode text color
Issue identified in
https://github.com/NetHack/NetHack/issues/1359

Resolves #1359
2025-09-05 16:38:56 -04:00
nhmall e8e1868b70 part3 of 3 for GitHub issue #1441
> Perhaps related: when a wand of sleep hits a disguised already-sleeping
> mimic (about which it is a separate question if they should go into
> disguise when sleeping, is it supposed to be automagic or conscious
> effort for them? but I digress), the mimic is not revealed (should it?)
> but the message says "hits a mimic".

Adjust restrap() so that a revealed mimic won't disguise itself while
sleeping. This seems to be in keeping with mimic lore.

Also, normal shop sounds (chime of register etc.) will wake a
mimic up from indeterminate sleep.

Closes #1441
2025-09-05 12:37:40 -04:00
nhmall 602678aa5a follow-up: function name 2025-09-05 09:26:00 -04:00
nhmall d3db5ce4f1 yet_another: !mimic_disguised_as_mon(mtmp)
would be true for a non-mimic

(mimic_disguised_as_non_mon(mtmp) would also have
worked okay)
2025-09-04 23:01:29 -04:00
nhmall 774129df11 another #1441 follow-up bit 2025-09-04 22:52:36 -04:00
nhmall 88eb33f198 more #1441
Address the second part of the GitHub issue:
"Finally, when a wand of striking (or a shift+F melee attack for that
matter, but the latter gives no tactical advantage compared to just
bumping them) misses a disguised mimic, it is revealed. I don't know
what to make of it"
2025-09-04 22:38:49 -04:00
nhmall fe357a6f04 avoid telling hero they missed a monster they aren't aware of
Resolves #1441
2025-09-04 22:13:07 -04:00
nhmall e880b08be3 offmap initial setting 2025-09-01 10:49:17 -04:00
nhmall 6fade4b184 don't split pudding that got jousted into a hole 2025-09-01 10:34:38 -04:00
nhmall 475134cfa5 comment update 2025-09-01 09:53:20 -04:00
nhmall 137c028200 bug diagnostic comment 2025-09-01 09:47:03 -04:00
nhmall 7e44aad627 address a static analyzer complaint
mthrowu.c: In function ‘hit_bars’:
  mthrowu.c:1419:25: warning: ‘maybe_unused’ attribute ignored [-Wattributes]
  1419 |            static enum sound_effect_entries se[] SOUNDLIBONLY = {
  mthrowu.c:1419:46: warning: unused variable ‘se’ [-Wunused-variable]
  1419 |            static enum sound_effect_entries se[] SOUNDLIBONLY = {
2025-08-31 10:30:23 -04:00
nhmall 506e9cdd8f follow-up build bit for OpenVMS 2025-08-28 12:13:12 -04:00
nhmall b576ead25a follow-up after changing normalize_pointers_ to norm_ptrs_ 2025-08-28 11:53:50 -04:00
nhmall f110db02fc updates for build on OpenVMS 2025-08-28 11:43:47 -04:00
nhmall ab26a2e851 strip some outdated info from sys/windows/porthelp 2025-08-19 20:37:43 -04:00
nhmall 16c723f0be update tested versions of Visual Studio 2025-08-19 2025-08-19 13:21:56 -04:00
nhmall 6c3e70ad77 remove stray tabs from *.c files and config.h 2025-08-19 08:35:39 -04:00
nhmall 070730d845 Qt6 wasn't exiting as expected after saving the game
Reported by email to devteam on Feb 1, 2025.
2025-08-17 01:33:24 -04:00
nhmall 16716c2d3a update tested versions of Visual Studio 2025-08-16 2025-08-16 12:38:58 -04:00
nhmall b876381b72 add support for [[maybe_unused]] if available 2025-08-07 21:47:40 -04:00
nhmall 93803de413 work around an X11 build issue under C23 2025-08-07 21:41:25 -04:00
nhmall dc48ff9f1e remove UNUSED from prototype in util/sfexpasc.c 2025-08-07 20:05:38 -04:00
nhmall 70510f1dbc update visual studio sys/windows/vs/cpp.hint 2025-08-06 21:27:54 -04:00
nhmall 5fe7c4d12e update tested versions of Visual Studio 2025-08-06 2025-08-06 21:27:25 -04:00
nhmall 80e11c287d more follow-up (for visual studio) 2025-08-06 13:55:41 -04:00
nhmall 75a2a61653 some Makefile follow-up 2025-08-06 13:51:22 -04:00
nhmall a0275e2696 consolidate some duplication into sfmacros.h
:  #include "sfmacros.h"
:  from sfstruct.c and sfbase.c
2025-08-06 12:56:07 -04:00
nhmall 6607b48dd1 sfctool build bit 2025-08-06 12:52:55 -04:00
nhmall f145cc02f4 photograph experience gains often counted only prior to first move
More details in https://github.com/NetHack/NetHack/issues/1430

track photographed monsters using a distinct bit

also adds a pair of new context fields to track the total number of monsters seen up close,
and the total number of monsters photographed.

So, if somebody wants to add unique end-of-game disclosure statements for tourists that relate to
those, the groundwork should be there.

NOTE: This increments EDITLEVEL, so existing save and bones files will become outdated.

Fixes #1430
2025-07-26 11:03:20 -04:00
nhmall 36dcb92288 MSYS2 package fix: include lua-5.4.6.dll in zip 2025-07-19 18:22:35 -04:00
nhmall f58b7a8269 update tested versions of Visual Studio 2025-07-16 2025-07-16 21:04:04 -04:00
nhmall dcef128290 control-v on curses using pdcursesmod 2025-07-13 23:46:50 -04:00
nhmall 0db013c08e adjust levitation wand engraving wording slightly 2025-07-13 21:37:35 -04:00
nhmall 6c22e7af45 attempt to ensure the correct curses.h is used on Linux
OpenSUSE Tumbleweed ncurses 6.5 requires the one in
/usr/include/ncursesw/curses.h, if ncursesw is being used.

Otherwise, several needed function prototypes are not there.

Fixes #1427
2025-07-10 22:44:56 -04:00
nhmall b4f2ef853a add more fallback values to allow basic build to proceed 2025-07-07 12:43:27 -04:00
nhmall 69cf9ad689 aim for successful build even without using hints file 2025-07-07 10:32:47 -04:00
nhmall ce8c4c3ca2 fix reported missing closing '%' in fetch.cmd
Reported directly to devteam by email in K4336 (thank you).
2025-07-07 10:07:02 -04:00
nhmall da132e3bb0 Revert "remove extraneous script file (Windows)"
This reverts commit 33652b8288.
2025-07-07 10:00:25 -04:00
nhmall fed5be6943 another follow-up bit for X11 2025-06-30 09:21:17 -04:00
nhmall 1ece615eb2 fixes3-7-0.txt catch-up; also replace some magic hex numbers 2025-06-30 09:04:41 -04:00
nhmall a93397e286 follow-up bit
This may not be required, but it won't hurt.
2025-06-29 20:43:28 -04:00
nhmall 459a339a95 X11: strip extra bits off color when used as index 2025-06-29 13:31:02 -04:00
nhmall 34b42d2354 recent qt6 requires c++20
There are warnings within the qt6 header files if c++20 is not used, for example:

usr/include/x86_64-linux-gnu/qt6/QtCore/qfuturesynchronizer.h:21:5: warning: use of the 'nodiscard' attribute is a C++20 extension [-Wc++20-attribute-extensions]
   21 |     Q_NODISCARD_CTOR_X("Use future.waitForFinished() instead.")
      |     ^
/usr/include/x86_64-linux-gnu/qt6/QtCore/qcompilerdetection.h:972:43: note: expanded from macro 'Q_NODISCARD_CTOR_X'
  972 | #    define Q_NODISCARD_CTOR_X(message) [[nodiscard(message)]]
      |                                           ^
1 warning generated.

qmake6 --version
QMake version 3.1
Using Qt version 6.8.3 in /usr/lib/x86_64-linux-gnu
2025-06-29 11:59:07 -04:00
nhmall 1e5a132fa1 update tested versions of Visual Studio 2025-06-19 2025-06-19 13:44:06 -04:00
nhmall c384f6acb6 macro whitespace cleanup in util/sfexpasc.c 2025-06-04 07:39:12 -04:00
nhmall 8d0b284dc6 update tested versions of Visual Studio 2025-06-04 2025-06-04 07:37:34 -04:00
nhmall b8aa0a507c warning in cfgfiles.c while building sfctool
../src/cfgfiles.c:457:9: warning: variable 'nsep' set but not used [-Wunused-but-set-variable]
  457 |     int nsep = 1;
      |         ^
1 warning generated.
2025-06-04 05:51:03 -04:00
nhmall 28af1d6410 whitespace cleanup in sfbase.c 2025-06-03 20:45:08 -04:00
nhmall 356f451b1b prevent a double free() 2025-06-03 07:35:34 -04:00
nhmall 6c6d8afb8f fix a warning during sfctool build 2025-06-02 22:37:48 -04:00
nhmall cb12423a2e sys/unix/Makefile.utl update for sfctool 2025-06-02 21:52:38 -04:00
nhmall d25e016140 typo fix again 2025-06-02 21:38:21 -04:00
nhmall c85b3f87d1 GNUmakefile follow-up 2025-06-02 21:33:05 -04:00
nhmall 34c010579b update sys/windows/Makefile.nmake for sfctool 2025-06-02 21:20:47 -04:00
nhmall 5d9656c801 typo fix in sys/windows/GNUmakefile 2025-06-02 21:17:40 -04:00
nhmall 1fb403f299 sfctool MSYS2 build 2025-06-02 21:08:38 -04:00
nhmall f385f36c06 more Windows CI testing 2025-06-02 12:35:31 -04:00
nhmall 436b26c699 Revert "CI remove msbuild@1 task"
This reverts commit c7484730cc.
2025-06-02 12:32:28 -04:00
nhmall c7484730cc CI remove msbuild@1 task
Per https://devblogs.microsoft.com/devops/upcoming-updates-for-azure-pipelines-agents-images/
2025-06-02 12:25:30 -04:00
nhmall e33cf7a6d6 more CI, GNUmakefile interaction 2025-06-02 12:07:11 -04:00
nhmall 4fcbd91d22 fix a CI warning
-> ##[warning]The windows-2019 runner image is being deprecated, consider switching to windows-2022(windows-latest) or windows-2025 instead. For more details see https://github.com/actions/runner-images/issues/12045.
2025-06-02 12:03:30 -04:00
nhmall f262b8b015 CI mingw update 2025-06-02 12:00:42 -04:00
nhmall 4e93cfc825 CI update for mingw 2025-06-02 11:13:43 -04:00
nhmall 40c1842010 update Windows Makefile.nmake 2025-06-02 10:42:21 -04:00
nhmall a9c0cd624f a build fix, due to compile issue for pdcursesmod
GCC15 switched its default to -std=gnu23 and there's a bug in
pdcursesmod as a result. That impacts MSYS2/Mingw64 NetHack builds.
See: https://github.com/Bill-Gray/PDCursesMod/issues/333

The suggestion there is to force --std=gnu17 as a workaround.
2025-06-02 10:32:36 -04:00
nhmall afafc69eed MSYS2 build fixes 2025-06-02 08:50:10 -04:00
nhmall a0da9168b7 remove a debugging bit in restore.c 2025-06-01 22:43:34 -04:00
nhmall 8d5ffbd6e3 permapoisoned follow-up
otmp can be 0 in mk_artifact. In fact, it is explicitly
being set to 0 three lines above the recently added call
to permapoisoned().

The static analyzer was griping also.
2025-06-01 22:31:09 -04:00
nhmall 66007e6783 remove duplicated code from sfctool.c, sftags.c
Link with hacklib to provide them instead
2025-06-01 15:32:55 -04:00
nhmall 32e8aa1068 more descriptive message in sfctool for outdated savefile 2025-05-31 11:19:46 -04:00
nhmall 31369c2101 more free_nhfile() will already call init_nhfile() 2025-05-31 07:36:44 -04:00
nhmall c05766e99f get_freeing_nhfile() comment 2025-05-31 07:17:40 -04:00
nhmall aa50f30653 free_nhfile() will already call init_nhfile() 2025-05-31 07:11:36 -04:00
nhmall 9ef5e886ee consistent ATTRNORETURN prefix and NORETURN suffix 2025-05-30 22:01:20 -04:00
nhmall 50e5715ca5 fix X11 warning with gcc-15
../win/X11/winX.c: In function ‘init_standard_windows’:
../win/X11/winX.c:2769:46: warning: passing argument 2 of ‘XtAppSetErrorHandler’ makes ‘__attribute__((noreturn))’ qualified function pointer from unqualified [-Wdiscarded-qualifiers]
 2769 |     (void) XtAppSetErrorHandler(app_context, X11_error_handler);
      |                                              ^~~~~~~~~~~~~~~~~
In file included from ../win/X11/winX.c:27:
/usr/include/X11/Intrinsic.h:1771:5: note: expected ‘__attribute__((noreturn)) void (*)(char *)’ but argument is of type ‘void (*)(char *)’
 1771 |     XtErrorHandler      /* handler */ _X_NORETURN
      |     ^
2025-05-30 21:17:07 -04:00
nhmall e365b5b18f more static analyzer adjustments 2025-05-30 14:01:41 -04:00
nhmall 1bf92496f4 follow-up 2025-05-30 10:00:42 -04:00
nhmall 8a2b8796cd file descriptor leak reported by analyzer 2025-05-30 09:46:19 -04:00
nhmall 9ed1e6201a try to help out onefile 2025-05-30 09:09:10 -04:00
nhmall 789d0e6676 fix a warning in sfctool build 2025-05-29 10:02:05 -04:00
nhmall a99944fb09 improve sfctool messages 2025-05-29 09:59:29 -04:00
nhmall c258011fbc update tested versions of Visual Studio 2025-05-28 2025-05-28 21:32:21 -04:00
nhmall 8f1bab8c8d CI yml typo fix 2025-05-27 03:57:34 -04:00
nhmall fb4c4e16b6 CI change brew install to groff 2025-05-27 03:52:58 -04:00
nhmall 90b674c1eb CI include nroff on latest macOS 2025-05-27 03:41:49 -04:00
nhmall 8207d66a16 follow-up 2025-05-27 03:05:27 -04:00
nhmall 41aee443c0 vcxproj bit for sfctool 2025-05-26 22:03:49 -04:00
nhmall df602f5d31 fix Qt issue 2025-05-26 20:33:06 -04:00
nhmall 35e35b2cbd fix paste error 2025-05-26 20:18:00 -04:00
nhmall 317490b49d correct preprocessor comments 2025-05-26 20:12:54 -04:00
nhmall 62f9b0d15c fix some reported warnings 2025-05-26 20:06:20 -04:00
nhmall 956c826223 Makefile.src bit 2025-05-26 13:34:31 -04:00
nhmall 1d42aaf96a follow-up build fix 2025-05-26 13:18:32 -04:00
nhmall b303f91f3a engraving pristine text field not properly filled
level creation was not populating the pristine text field
of engraving appropriately
2025-05-26 12:56:44 -04:00