Commit Graph

14234 Commits

Author SHA1 Message Date
nhmall
d1755013b4 less specific re version to reduce doc maintenance 2022-10-06 21:36:23 -04:00
nhmall
a1a00c8753 djgpp cross-compiler version update 2022-10-06 21:17:04 -04:00
nhmall
82c6db30a5 do CI DOS build in single make command 2022-10-06 21:05:39 -04:00
nhmall
682291ca4e warning fix
../win/curses/cursmain.c: In function 'curses_init_nhwindows':
../win/curses/cursmain.c:157:17: warning: unused variable 'pdc_font' [-Wunused-variable]
  157 |     static char pdc_font[BUFSZ] = "";
      |                 ^~~~~~~~
../win/curses/cursmain.c: At top level:
../win/curses/cursmain.c:157:17: warning: 'pdc_font' defined but not used [-Wunused-variable]
2022-10-06 20:57:54 -04:00
nhw_cron
4e9a0519a3 This is cron-daily v1-May-8-2022. 000files updated: Files 2022-10-06 13:42:38 -04:00
nhmall
cea9b75cb2 fetch-cross-compiler.sh directory check follow-up 2022-10-06 12:45:14 -04:00
nhmall
bbac072e62 fixes entry for pr889 2022-10-06 12:37:16 -04:00
nhmall
08163e94bb Merge branch 'unicode' of https://github.com/chasonr/NetHack into pr889 2022-10-06 12:31:21 -04:00
Ray Chason
5683f88d36 A note on makefonts.lua 2022-10-05 20:25:34 -04:00
Ray Chason
31859f562e Make the Terminus fonts an external package
Credit to Michael Allison for the patch and for the previous one
to build the fonts in the cross-compile.
2022-10-05 20:03:11 -04:00
PatR
c3633ca4e6 mhurtle_step() bit
A very splight simplification.
2022-10-05 07:16:00 -07:00
PatR
a1dae3caf8 "no monster to remove" for steed knockback
Reported directly to devteam, mounted hero whose steed got hit
for knockback effect triggered impossible "no monster to remove".

In addition to fixing that, this makes a knockback attempt at a
hero who is stuck to a cursed saddle knock the hero and steed back
instead of knocking the hero out of the saddle.

mhurtle_step() should be able to use u.ux0,u.uy0 to update the
hero's old location after moving the hero in order to move the
steed, but the value was different from what was expected and the
map showed stale steed symbol when I used that.  I'm not sure what
is going on there; saving u.ux,u.uy before moving the hero worked
as intended so I didn't pursue it.
2022-10-05 03:40:35 -07:00
nhmall
13028143af latest Xcode build issue
An Xcode update has started causing the same problem that was experienced on
Linux with newer compiler or glibc a while back.

˜
In file included from monst.c:6:
In file included from ../include/config.h:670:
In file included from ../include/integer.h:54:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/stdint.h:52:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:302:39: error: too few arguments provided to function-like macro invocation
^
1 error generated.
make[1]: *** [monst.o] Error 1

 Please enter the commit message for your changes. Lines starting
2022-10-04 19:09:54 -04:00
PatR
7a5372ae6d more PR #891 - build fix
More tty-specific hangup handling.  There's still doubt about the
origiinal testing, but not about testing after "post bitrot repair",
if there was any.  That wasn't useful because the new code was
accidentally suppressed by testing a misspelled macro. when deciding
whether to include it.
2022-10-04 15:21:04 -07:00
PatR
ac7a56bb42 github PR #891 - tty #if HANGUPHANDLING misspelled
Pull request from entrez:  the conditional hangup handling in
wintty.c hasn't been getting used because the HANGUPHANDLING macro
from the core was misspelled as HANGUP_HANDLING.

The old testing was probably invalid since it was most likely done
with the same misspelled #if.  I haven't done any new testing so
since this should be considered potentially buggy.

