NHDT-Branch: NetHack-5.0 $:$NHDT-Revision: 1.36 $ $NHDT-Date: 1781062909 2026/06/09 19:41:49 $
	
General Fixes and Modified Features
-----------------------------------
fix some cross-compile package filenames that still referenced 370 instead
	of 500
Use NHV macro (NHV=500) for filenames in Makefiles and/or hints files to make
	it less likely to overlook or miss them next time
early startup options such as --showpaths could be run non-interactively, so 
	ensure that getret() doesn't prompt and wait for user input
fix issue where the new game startup message was stating 'Work-in-progress'
	even when NH_DEVEL_STATUS was set to NH_STATUS_POSTRELEASE
if 'mention_decor' was set in config file or NETHACKOPTIONS,
	starting the game told you that "you are standing on stairs which lead
	out of the dungeon", even when the player entered the tutorial where
	that wasn't true
when a vault guard was moved off the map, an impossible about trying to update
	map location <0,0> was issued
doc: use full URL for nethack.org in Guidebook.mn
doc: fix a paste error in Guidebook.tex
doc: bring man pages up to date with *nix documentary conventions and ensure
	their portable rendering among GNU, Heirloom Doctools, DWB 3.3,
	Solaris 10, and Plan 9 troffs, and mandoc(1)
doc: fix spelling error in nethack.6
spelling: "Flanian Pobble Bead" to "Flainian Pobble Bead"
obey statue type gender (gnome king statue in minetn-5)
fix statue and figurine genders in special levels in general
fix buffer overflow in update_topl when handling multiple items in a
	container
fix random attended shrines in irregular rooms
fix experience-level up/down hilighting
cherry-pick a pair of core fixes from the m68k-wip branch to add menu
	glyphs to shop bills and container tip/loot menus (pr #1539
	by ingpaschke)
tiles: make the tile for magic flute and mundane flute be exactly the
	same; do the same thing for drum of earthquake and leather drum
fix a buffer overflow in reroll processing that was introduced in a
	post-release 5.0.0 commit
ensure a checkpoint, aka a save_currentstate() call, isn't done before
	the game is ready
add ANY_INT16 to any_types and use it for u.ux/uy/tx/ty and uz dlevel/dnum;
	those are coordxy (int16_t) but the Lua bindings were treating them
	as 1-byte fields, so on big-endian m68k Lua read the high byte (0)
	instead of the actual value. Symptom: place_object off map <0,0>
	win the tutorial.
