Commit Graph
18937 Commits
Author SHA1 Message Date
nhmall 0f8f8f4892 Windows console dev debug line 2026-05-21 01:26:29 -04:00
nhmall f9165e66fc curses display sizes on Windows console, GUI 2026-05-20 08:55:28 -04:00
nhmall 93786ddfd9 add a fixes5-0-1.txt entry for WANT_SYSTEM_LUA=1 2026-05-20 08:00:02 -04:00
nhw_cron 1eb91a61af This is cron-daily v1-May-7-2026. 000files updated: Files 2026-05-20 07:41:49 -04:00
nhmall 1b7e529732 cross-compile and build adjustments
Tested:
    Ubuntu: make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 resp=1 update
    Ubuntu: make WANT_SYSTEM_LUA=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 resp=1 update
    make CROSS_TO_MSDOS=1 package
    make CROSS_TO_AMIGA=1 all
    make CROSS_TO_AMIGA=1 package
2026-05-20 00:37:02 -04:00
nhmall 4c825ed9a9 typo CROSS_TO_MSDOS=1 2026-05-19 15:38:37 -04:00
nhmall b17eafa0ab CROSS_TO_AMIGA=1 build fix
Fallout from other work this past weekend.
2026-05-19 12:18:23 -04:00
nhmall 182dd93a38 remove a debug line 2026-05-19 11:53:54 -04:00
nhmall 46735de8a6 extend WANT_SYSTEM_LUA=1 to other distros
Only tested on Ubuntu at this point.

feedback on other distros is welcome
2026-05-19 11:38:05 -04:00
nhmall 5333747f02 Add some support for Alpine Linux system Lua package
Requires apk add lua5.4-dev (for the C Lua headers)
2026-05-19 00:49:30 -04:00
nhmall 721dc27f26 remove an unneeded change from earlier CROSS_TO_MSDOS 2026-05-18 16:09:36 -04:00
nhmall 68e36aff74 CROSS_TO_AMIGA fix 2026-05-18 16:06:15 -04:00
nhmall 9841830460 some more follow-up
CROSS_TO_MSDOS build
2026-05-18 15:46:54 -04:00
nhmall 95151d99fc more follow-up
CI still had a duplicate tile.o
2026-05-18 14:18:24 -04:00
nhmall 0607d6426c follow-up 2026-05-18 13:53:02 -04:00
nhmall 3a892160df macOS follow-up 2026-05-18 13:07:13 -04:00
nhmall 29951cccd1 add support for optional builder-created make.prefs
Set things up so that the Makefile build will look for 'make.prefs'
at the top of the NetHack source tree.

If 'make.prefs' is present, the Makefile build will include it
just ahead of the PRE section of a hints file specified to
sys/unix/setup.sh, or practically the first thing during a
Makefile build if no hints file was specified.

The advantage of using a 'make.prefs' is that instead of putting a
series of Makefile variable value assignments on the command line
each time, like this:
    make WANT_WIN_X11=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 c2x=1 resp=1 update
you can, instead, put those preferences into make.prefs, like this:

# start of make.prefs
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
# end of make.prefs

Now, my make command just needs to specify a target:
    make update

The syntax for checking whether make.prefs exists, and for including
it, is GNU make, or bsd make, specific, so sys/unix/mkmkfile.sh will
insert the correct syntax for the make that is in-use when
sys/unix/setup.sh is executed.

The 'make.prefs' file isn't limited to Makefile variable assignments, and
can contain any valid make syntax for the version of make on your system,
but adding make syntax beyond Makefile variable assignment will cause
your make.prefs file to become specific to that version of make. There
are syntactical differences between GNU make and bsd make, particularly
for directives and conditional tests.

The 'make.prefs' file can potentially eliminate much/all of the manual
editing of distributed repository Makefiles or hints files that you, as
a NetHack developer or builder, might routinely carry out.
You have the option of placing your preference changes in 'make.prefs'
instead.

Related reference for .500 hints file variables:

In the NetHack source tree:
sys/unix/README.hints