Fixes #891
2022-10-04 15:06:50 -07:00
Michael Meyer
7caa113cc0 Fix HANGUPHANDLING ifdef for TTY
The SIGHUP handling for the TTY windowport added in 594cb5f was wrapped
in '#ifdef HANGUP_HANDLING', but the actual define is 'HANGUPHANDLING'
without the underscore.
2022-10-04 15:06:32 -07:00
PatR
5902acef64 github issue #890 - hobbit #chat feedback
Issue reported by eakaye:  the alternate hobbit chat message is a
complaint about dungeon conditions, given if its current HP is 10
or more less than its maximum HP.  But since hobbits are level 1,
they will almost never have 10 HP so won't be alive to chat when
at max minus 10.

Keep the old behavior if maximum happens to be more than 10, but
give alternate feedback when less than max if max is 10 or less.

Fixes #890
2022-10-04 15:03:35 -07:00
Ray Chason
03a82720ef Build fonts in the native build 2022-10-03 20:53:07 -04:00
Ray Chason
cb010b9859 Ignore the PSFs 2022-10-03 20:24:20 -04:00
Ray Chason
daf18eac91 Build the PSF fonts in the cross-compile 2022-10-03 20:22:11 -04:00
PatR
546fea7db8 getting knocked off flying steed
I was trying to reproduce the reported "no monster to remove" warning
from remove_monster() when a mounted hero was knocked off jabberwocky
steed but so far haven't been able to.

While trying, I came across a more minor bug.  The hero got knocked
off a flying steed and got feedback of "you fly off" rather than
"you fall off".  Flying capability came from the steed and dismount
feedback is aware of that but calls u_locomotion() which isn't.  This
commit fixes that.

This adds some groundwork (DISMOUNT_KNOCKED) for better dismount
control.  With a map fragment of
|....
|.Du.
|....
I got knocked off my steed by the attacking dragon and ended up with
|..@.
|.Du.
|....
It would be better to prefer spot 1, then the 2s, then 3s, then 4s
(not sure about farther spots if none of those are available)
|.432
|.D@1
|.432
when forced to dismount by knockback.  This does _not_ implement that.
2022-10-03 15:53:35 -07:00
Ray Chason
176e94d1b9 Merge branch 'unicode' of https://github.com/chasonr/nethack into unicode 2022-10-02 20:41:21 -04:00
Ray Chason
d3cb84a313 Update the README for the fonts 2022-10-02 20:41:02 -04:00
Ray Chason
37f43c3b79 Rewrite the makefont program in Lua 2022-10-02 20:41:02 -04:00
Ray Chason
b4832b40fc Support the DOSVGA build 2022-10-02 20:41:02 -04:00
Ray Chason
db74f82101 More native compile fixes
* subst doesn't seem to work in variable assignments
* LUADLL isn't meaningful for MS-DOS
2022-10-02 20:41:02 -04:00
Ray Chason
76a88ef2b0 Updates to the native compile 2022-10-02 20:41:02 -04:00
Ray Chason
8b6fe9d205 Support wide Curses on MS-DOS
Also, fix IBMGraphics on Curses
2022-10-02 20:41:02 -04:00
Ray Chason
df7bea0dbd Update the README for the fonts 2022-10-02 20:38:30 -04:00
PatR
a8bfeb4dca fix wishing help for X11
Pass the wait-for-response arg when displaying the wishing help text
window.  tty, curses, and Qt waited regardless, but X11 honors the
no-wait request.  It was showing the text window then letting the
core immediately resume, resulting in reissuing the wish prompt on
top of the help window.  Entering a successful wish then dismissed
the prompt but left the help on the screen, possibly obscuring the
map depending on placement.
2022-10-02 12:42:12 -07:00
Ray Chason
b259184fad Rewrite the makefont program in Lua 2022-10-02 13:29:47 -04:00
Ray Chason
05612f5c0f Support the DOSVGA build 2022-10-02 03:12:03 -04:00
Ray Chason
53be334eff More native compile fixes
* subst doesn't seem to work in variable assignments
* LUADLL isn't meaningful for MS-DOS
2022-10-02 01:44:06 -04:00
Ray Chason
85be4b8ac6 Updates to the native compile 2022-10-02 01:05:46 -04:00
Ray Chason
cab1f6d8c5 Support wide Curses on MS-DOS
Also, fix IBMGraphics on Curses
2022-10-01 23:44:42 -04:00
PatR
b6a3d4b984 fix github issue #679 - orc strength
Reported by eakaye:  orcish hero has maximum strength of 18/50 but
hero poly'd into an orc was given 18/100 strength.  Also, a comment
from vultur-cadens pointed out that orcish heroes start with poison
resistance while monster orcs lack it.