fix an off-by-one in glyph_is_normal_piletop_obj (pr #1547 by ingpaschke)
replace the hashtable used for parsing glyphnames with sorted indices and
	reduce the string allocation load during that processing (cherry-pick
	of pr #1548 by ingpaschke)
for SELECTSAVE, allow utd flags for uptodate() to be passed down through
	the small set of callers that eventually call uptodate()
avoid calling costly_spot(), costly_adjacent(), find_byowner(), which
	all rely on shop_keeper() under the hood, in the midst of the level
	loading process before all the required data structures have
	been finalized
if the hero has already been told that an engraving vanished, ensure that
	the engraving marker isn't still showing when prompted for a
	new engraving
aklys path shouldn't be shown for locations that the hero cannot see
keep the player better-informed about status of the tether on their weapon
don't overflow svp.plname on restore (pr #1570 by chasonr)
monsters (including pets) aren't scared of the Sokoban rolling boulder traps
fix a bug in which steeds would continuously gain movement points while
	being ridden
when hero's behavior makes erinyes stronger, cap level at 49 rather than 50
with inventory item action for leash, distingluish leash-in-use from empty one
deafness check was missing from a shopkeeper message in ready_weapon()
thrown ball travel did not check for regions (pr #1595 by copperwater)
remove deprecated option --version:paste
the timeout for stasis wasn't decrementing while off-level; ensure the elapsed
	 time is taken into consideration upon return to the level
Some optimizations of the glyph lookup - don't produce names for swallow
	glyphs that can never appear to speed up the building of the
	glyph index in populate_glyphname_hash_indices; build a sorted
	index for loadsyms so that it can be searched with bsearch
	(pr #1612 by chasonr)
stethoscope applied to one monster disguised as another (double-trouble Wizard)
	mis-described undisguised form (unintended side-effect of 5.0 commit
	064523e162f8e30bdb76186a854b9d8958f3b340)
mon_offmap() and place_monster() needed to operate on the same mstate bits
food_disappears() needed to include a tin check


Platform- and/or Interface-Specific Fixes
-----------------------------------------
Amiga: fall back to text mode when tile mode is not viable
Amiga: Detect Workbench depth, display-database MaxDepth, and free chip RAM
	if any signals AMIV can't run (e.g. A1000 with 4-colour WB)
Amiga: swap windowprocs to amii_procs before opening any screens
Amiga: disable SYSCF, drop sysconf from package; assure_syscf_file() was
	killing the binary when run outside NetHack: was breaking normal
	launches
Amiga: honor __stack under libnix; reference __stkinit so the linker pulls
	swapstack.o from libnix.a; without it the program runs on the
	inherited shell stack and crashes inside Lua / level-gen
Amiga: provide a real v4 UUID via get_nhuuid
Amiga: ship as a NetHack drawer with drawer icon and README
Amiga: ship Workbench icons for the binary and text files
Amiga: fix misleading fallback warning and stale comment
Amiga: stop rendering CLR_BLACK and CLR_WHITE as inverse video
Amiga: default number_pad:1 in shipped nethack.cnf
Amiga: promote AMIGA_INTUITION to supported so it shows up in version info
Amiga: wire altmeta option to sysflags.altmeta
Amiga: restore glyph icons in menus
Amiga: sys/amiga/README.amiga stated "Extract NH50AMI.ZIP" but it could
	be named something else; added a note about the potential suffix
Amiga: `amiv_lprint_glyph` used an uninitialized `base` in tile-offset math
Amiga: `amii_clear_nhwindow` overview window never got cleared with the map
Amiga: `amii_sethipens` fell through from `NHW_TEXT` into `case -2`, clobbering
	text-window pens
Amiga: `NHW_BASE`/`NHW_OVER` collided with `NHW_PERMINVENT=6`; renumbered
	off `NHW_LAST_TYPE`, matching the `wintty.h` convention
Amiga: `make_menu_items` sized its output array by
	`sizeof(amii_menu_item)` instead of `sizeof(menu_item)`
Amiga: `DoMenuScroll` could deref a NULL `amip` on the `SELECTUP` path
Amiga: `GlyphToIcon`'s ASCII passthrough used `> 10000` instead of `>=`
Amiga: `fopenp`'s buffer-bound check fired one byte too late
Amiga: fix port_help double-prefix path
Amiga: replace WINVERS_AMI* strcmp with WINDOWPORT() id compare
Amiga: route port paths through fqname()
Amiga: drop redundant 'either windowtype' guards
Amiga: deduplicate amii_procs and amiv_procs
Amiga: route non-menu messages from DoMenuScroll to ProcessMessage
Amiga: delete outdated/sys/amiga/
Amiga: graphical tombstone RTG-screen fallback
Amiga: fix extended-command menu mouse-pick
Amiga: clamp amii_numcolors and guard tile CMAP loop
Amiga: fix --more-- infinite loop on overlong words
Amiga: bound BufferQueueChar; move CloseWindow out of Forbid()
Amiga: defensive NULL/bounds guards in menus and window creation
Amiga: tighten input/dialog buffer bounds
Amiga: header hygiene and palette-size constants
Amiga: drop UNTESTED AROS path; tighten fopenp separator write
Amiga: harden host-side bmp/xpm to iff converters
Amiga: tighten two minor issues from review
Amiga: fix bitmap/IFF resource handling in winchar.c
Amiga: fix overview-window crashes
Amiga: fix latent issue found in code review: fname[18]/sprintf risks
	overflow for >=10 in any version field; switch to snprintf into
	a wider static buffer
Amiga: fix latent issue found in code review: (1L << i) for i==31 (or
	shifting into the depth-loop terminator) is undefined for signed
	long;use 1UL
Amiga: fix latent issue found in code review: Drop unused cnt= from
	amii_display_nhwindow's DoMenuScroll call; the menu return value
	is consumed elsewhere, not here
Amiga & Atari: enable USE_BUFFERING for buffered stdio structlevel savefile
	write path
curses on Windows: the number of columns was being capped by default
	at 110 in cursinit.c; try to use the console width if no explicit
	setting was specified in the config file; impacted both wincon
	and wingui curses
curses on Windows: some early data is alloc'd for the windows console
	settings in both tty and curses (pdcursesmod) prior to the
	window port initialization, but only tty was freeing it; call
	console_exit() in nethack_exit if window port is curses
curses on Windows: dialogs pertaining to the need for self-recover
	were not visible and therefore the player had no idea that
	answers were expected or why
gcc-16: tiletext.c [-Wdiscarded-qualifiers] warning suppression
libnh: update get_nhuuid() for libnhmain
libnh: sys/libnh/libnhmain.c: drop `static` on `whoami()`
libnh: rewrote sys/unix/hints/macOS.500: rewrote the libnh.a rule. The
	`ar rcs libnh.a $(HOBJ) $(LIBNHSYSOBJ) liblua-$(LUA_VERSION).a` had
	four problems: (a) ar archives liblua.a as a single opaque member
	that macOS ld can't dereference, (b) date.o (DATE_O, kept separate
	from HOBJ) was never archived, so `populate_nomakedefs` and
	`nomakedefs` were missing, (c) hacklib.a was likewise omitted, and
	(d) HOBJ already contains $(SYSOBJ) (with unixmain.o) and $(WINOBJ)
	(the tty windowport), which duplicated symbols from libnhmain.o /
	winshim.o.
libnh: sys/libnh/libnhmain.c: gate the emscripten-only code in get_nhuuid
	with `#ifdef __EMSCRIPTEN__` instead of `#ifdef NHUUID`
libnh: sys/unix/hints/macOS.500 in the WANT_LIBNH block, add an explicit
	`recover: lua_support` dependency (gated by MAKEFILE_TOP).  When 
	$(GAME) is overridden to empty, the regular `recover: $(GAME)` chain
	no longer triggers `lua_support`, so include/nhlua.h never gets
	generated and recover.c's transitive #include of hack.h fails
libnh: export GLYPH_PILETOP_OFF constant (pr #1562 by avgas3)
Linux: add WANT_SYSTEM_LUA=1 support to the linux.500 hints files and
	its included files, making it possible to avoid the 'fetch-lua'
	step and the subsequent compiling of Lua; it tries to use use
	the Lua5.4 package that is already installed on the system
macOS: fix ncurses build with Homebrew
MS-DOS: Fix custom colors in VESA BIOS mode (pr #1577 by chasonr)
MS-DOS: VESA mode: set the viewport size correctly so the position bar
	does not overlap the map; correctly set the size to which tiles are
	stretched when overview mode (F4) is selected (pr #1579 by chasonr)
MS-DOS: VESA and 16 color modes: Pass correct parameters to vga_userpan
	and vesa_userpan, so the pan keys (CTRL+arrow) work correctly. Some
	emulations don't report CTRL with up or down arrows, so accept
	CTRL-home, CTRL-page up, CTRL page down and CTRL-end
	(pr #1579 by chasonr)
MS-DOS: 16 color mode: Set the panning direction so CTRL-left and CTRL-right
	pan in the same direction as 3.4.3. (pr #1579 by chasonr)
MS-DOS: makefont.lua was generating incorrect PSF fonts; there can be
	multiple characters mapped to a single glyph, but the mappings
	should be separated by FE bytes (pr #1581 by chasonr)
MS-DOS: accept only single character font mappings (pr #1581 by chasonr)
MS-DOS: add U+2299, U+2601 and U+2980 to the bundled fonts, so that all
	symbols specified in the Extended2 symbol set are available;
	also,a few more directives are added to the files, so that
	FontForge can load them and display their contents
	(pr #1610 by chasonr)
MS-DOS: The 16 color mode loads the font specified in font_map, and accepts
	it only if its size is 8 by 16 pixels; avoid a null dereference
	if the font is not found (pr #1611 by chasonr)
MS-DOS: some optimizations for tile handling; change 16-color mode and
	VESA mode so that the tile is processed once, when it is first
	displayed, with the result cached; Use memcpy when splitting the
	image into tiles; only load the tileset once (pr #1617 by chasonr)
MS-DOS: Define a separate palette for VGA text (pr #1620 by chasonr)
MS-DOS: some conditional cleanup for SUPPRESS_GRAPHICS, TILES_IN_GLYPHMAP,
	NO_TILES, WANT_WIN_CURSES=1 without WANT_WIN_TTY=1
	(pr #1632 by chasonr)
MS-DOS: add some hilite_pet and hilite_pile support to tiled display
musl: musl libc does not have __sighandler_t so don't use it in the
	macro definition for SIG_RET_TYPE with musl
tty: allow custom glyph colors if they're basic 16 nethack colors
	on terminals with less than 256 colors
WASM: resolve some build failures in 'make CROSS_TO_WASM=1'
WASM: hints file cross-pre2.500 update to CFLAGS to include -DNHUUID
Windows: don't demand keypress on intentional exit
Windows: correct a NetHack 5.0.0 packaging error if visual studio was
	used; a remnant hard-coded 370 was in package.nmake
Windows: setting any map_mode option in the config file could trigger
	an app failure on launch by dereferencing a null pointer
Windows: a Windows console debug line began showing up after the sources
	switched patchlevel.h NH_DEVEL_STATUS from NH_STATUS_RELEASED to 
	NH_STATUS_POSTRELEASE; make it only ever show if (wizard) is true
Windows: with SELECTSAVE don't display error messages to a regular player
	about out-of-date save files encountered while building the
	saved-game list to select from; the game doesn't offer any
	action to assist with them presently, and they would have to be
	dealt with external to the game, so try not to annoy
Windows: fix startup of GUI NetHackW.exe if there was an explicit
	OPTIONS=windowtype:tty in the config file
Windows: fix hilite_pet on the GUI NetHackW.exe when ascii map was selected
Windows: support -a (alignment) -g (gender) -p (profession) -r (race)
	command line options via genl_prag() function in earlyarg.c
Windows: in the event that there is a collision between a menu group
	accelerator and an individual menu item's accelerator, disregard
	the group accelerator; only known collision is '$' at this time
X11: obey timed_delay
X11: improve TTY-style status line with text attributes for status hilites,
	hitpointbar, some unicode support, 3-line status


General New Features
--------------------
sysconf option MAX_REROLL_RATE to limit rate at which rerolls are performed
idlecheckpoint config file option to update checkpoint files whenever an
	input request isn't responded to within IDLECHECKPOINT_WAIT_TIME
	seconds; helps ensure that a recover operation, if it turns out
	to be needed, is much more current than the last level change;
	support added for Windows console, Qt, and curses


Platform- and/or Interface-Specific New Features
------------------------------------------------


NetHack Community Patches (or Variation) Included
-------------------------------------------------
NCURSES_CFLAGS was being ignored when using hints/linux.500 with only
	WANT_WIN_TTY=1 and not WANT_WIN_CURSES=1  (pr #1522 by torakoya)
added a hints file netbsd.500 for NetBSD (pr #1519 by SirWumpus)


Code Cleanup and Reorganization
-------------------------------
add Contributing.md with some guidelines for making a pull request that
	is in an acceptable format
Make all top-level .md files subject to nhsub substitutions
Fix subst for luahelper
Amiga: delete dead files and dead-macro code
Amiga: delete the .p prototype headers
Amiga: drop #if 0 dead-code blocks
Amiga: drop TESTING dev toggle in winchar.c
Amiga: collapse #ifndef CROSS_TO_AMIGA include forks
Amiga: clean up amiconf.h
Amiga: drop OPT_DISPMAP / display_map / fast_map machinery
Amiga: correct command-line flag doc in amii.hlp
Amiga: delete outdated/sys/amiga/ source folder tree
Amiga: drop legacy non-gcc compiler guards
Amiga: remove remnants of support for compiling on Amiga (the old
	compilers couldn't cope with such a large codebase anymore)
Amiga: remove old conditionals for running on OS 1.3
Amiga: remove miscellaneous unused code like TTY/BBS support, commented
	out test code etc
Amiga: make INTUI_NEW_LOOK unconditional
Amiga: drop SHAREDLIB dead build flavor
Amiga: make amigapkg depend on $(GAMEBIN)
unix hints: consolidate all the bsd flavours into a single sys/unix/bsd.500
	hints file to ease maintenance going forward; use bsd make
	conditional logic to carry out steps unique to NetBSD, OpenBSD,
	FreeBSD, GhostBSD
unix hints: the Makefiles distributed by sys/unix/setup.sh will now check
	for the presence of a make.prefs at the top of the NetHack tree,
	and will include it if it exists; make.prefs must contain valid 
	Makefile syntax and can be used to set preferences instead of
	placing them on the make command line; Use GNU make syntax for GNU
	make, and use bsd make syntax for bsd make
share a single copy of nhuuid generation code between Amiga, Atari, and msdos
	by way of sys/share/pcmain.c (cherry-pick from pr #1541 by ingpaschke)
nhgitset.pl: Set up future deprecation of PRE and POST hooks.
switch to using LUA_VERSION_NUM instead of LUA_VERSION_RELEASE_NUM for Lua
	version checking
include a set of decals (petmark and pilemark) in win/share/decals.txt
	and adjust tile processing to include it