On GitHub:
https://github.com/NetHack/NetHack/blob/NetHack-5.0/sys/unix/README-hints

For example, on macOS, where GNU make is being used, and I typically
set things up using the macOS.500 hints file:
    sys/unix/setup.sh sys/unix/hints/macOS.500
I might have the following make.prefs in the root of my NetHack source tree:
#---- snip -------
$(info Attention - Using make.prefs)
WANT_MACSOUND=1
resp=1
#---- end-snip ---

For another example, on Linux, where GNU make is being used, and I
typically set things up using the linux.500 hints file:
    sys/unix/setup.sh sys/unix/hints/linux.500
I might have the following make.prefs file in the root of my NetHack
source tree:
#---- snip -------
$(info Using make.prefs)
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
#---- end-snip ---
2026-05-18 13:03:31 -04:00
nhmall d9bc6d7b8a Revert "add #-EARLY section"
This reverts commit 85ca1cce74.
2026-05-17 20:54:08 -04:00
nhmall 85ca1cce74 add #-EARLY section 2026-05-17 20:38:10 -04:00
nhmall 8ce430bd89 put the values on other pdcurses platforms back
They were set this way on other pdcurses platforms prior
to this recent change, so leave them at those values.
2026-05-16 22:13:40 -04:00
nhmall 125800404b fixes5-0-1.txt catch-up 2026-05-16 21:45:30 -04:00
nhmall 51011e234d build fix attempt for msdos cross-compile
Recent change was #ifdef PDCURSES, but that is
also used on msdos and other platforms
2026-05-16 21:41:05 -04:00
nhmall 476d0717a7 CI NetHack version 2026-05-16 21:02:38 -04:00
nhmall 083e55e905 Windows curses-related follow-up 2026-05-16 12:22:03 -04:00
nhmall d78a875110 more Windows curses size tinkering 2026-05-16 12:15:20 -04:00
nhmall b2458e679a recently-appeared warning bit
mkroom.c(598): warning C4389: '!=': signed/unsigned mismatch
2026-05-16 11:37:51 -04:00
nhmall 4434b14884 more hints file readiness in Makefiles 2026-05-16 10:59:48 -04:00
Pasi Kallinen 5199921c05 Fix experience-level up/down hilighting
The highlighting worked correctly for #levelchange in wizard mode,
but not for gaining experience levels by killing monsters.
2026-05-16 16:51:34 +03:00
nhmall e1ee404ecc warning workaround led to a build error on some platforms & compilers
Use another method for the warning workaround.

allmain.c:33:56: error: 'maybe_unused' attribute cannot be applied to types
   33 | early_init(int argc USED_FOR_CRASHREPORT, char *argv[] USED_FOR_CRASHREPORT)
      |                                                        ^
allmain.c:28:30: note: expanded from macro 'USED_FOR_CRASHREPORT'
   28 | #define USED_FOR_CRASHREPORT UNUSED
      |                              ^
../include/tradstdc.h:510:16: note: expanded from macro 'UNUSED'
  510 | #define UNUSED ATTRUNUSED
      |                ^
../include/tradstdc.h:397:22: note: expanded from macro 'ATTRUNUSED'
  397 | #define ATTRUNUSED [[maybe_unused]]
      |                      ^
allmain.c:33:49: warning: unused parameter 'argv' [-Wunused-parameter]
   33 | early_init(int argc USED_FOR_CRASHREPORT, char *argv[] USED_FOR_CRASHREPORT)
      |                                                 ^
1 warning and 1 error generated.
2026-05-16 09:05:29 -04:00
nhmall 2445b97a10 build fix with hints file linux.500 and musl=1
This fix was suggested by @PPN-SD in the comments on
GitHub issue https://github.com/NetHack/NetHack/issues/1530#issuecomment-4466027729

Resolves #1530
2026-05-16 08:57:54 -04:00
Pasi Kallinen 0f0e7c99bf Fix random attended shrines in irregular rooms 2026-05-16 14:57:12 +03:00
nhmall a8f97a3926 OpenBSD build bits
An issue still remains with fetch-Lua in the top Makefile.
2026-05-15 21:58:51 -04:00
Patric Mueller 3a0c6f17c7 fix buffer overflow in update_topl
Buffer overflows could occur when interacting with containers while
inputting or outputting many items.