Even though the boost to 18/100 is only temporary until the poly
times out, make orcs a special case where strongmonst from poly'ing
into them only gives 18/50 strength instead of 18/100.  Adopt the
suggestion that Uruk-hai be an exception and continue to give hero
poly'd into them 18/100.

If any gnome becomes strongmonst (currently none are), treat them
as 18/50 too.  Elvenking and elf-lord are strongmonst; treat their
forms as plain 18 though, matching the limit of elf heroes.  Lesser
monster elves aren't strongmost.

While in there, add another special case so that hero poly'd into a
giant gets 19 strength.  Monster giants are still plain strongmonst
so might warrant some sort of adjustment.

Give orcs poison resistance, but eating their corpses doesn't provide
an opportunity to confer it.  Note goblins and hobgoblins still don't
have the resistance (to distinguish them from orcs a bit).

Take away strongmonst from orc shamans and give it to orc mummies.
Human mummies should have it too (at least according to movies) but
I didn't alter them becuase they're already pretty dangerous at the
point they start occurring.  Take away strongmonst from plain 'elf'
placeholder.

New:  when hero polymorphs into a form that lacks the strongmonst
attribute, take away any exceptional strength (drop 18/01 through
18/100 down to 18; as mentioned above, the drop is only temporary).
There's no attempt to set the maximum even lower for wimpy forms.

Fixes #679
2022-10-01 18:14:59 -07:00
PatR
abfbbab16e use Norep() for searching while engulfed
Suggested by entrez:  when you search while engulfed the feedback asks
whether you're looking for the exit, but the joke about the exit isn't
funny when repeated over and over which happens if the player waits to
be expelled by using 's','s',... rather than '.','.',....
2022-10-01 02:35:51 -07:00
PatR
1da5cf570c fix #K3739: engraving in dust mentions frost
[sic] should be "engraving in frost mentions dust"

Writing on ice with fingers is described as writing in frost, but if
you overwrite an existing engraving rather than add to it the game
said you wiped out the engraving in the dust (immediately followed
by writing in the frost).

Not mentioned in the report:  finishing a multi-turn engraving on
ice had the same problem.
2022-10-01 02:34:28 -07:00
PatR
7eab6a3678 fixes entry for PR #884 - X11 extended command
Pull request from entrez:  X11's get-extended-command widget
allocated 1 extra byte for a couple of end-or-array terminators
and then wrote more than 1 byte to them when initializing its list
of extended commands.

Fixes #884
2022-09-30 08:32:45 -07:00
Michael Meyer
44dcf95e04 Fix: X11 extcmd menu heap buffer overflow
Instead of allocating space for ((n + 1) * size) (to make room for all
entries plus terminator), it allocated space for (n * size + 1).
init_extended_commands_popup would therefore write past the end of the
memory allocated for command_list and command_indx when trying to store
their respective terminator entries.  This meant the X11 windowport
would crash when accessing the extended command menu, if NetHack had
been compiled with -fsanitize=address.

I also did some minor cleanup/refactoring to eliminate variables and
lines that were made redundant or useless by 9d64d13, which changed the
way the function worked and removed the need for things like tracking
indices in the source and destination arrays with separate variables.
2022-09-30 08:16:19 -07:00
nhmall
83f64ee2b6 a couple of warnings 2022-09-30 08:59:57 -04:00
PatR
3dea129a38 curses: scrollbars on clipped map
A change to the curses interface from three years ago to make sure
that round-off didn't make the horizontal and vertical clipped map
indicators appear to not be clipped was using ROWNO for both instead
of COLNO for the horizontal one.  For modest clipping the mistake
was unnoticeable; I don't know whether that remained true for more
extreme clipping.

