It will need another parameter for 256-colour support. To avoid having
too many arguments, put glyph colour, background colour and attributes
into a struct and, since to curses library all of that is attributes
that are handled by same function, call the struct "gryph attributes".
curses_putch was also declared in two different headers, remove one of
those declarations.
The blue background colour for piles was implemented by changing glyph
colour to curses colour pair with the desired background, and then
passed to curses_putch which takes character and background colour and
makes curses colour pair out of them once again.
Pass blue background to curses_putch instead and let it create curses
colour pair just once.
This is an issue that we discovered in TNNT last year when we added a
custom region with effects that trigger upon entry: it was possible to
bypass those effects by entering the region via a thrown iron ball.
This can be demonstrated by creating a poison gas cloud and then
dragging oneself inside the cloud behind a thrown ball: you land in the
cloud and are surrounded by poisonous gas, but are unharmed by it.
This commit fixes the iron ball code to call in_out_region when
appropriate, which handles the side effects of entering and exiting
regions in addition to preventing travel into or out of a hypothetical
region that blocks entry or exit.
The message in question is '[shopkeeper] says "You be careful with my
[item]!"' when you wield a shop-owned item, but it was being printed
even when the hero is deaf.
Following other examples of shopkeeper dialogue, the correct thing to do
here is not to suppress the message if deaf but instead provide some
nonverbal feedback, so that is what I did.
see_monsters() was producing spurious vault guard at 0,0
messages
Reproduce issue by:
1. Entering vault via teleport.
2. Wait for guard to enter.
3. Drop gold (if necessary) and follow guard.
4. Right after the guard disappears, but before
the corridor does, the following can lead to
the messages:
a) control-R to refresh the display.
or
b) save the game and restore.
In both cases, see_monsters() will get called and lead
to the spurious messages for the vault guard that is
parked.
Also, add a macro PARKEDMONSTER(mon) instead of checking the
the isgd bit and the value of mon->mx being zero in multiple
places
Also, adds MON_PARKED bit to mstate.
Currently the PARKEDMONSTER(mon) macro mentioned above,
does not use the new bit.
* makefont.lua generates incorrect PSF fonts. There can be multiple
characters mapped to a single glyph, but the mappings should be
separated by FE bytes.
* font.c should accept only single character mappings -- not combining
sequences. The bundled fonts have no combining sequences, but I am
exploring other options that provide more Unicode coverate.
The old logic used a negative check to emit an extern declaration for
tparm(). This guarded against old platforms whose curses implementations
did not declare their own functions.
If there are still any platforms left that need this declaration, they
can set TPARM_WORKAROUND to get the old behavior back.
VESA mode: Set the viewport size correctly so the position bar does
not overlay the map.
VESA mode: Correctly set the size to which tiles are stretched when
overview mode (F4) is selected.
Both 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.
16 color mode: Set the panning direction so CTRL-left and CTRL-right
pan in the same direction as 3.4.3.
Pull request from youbo0: when hero's alignment gets low enough, the
adjusted experience level for erinyes effetively dropped instead of
increased. It was being capped at 50 which has a special meaning for
monsters.
Change the level limit to 49 which is as high as ordinary monsters go.
Does not affect saved data.
Fixes#1557
They aren't initially loaded with boulders, thus aren't dangerous.
This is particularly relevant for pets, who would otherwise be very
reluctant to follow their owners up to the level above.
If a monster is marked as off the map, then it is included in
iterations over the monster list, but not allowed to move. This
meant that such monsters would gain movement points on every turn
but not spend them, which could lead to the monster taking a lot of
turns in a row when placed back onto the map.
This commit removes the movement allocation from monsters that are
flagged as dead or removed from the map, meaning that they neve
get more than one turn's worth of movement allocation.
The basic colors are being displayed as black. Colors specified as RGB
are not being converted to the pixel format for the current mode. This
manifests as walls in dungeon branches being drawn in black when the
symbol set is IBMgraphics, and in the wrong color when Enhanced1 is in
use and the display mode uses 15 or 16 bits per pixel. A particular
mode that shows this bug is 1024 by 768 under DOSBox.
u.ustuck and u.usteed are handled differently in 5.0.0 than
in previous releases, and an unexpected halt to NetHack could
result in an inability to use recover to get the game back.
If the hero was engulfed, u.uswallow, could get saved to the
checkpoint file with a value of 1 without a corresponding
u.ustuck_mid value representing the m_id of the engulfing monster.
Recover had no information to use to restore the u.ustuck pointer
when loading the monsters on the level.
With u.uswallow set to 1, the game would proceed to enter if-blocks
based on that, and then crash/fault when it attempted to dereference
u.ustuck, during the recover attempt.
This updates the values of u.ustuck_mid immediately before saving
struct you during a checkpoint, so that the resulting file had
u.uswallow and u.ustuck_mid values that were in concert.
It does the same for u.usteed and u.usteed_mid.
This also now adds a save_currentstate() checkpoint call when
the swallowed/unswallowed status changes, that is whenever set_ustuck()
is called.
The revived mac68k port (on the m68k-wip branch) removed it: it runs
an event loop after exit_nhwindows() has torn the windowing system
down and crashes; the tombstone already pauses. Removing it here too
keeps the block from resurfacing in NetHack-5.0 <-> m68k-wip merges.