This commit ensures topline updates do not exceed buffer limits by
checking against TBUFSZ.

Issue reported by k21971 on IRC.
2026-05-15 23:32:14 +02:00
PatR e11ff5f703 another try at removing static analyzer complaints
The one in options hasn't been addressed this time.
2026-05-15 13:40:34 -07:00
nhmall c558ef0b33 Makefile syntax did not work on OpenBSD
Trying another approach for whichbsd.500
2026-05-15 15:29:25 -04:00
Pasi Kallinen a533350537 TTY: allow custom glyph colors on more limited terminals
Previously changing glyph colors required a terminal with more
than 256 colors, even if the color was one of the basic 16 colors
used by NetHack.
2026-05-15 20:21:52 +03:00
nhw_cron e05864544c This is cron-daily v1-May-7-2026. 000files updated: Files 2026-05-15 12:25:20 -04:00
nhmall d81d47b81e new file header info 2026-05-15 12:18:29 -04:00
nhmall 8d0cfb05fa rename netbsd.500 to bsd.500
In past releases of NetHack, there was a myriad of different hints
files for different operating systems, and even different versions
of operating systems.

It made maintenance a chore, because all the variable hints files
had to be updated for a wanted change, or (as typically was the
case), some lesser-used hints files were left behind and became
outdated.

Instead of going down that road again, this renames
    sys/unix/hints/netbsd.500
to
    sys/unix/hints/bsd.500

Where things need to differ for a different bsd flavour,
the differences can be shrouded in things like

    .if ${WHICHBSD} == "NETBSD"
    .else
    .endif

This change is being done to make maintenance easier, at the
cost of making the resulting Makefiles a little more complex,
but there won't be as many separate Makefile hints to maintain.

This commit is being done instead of merging pull request #1531
which would add a new sys/unix/hints/openbsd.500 file.

Only tested on NetBSD so far. Please let us know if there's
an issue on other bsd's, and we will attempt to fix thos issues.

Closes #1531

Close
2026-05-15 12:11:34 -04:00
PatR 9ec26da4ff static analysis fix attempt
These three changes compile but I don't know whether thay succeed in
suppressing the new static analyzer complaints.
2026-05-15 08:11:56 -07:00
nhmall 99f559fe18 utilize more real estate on Windows GUI curses
Some inventory items were being hidden in a lengthy list.
2026-05-15 01:21:45 -04:00
nhmall accb14b797 free up some console alloc()'d memory under curses
tty takes care of this, but it wasn't being done under curses
2026-05-14 23:57:25 -04:00
nhmall 5edb093e14 pdcurses: don't truncate curses window width
The curses windows were being capped at 110 columns
inappropriately.

Use the full width of the console.
2026-05-14 22:40:48 -04:00
nhmall 2eb817af07 OS bit in sp_lev.c 2026-05-14 13:03:48 -04:00
PatR c6a58c5c5a warning fix 2026-05-14 08:48:19 -07:00
Pasi Kallinen f000fed16d Fix statue and figurine genders in special levels
When a random statue or a figurine was generated in special levels,
the gender was not initialized correctly, so you ended up getting
eg. "dwarf ruler"

It now works correctly, and you can still specifically request
a non-gendered version with the montype-parameter.

For example

des.object({ id = "statue" });
des.object({ id = "statue", montype = "dwarf ruler" });
2026-05-14 17:38:29 +03:00
nhmall 342bbc85c4 warning bit for clang-22 and tiletext.c 2026-05-14 08:31:33 -04:00
nhmall 7e50882ffb Files updated from cron daily 2026-05-14 07:29:02 -04:00
nhmall bc20ccd659 README wording bit 2026-05-13 20:38:52 -04:00
nhmall 11cd021063 update header info on netbsd.500 2026-05-13 17:34:46 -04:00