[Not fixed:  the curses scrollbar stuff ignores the fact that map
column 0 is unused.]
2022-09-29 13:58:50 -07:00
nhmall
8bb4bf3e59 huge chunk of meant name change not comprehensive
warning: for tile 250 (numbered 250) of objects.txt,
        found 'huge chunk of meat' while expecting 'enormous meatball'
	../win/share/objects.txt: 460 tiles
2022-09-29 12:48:03 -04:00
PatR
064ee2021b more genocide prompts
Make the prompt for single genocide be more precise
 from:  What monster do you want to genocide?
 _to_:  What type of monster do you want to genocide?
and the re-prompt for it be slightly more verbose
 from:  What... [type the name of a monster]
 _to_:  What... [enter the name of a type of monster]

Also, make the already verbose re-prompt for class genocide even
more verbose
 from: What class... [type the symbol representing a class]
 _to_: What class... [type the symbol or name representing a class]

Possibly should have changed 'type' to 'enter' on the last one to
keep them consistent but I left that as-is.
2022-09-28 15:19:41 -07:00
PatR
40b16eb8c7 pull request #882 - prompting for genocide target
Pull request from entrez:  genocide prompt has a short explanation
appended.  Skip that on first try, and on all tries if 'cmd_assist'
option is Off.

For class genocide, don't retry an unlimited number of times if
player supplies an empty response.  Any empty response will now
count toward the 5 chances available to supply a valid choice, as
it does with single genocide.

Fixes #882
2022-09-28 14:48:48 -07:00
Michael Meyer
365d728be7 Show genocide prompt help iff 'cmdassist' enabled
The "[type the name]" prompt seems appropriate for handling via
cmdassist, so experienced players who don't need the help can hide it.
I also added a corresponding help note for the class genocide prompt.
2022-09-28 14:47:56 -07:00
Michael Meyer
fc7a2a9869 Don't screen out empty input in class genocide
So that a blank line wouldn't use up one of the player's "tries" for
class genocide, the game would continue to prompt until the input was
non-blank (or the user hit <esc>), with a tight loop around the getlin
call that only exited when it got some non-empty input.  This apparently
risked leaving the game endlessly looping under some worst-case-scenario
hangup conditions.  It was also inconsistent with normal genocide, which
doesn't have special handling of blank lines.  Make the class genocide
prompt behave like the normal genocide prompt by removing the "blank
input" loop (and consequently treating a blank line the same way as any
other attempt to write a name).
2022-09-28 14:47:56 -07:00
PatR
c88e5f2f8b fixes entry for pull request #881 - curses exit
Pull request from chasonr:  if the curses interface did a full screen
update while the game was ending, it could attempt to refresh windows
that had already been removed.

For #if PDCURSES, raw_print() could attempt to write to the message
window after it had been removed.

[Why is raw_print() using the message window at all?  Isn't the main
point of it to bypass that?]

Fixes #881
2022-09-28 14:31:11 -07:00
Ray Chason
31862b95b0 Fix undefined behavior when exiting Curses
* When saving: curses_exit_nhwindows calls curses_uncurse_terminal,
  which calls endwin. curses_exit_nhwindows then calls raw_print,
  which calls more Curses functions after endwin has been called.
  Fix this by having curses_raw_print use puts if window_inited
  is false.

* When dying, quitting, etc.: really_done opens the "Goodbye" window,
  which refreshes the other windows when it closes. But the status
  window (and possibly the map and message windows) are gone by that
  point. The window pointers are properly NULLed, but the NULL is then
  passed to touchwin. Fix this by checking window pointers for NULL.
2022-09-28 14:23:27 -07:00
PatR
a29351f9ce github pull request #859 - IS_SUBROOM_INDEX
Pull request from entrez:  fix an off by one error in the allowed
range of subroom indices.

I've never understood subrooms and am accepting this fix on faith.

Fixes #859
2022-09-28 14:11:57 -07:00