]> granicus.if.org Git - nethack/log
nethack
2 years agoremove code on Windows referencing WIN32_GRAPHICS
nhmall [Thu, 10 Nov 2022 16:47:31 +0000 (11:47 -0500)]
remove code on Windows referencing WIN32_GRAPHICS

As far as I know, there's no such thing as WIN32_GRAPHICS in the
current source tree. The Windows graphical port uses the preprocessor
macro MSWIN_GRAPHICS.

2 years agoavoid use of variables near and far
nhmall [Thu, 10 Nov 2022 16:18:49 +0000 (11:18 -0500)]
avoid use of variables near and far

Some recent testing with a multi-platform compiler encountered difficulty
with the use of a variable 'near' (and presumably 'far', but we don't have
any of those in the source tree) due to reserved word extensions.

Avoid using that as a variable name.

2 years agopull request #922 - remove #ifdef GCC_WARN
PatR [Tue, 8 Nov 2022 20:09:50 +0000 (12:09 -0800)]
pull request #922 - remove #ifdef GCC_WARN

Pull request from argrath:  remove another instance of #if GCC_WARN.

Fixes #922

2 years agoremove GCC_WARN
SHIRAKATA Kentaro [Sat, 5 Nov 2022 11:56:55 +0000 (20:56 +0900)]
remove GCC_WARN

Now, the only usage of GCC_WARN is for the guard of PRINTF_F in wincurs.h.
This guard can be removed safely, as PRINTF_F is already used unconditionally in extern.h.

2 years agopull request #918 - level teleport target "delphi"
PatR [Tue, 8 Nov 2022 19:57:49 +0000 (11:57 -0800)]
pull request #918 - level teleport target "delphi"

Pull request from entrez:  treat "delphi" as a synonyn for "oracle"
when using a name rather than number for level teleport destination.

Fixes #918

2 years agoUse "delphi" as "oracle" levelport alias
Michael Meyer [Wed, 2 Nov 2022 14:21:51 +0000 (10:21 -0400)]
Use "delphi" as "oracle" levelport alias

Permit levelport by name to "delphi".  That is what the Oracle calls the
level (or at least her room) in-game, so it seems like a natural guess
for the name of the level.

2 years agokeep propertynames static in timeout.c
nhmall [Sun, 6 Nov 2022 15:02:27 +0000 (10:02 -0500)]
keep propertynames static in timeout.c

2 years agofollow-up bit to fixes3-7-0.txt
nhmall [Sat, 5 Nov 2022 23:40:23 +0000 (19:40 -0400)]
follow-up bit to fixes3-7-0.txt

2 years agowarning resolution
nhmall [Sat, 5 Nov 2022 23:36:46 +0000 (19:36 -0400)]
warning resolution

makedefs.c:100:6: warning: unused variable 'Dont_Edit_Code' [-Wunused-variable]
    *Dont_Edit_Code =
     ^
1 warning generated.

2 years agoMerge branch 'old-software-compatibility' of https://github.com/chasonr/NetHack into...
nhmall [Sat, 5 Nov 2022 23:30:20 +0000 (19:30 -0400)]
Merge branch 'old-software-compatibility' of https://github.com/chasonr/NetHack into NetHack-3.7

2 years agoadd fixes3-7-0.txt entry for pr923
nhmall [Sat, 5 Nov 2022 23:28:28 +0000 (19:28 -0400)]
add fixes3-7-0.txt entry for pr923

2 years agoMerge branch 'pr923' into NetHack-3.7
nhmall [Sat, 5 Nov 2022 23:26:50 +0000 (19:26 -0400)]
Merge branch 'pr923' into NetHack-3.7

2 years agoMerge branch 'unicode-X11-2' of https://github.com/chasonr/NetHack into pr923
nhmall [Sat, 5 Nov 2022 23:23:18 +0000 (19:23 -0400)]
Merge branch 'unicode-X11-2' of https://github.com/chasonr/NetHack into pr923

2 years agorelocate mstrength() and supporting function again
nhmall [Sat, 5 Nov 2022 22:40:57 +0000 (18:40 -0400)]
relocate mstrength() and supporting function again

Also, purge the code for makedefs -m

2 years agoSome cleanup for non-ENHANCED_SYMBOLS build
Ray Chason [Sat, 5 Nov 2022 22:34:44 +0000 (18:34 -0400)]
Some cleanup for non-ENHANCED_SYMBOLS build

2 years agoFree the font structure when done
Ray Chason [Sat, 5 Nov 2022 22:24:02 +0000 (18:24 -0400)]
Free the font structure when done

Also, adjust some comments about not supporting supplementary
characters.

2 years agoRevert "ranged_attk() - there can be only one"
nhmall [Sat, 5 Nov 2022 19:26:29 +0000 (15:26 -0400)]
Revert "ranged_attk() - there can be only one"

This reverts commit b399e3f2f5cb9ebed00e194511ec2cc7e056a796.

2 years agoranged_attk() - there can be only one
nhmall [Sat, 5 Nov 2022 17:07:10 +0000 (13:07 -0400)]
ranged_attk() - there can be only one

Relocate the newer code for the function to mdlib.c
where makedefs can still use it.

2 years agoprefix static version of ranged_attk() in mdlib.c
nhmall [Sat, 5 Nov 2022 16:38:02 +0000 (12:38 -0400)]
prefix static version of ranged_attk() in mdlib.c

2 years agoSet registry ISO10646 at run time
Ray Chason [Sat, 5 Nov 2022 15:56:21 +0000 (11:56 -0400)]
Set registry ISO10646 at run time

We don't know at compile time whether the X server even supports
Unicode. So take the configured map font, change the registry to
ISO10646 and try the resulting font string. Keep the configured
font if that doesn't work.

2 years agoAdd Unicode, IBMgraphics and DECgraphics to X11
Ray Chason [Sat, 5 Nov 2022 04:40:04 +0000 (00:40 -0400)]
Add Unicode, IBMgraphics and DECgraphics to X11

2 years agoAdd Xlib.h
Ray Chason [Fri, 4 Nov 2022 02:13:52 +0000 (22:13 -0400)]
Add Xlib.h

Gets us running on XFree86 3.3.5

2 years agoFix inadvertent change of strchr to index
Ray Chason [Thu, 3 Nov 2022 23:58:56 +0000 (19:58 -0400)]
Fix inadvertent change of strchr to index

Thanks to entrez for pointing this out.

2 years agoUse "magenta" for bright magenta
Ray Chason [Thu, 3 Nov 2022 23:35:41 +0000 (19:35 -0400)]
Use "magenta" for bright magenta

Older X servers don't understand "Fuchsia," and NetHack throws
impossibles as a result. The current Xorg defines "magenta" as the
same color as "Fuchsia," namely #FF00FF, and older X servers
understand "magenta."

The resulting X11 NetHack is known to work with XFree86 4.2.0.
The minimum version remains undetermined.

2 years agoDefine and use PRINTF_F_PTR
Ray Chason [Thu, 3 Nov 2022 23:33:30 +0000 (19:33 -0400)]
Define and use PRINTF_F_PTR

GCCs older than 3.1 understand __attribute__(printf(...)), but only
with functions; it doesn't work with function pointers. This change
uses PRINTF_F_PTR to remove the attribute from two function pointers.

This change establishes GCC 3.0 as the minimum version to build
NetHack. Older versions have trouble with the variadic macros and
variable declarations in mid-block.

2 years agoprefix some macro names
nhmall [Thu, 3 Nov 2022 20:50:25 +0000 (16:50 -0400)]
prefix some macro names

2 years agoadjust 4 line lengths from previous commit
nhmall [Thu, 3 Nov 2022 19:50:32 +0000 (15:50 -0400)]
adjust 4 line lengths from previous commit

2 years agopurge more E for extern
nhmall [Thu, 3 Nov 2022 19:42:24 +0000 (15:42 -0400)]
purge more E for extern

2 years agochange #vanquished from wizard mode to normal play
PatR [Thu, 3 Nov 2022 07:00:34 +0000 (00:00 -0700)]
change #vanquished from wizard mode to normal play

Make the existing '#vanquished' command be available during regular
play, with M-V bound to it.  'm #vanquished' or 'm M-V' brings up
the sorting menu that you get when answering 'a' rather than 'y' at
the end-of-game "disclose vanquished creatures?" prompt.

The original #vanquished came from slash'em, where it was available
in normal play.  When added to nethack, it was put in as wizard-mode-
only. I added the sorting capability several years ago.

The chosen sort is remembered and re-used if not reset but only for
the remainder of the current session.  It probably ought of become
a run-time option so be settable in advance and across sessions but
I haven't done that.

2 years ago'bad negation' during config file processing
PatR [Wed, 2 Nov 2022 22:56:10 +0000 (15:56 -0700)]
'bad negation' during config file processing

This fixes the problem with reporting "the <foo> option may not
both have a value and be negated" to stdout if delivered before the
interface has been set up, so possibly not be seen.  It has been
using pline_The() but that uses rawprint() during startup.

Unfortunately testing it has uncovered another config file error
reporting issue and this one won't be so easy to fix.  For a logical
line that uses backslash+newline continuations to span multiple
physical lines, when there is a problem it reports the line number
and text of the last segment rather than of the first or of the
specific segment containing the problem.  That isn't necessarily
wrong but is suboptimal.

2 years agorevise Guidebook.mn comment
PatR [Wed, 2 Nov 2022 21:29:35 +0000 (14:29 -0700)]
revise Guidebook.mn comment

2 years agofixes entry for PR #917 - unnaming unique mons
PatR [Tue, 1 Nov 2022 23:26:29 +0000 (16:26 -0700)]
fixes entry for PR #917 - unnaming unique mons

Pull request from entrez:  attempting to unname a unique monster or
shopkeeper by assigning a new name of <space> was rejected as
intended, but the rejection message is phrased strangely when <space>
gets inserted as the name that won't be assigned.

Fixes #917

2 years agoMessage for giving unnameable monster blank name
Michael Meyer [Sat, 29 Oct 2022 03:28:29 +0000 (23:28 -0400)]
Message for giving unnameable monster blank name

The message for trying to (re)name an unnameable monster was weird when
the player entered a blank name (a name consisting of only spaces), in
an attempt to delete the monster's existing name rather than give it a
new one.  Several of the normal messages looked incomplete due to using
the blank string as the "new name" (e.g., "I'm Feyfer, not ."), and the
one which didn't include the name still seemed a little off ("calling
names" is almost the opposite of what the player is doing).  Add a new
message for attempting to erase the name of one of the special
unnameable monsters, e.g. "Juiblex would rather keep his existing name"
or "The Oracle would rather keep her existing title".

I also noticed that the message for trying to give an unrenameable
monster the name it already has (e.g. trying to name Death "Death") was
revealing the genders of the Riders with personal pronouns.  This is
avoided elsewhere (e.g. using "the way" in mdisplacem, "its" baked
into the message in mhitm_ad_deth), so I also added a slightly rephrased
alternate message for Riders which avoids any pronouns.  For the
unnaming message, on the other hand, I just used "its" for the Riders,
since I couldn't think of a way to phrase it that avoided pronouns
entirely.

2 years agotranscription error
nhmall [Tue, 1 Nov 2022 16:58:09 +0000 (12:58 -0400)]
transcription error

2 years agomore unnecessary #undef
nhmall [Tue, 1 Nov 2022 16:52:22 +0000 (12:52 -0400)]
more unnecessary #undef

2 years agoQt: remove obsolete #undef lines
nhmall [Tue, 1 Nov 2022 16:46:10 +0000 (12:46 -0400)]
Qt: remove obsolete #undef lines

2 years agocomment thinko
PatR [Tue, 1 Nov 2022 16:29:19 +0000 (09:29 -0700)]
comment thinko

2 years agoLongbow of Diana
PatR [Tue, 1 Nov 2022 06:13:05 +0000 (23:13 -0700)]
Longbow of Diana

Give an extra +1 to potential multi-shot to rangers wielding the
Longbow of Diana and shooting any type of arrow.  When an elf ranger
has been wielding an elven bow to shoot elvish arrows or an orc
ranger has been wielding an orcish bow to shoot orcish arrows, they
lose their racial bonus but won't lose any multi-shot capability by
switching to their quest artifact.  Human and gnome rangers gain the
+1 bonus.  (I have no idea how a gnome could wield a longbow.  One
would need a step ladder to hold it vertically, and could only draw
the string back a stubby arm's length if they held if horizonally.)

That bonus gets applied before feeding the multi-shot counter to
rnd() so doesn't mean an extra arrow every time.  And you have to
be wielding your own quest artifact--in addition to it being the
appropriate launcher for the ammo you're shooting--so doesn't provide
any multi-shot benefit to other types of characters who wish for it.

2 years agorefine all_options_conds()
PatR [Tue, 1 Nov 2022 00:24:06 +0000 (17:24 -0700)]
refine all_options_conds()

Change the details of all_options_conds() which was added yesterday.
Creates the same output as then for #saveoptions.

2 years agobuild fix for NODUMPENUMS and more issue #916
PatR [Mon, 31 Oct 2022 22:43:14 +0000 (15:43 -0700)]
build fix for NODUMPENUMS and more issue #916

I made more things in dump_enums() static and/or const.  In the
process I discovered both compile problems for NODUMPENUMS and when
fixed, link problems for NODUMPENUMS+ENHANCED_SYMBOLS.

The uft8map.c portion has no changes, just reformatting.

2 years agoMerge branch 'fix-makedefs' of https://github.com/argrath/NetHack into NetHack-3.7
nhmall [Mon, 31 Oct 2022 18:20:10 +0000 (14:20 -0400)]
Merge branch 'fix-makedefs' of https://github.com/argrath/NetHack into NetHack-3.7

2 years agoomdump declaration
nhmall [Mon, 31 Oct 2022 17:29:08 +0000 (13:29 -0400)]
omdump declaration

..\src\allmain.c(1061): warning C4221: nonstandard extension used: 'ed': cannot be initialized using address of automatic variable 'omdump'
..\src\allmain.c(1056): note: see declaration of 'omdump'

Resolves #916

2 years agostatus condition options
PatR [Mon, 31 Oct 2022 07:53:10 +0000 (00:53 -0700)]
status condition options

Option parsing rejected
|OPTIONS=!cond_X
for all valid X.

Using the menu to unselect all condition options treated that as not
having made any choice and didn't make any changes.  That would be
reasonable if nothing was preselected, but things are so unselecting
all of them is a choice.  (A bizarre one, but still should be viable.)

Mostly this deals with including cond_X options when #saveoptions is
used to write a new RC file.  It now produces something like
|OPTIONS=!cond_barehanded,cond_blind,!cond_busy,cond_conf,!cond_deaf,\
|        cond_iron,cond_fly,cond_foodPois,!cond_glowhands,cond_grab,\
|        cond_hallucinat,!cond_held,!cond_ice,cond_lava,cond_levitate,\
|        !cond_paralyzed,cond_ride,!cond_sleep,cond_slime,!cond_slip,\
|        cond_stone,cond_strngl,cond_stun,!cond_submerged,cond_termIll,\
|        !cond_tethered,!cond_trap,!cond_unconscious,!cond_woundedlegs,\
|        !cond_holding
after the last alphabetical option and before the bound keys, menu
colors, and others which aren't simple OPTIONS=X settings.  This only
happens if there is already one or more OPTIONS=cond_X entries in the
old file when it was read or if 'mO' gets used to make any changes.

Not fixed:  after my RC had something similar to the above and before
I changed status conditions to accept negation, I was getting several
"the cond_ option may not both have a value and be negated" messages
written to stdout instead of the config file error handler.  So they
vanished when the screen was initialized without providing a --More--
prompt to acknowledge that they have been seen.

2 years agoremove the code for embedding SCCS ID
SHIRAKATA Kentaro [Mon, 31 Oct 2022 06:57:28 +0000 (15:57 +0900)]
remove the code for embedding SCCS ID

This code is for UNIXy build, but current UNIXy builds define GCC_WARN,
so this is never used.

(After all, embedding SCCS ID itself is out of date.)

2 years agogrammar: "foo based" to "foo-based"
nhmall [Sun, 30 Oct 2022 20:08:14 +0000 (16:08 -0400)]
grammar: "foo based" to "foo-based"

There seems to be a need to locate these in the distribution every decade or so.

2 years agotweak for #914 - attacking nothing
PatR [Sun, 30 Oct 2022 06:48:46 +0000 (23:48 -0700)]
tweak for #914 - attacking nothing

In the code that checks for attacking the edge of the map, the m_at()
that was just introduced isn't at risk of using <0,0> because of the
way 'glyph' is initialized.  But guard against future changes.

And I omitted this when checking the PR #914 commit in:
Closes #914

2 years agopull request #914 - attacks against 'thin air'
PatR [Sat, 29 Oct 2022 22:16:09 +0000 (15:16 -0700)]
pull request #914 - attacks against 'thin air'

Pull request from entrez:  hand-to-hand attack directed at an unseen
displacer beast could give strange feedback if it and hero swapped
places.

2 years agoSome displacer beast swapping tweaks
Michael Meyer [Sat, 29 Oct 2022 01:06:11 +0000 (21:06 -0400)]
Some displacer beast swapping tweaks

When fighting an unseen displacer beast mapped as an 'I' glyph on the
map, its typical ability to swap places with you was disabled and
replaced by it being treated like "thin air".  This was because
execution reaches domove_fight_empty when the target swaps places with
you.  Other than the displacement passive, this function is typically
only reached if there's no monster on the target square, so it prints
the "thin air" message and wastes a turn if you'd "expect" to attack
something (either because the player used an 'F' prefix, or because
there is an 'I' mapped on the destination square being moved into).

Hitting "thin air" seems like OK behavior for force-fighting a displacer
beast, since you are explicitly not trying to move into its spot (though
you could probably make an argument that the displacement should happen
even then, since it's the displacer beast initiating it), but the mon
being mapped as an 'I' doesn't seem like a good reason to disallow the
actual displacement from happening.

Don't treat an 'I' as "thin air" in domove_fight_empty if there's
actually a monster there, since it means there's a displacer beast
trying to swap places with you.

A couple other related changes: put an 'I' down on the map when an
unseen displacer beast swaps places with you, and use 'something' in the
'it swaps places with you' message when you didn't even realize there
was a monster there to begin with, so there's no context for the 'it' (I
used Some_Monnam at first, but the 'something' felt a little weird when
you were intentionally attacking an 'I' or warning glyph; this limits
the usage of 'something' further than Some_Monnam does).

2 years agosome C99 changes
nhmall [Sat, 29 Oct 2022 14:54:25 +0000 (10:54 -0400)]
some C99 changes

Instead of using index() macro defined to strchr, use C99 strchr.
Instead of using rindex() macro defined to strrchr, use C99 strrchr.

If you want to try building on a platform that doesn't offer those
two functions, these are available:
    define NOT_C99       /* to make some non-C99 code available */
    define NEED_INDEX    /* to define a macro for index()  */
    define NEED_RINDX    /* to define a macro for rindex() */

2 years agomore OSX -> macOS
nhmall [Sat, 29 Oct 2022 14:46:14 +0000 (10:46 -0400)]
more OSX -> macOS

2 years agofixes update for pr913 part 2
nhmall [Sat, 29 Oct 2022 14:43:58 +0000 (10:43 -0400)]
fixes update for pr913 part 2

2 years agofixes entry for pr913
nhmall [Sat, 29 Oct 2022 14:38:29 +0000 (10:38 -0400)]
fixes entry for pr913

2 years agoMerge branch 'qt6-buttons' of https://github.com/chasonr/NetHack into NetHack-3.7
nhmall [Sat, 29 Oct 2022 14:33:37 +0000 (10:33 -0400)]
Merge branch 'qt6-buttons' of https://github.com/chasonr/NetHack into NetHack-3.7

2 years agoRevert "PR913 - Another Qt 6 signal: mapped -> mappedString"
nhmall [Sat, 29 Oct 2022 14:33:17 +0000 (10:33 -0400)]
Revert "PR913 - Another Qt 6 signal: mapped -> mappedString"

This reverts commit 57617da39b36466dc7d98026394f7a526997f254.

2 years agofix RC file CHOOSE '[section] #comment'
PatR [Sat, 29 Oct 2022 06:26:39 +0000 (23:26 -0700)]
fix RC file CHOOSE '[section] #comment'

Two years ago I modified the parsing for [section] labels for the
config file's CHOOSE directive to allow end-of-line comments, but
the code used had a logic error (don't think I can blame it on
copy+paste).  It looked for '#' after ']' but allowed anything--
rather than just spaces--in between.

"[section-name]abc#comment" would become "section-name" as if the
trailing junk hadn't been present.  Parsing that should produce
"section-name]abc" and get rejected as invalid.

2 years agow_blocks()
PatR [Fri, 28 Oct 2022 23:27:41 +0000 (16:27 -0700)]
w_blocks()

Add the fix that silences whatever extra warning was enabled for the
onefile testing.  The original already worked as intended.

2 years agoanother comment typo fix
PatR [Fri, 28 Oct 2022 07:30:38 +0000 (00:30 -0700)]
another comment typo fix

2 years agoyet more knockback induced dismount
PatR [Fri, 28 Oct 2022 07:27:32 +0000 (00:27 -0700)]
yet more knockback induced dismount

The revision to directed dismount during knockback introduced a bug.
Need parentheses to prevent || that follows ?: from binding with :.

2 years agoPR913 - Another Qt 6 signal: mapped -> mappedString
Ray Chason [Fri, 28 Oct 2022 02:59:30 +0000 (22:59 -0400)]
PR913 - Another Qt 6 signal: mapped -> mappedString

2 years agoAnother Qt 6 signal: mapped -> mappedString
Ray Chason [Fri, 28 Oct 2022 02:50:17 +0000 (22:50 -0400)]
Another Qt 6 signal: mapped -> mappedString

2 years agomore Guidebook updates
nhmall [Fri, 28 Oct 2022 02:27:00 +0000 (22:27 -0400)]
more Guidebook updates

2 years agoMerge branch 'showgold-guidebook-update' of https://github.com/entrez/NetHack into...
nhmall [Fri, 28 Oct 2022 02:23:34 +0000 (22:23 -0400)]
Merge branch 'showgold-guidebook-update' of https://github.com/entrez/NetHack into NetHack-3.7

2 years agoMerge branch 'pr913' into NetHack-3.7
nhmall [Fri, 28 Oct 2022 02:15:00 +0000 (22:15 -0400)]
Merge branch 'pr913' into NetHack-3.7

2 years agoMerge branch 'qt6-buttons' of https://github.com/chasonr/NetHack into pr913
nhmall [Fri, 28 Oct 2022 02:14:13 +0000 (22:14 -0400)]
Merge branch 'qt6-buttons' of https://github.com/chasonr/NetHack into pr913

2 years agoUse idPressed signal for Qt 6
Ray Chason [Fri, 28 Oct 2022 01:51:10 +0000 (21:51 -0400)]
Use idPressed signal for Qt 6

2 years agoend-of-game disclosure for gold in invent on tty
PatR [Fri, 28 Oct 2022 00:25:14 +0000 (17:25 -0700)]
end-of-game disclosure for gold in invent on tty

Reported by entrez:  disclosing inventory at end of game did not show
gold.  Not mentioned:  only for tty.

It was using the same window as gets used for perm_invent (although
not shown _as_ perm_invent because end of game turns that off) and the
default for whether to show gold is different for tty than for other
interfaces due use of experimental TTYINV from player's environment.

Force the end of game inventory disclosure to work the same as the
dumplog inventory listing and use a different window, by falsely
telling display_inventory() that a response is requested.  Works but
the whole inventory mechanism has become quite convoluted.

2 years agomore knockback induced dismount
PatR [Thu, 27 Oct 2022 22:55:57 +0000 (15:55 -0700)]
more knockback induced dismount

When looking at the previous commit, I realized that my comment about
radius 1 was wrong.  The original code prefers dismounting to spots
that are orthogonal to the steed's position over diagonal ones.  It
doesn't say why.

2 years agoknockback knocking riding hero out of saddle
PatR [Thu, 27 Oct 2022 22:33:49 +0000 (15:33 -0700)]
knockback knocking riding hero out of saddle

I've implemented targetted dismount such that being knocked out of
the saddle will place the hero opposite the attacker in preference
to a random spot adjacent to the steed.  If that opposite spot
isn't appropriate, the two spots next to it get tried.

In these map fragments, H is knocking mounted hero off of u.  The
digits indicate priority of potential destinations.

|.....   |..21.
|...2.   |..u2.
|.Hu1.   |.H...
|...2.   |.....

If spot 1 isn't acceptable, both of spots 2 (in random order) will
be tried next.  If those aren't acceptable either, it will try the
other 5 spots adjacent to the steed (the one of those with the
attacker will always be unacceptable).  And as before, it none of
those work, it uses enexto() to pick a random spot as close to the
steed as feasible.

Not knockback:  when dismounting due to polymorph, avoid diagonal
adjacent spots if hero's new form can't move diagonally.  (The hero
can't already be in no-diagonal form because riding requires that
the rider be humanoid.  I keep thinking the restriction is "can't
be polymorphed" but that isn't correct.)

2 years agofix comment typo
PatR [Thu, 27 Oct 2022 21:52:50 +0000 (14:52 -0700)]
fix comment typo

2 years agoUpdate Guidebook #showgold info
Michael Meyer [Thu, 27 Oct 2022 19:58:51 +0000 (15:58 -0400)]
Update Guidebook #showgold info

The #showgold command now does mention known contained gold in your
inventory, so the various lines in the Guidebook which explicitly state
that it doesn't needed to be updated.  Wish I had noticed this in time
to put it into the previous Guidebook patch I submitted, but what can
you do.

2 years agobe consistent for all patforms in fixes3-7-0.txt
nhmall [Thu, 27 Oct 2022 19:49:16 +0000 (15:49 -0400)]
be consistent for all patforms in fixes3-7-0.txt

2 years agodoc/Guidebook.txt update
nhmall [Thu, 27 Oct 2022 15:33:10 +0000 (11:33 -0400)]
doc/Guidebook.txt update

2 years agoGuidebook date stamp
nhmall [Thu, 27 Oct 2022 14:47:03 +0000 (10:47 -0400)]
Guidebook date stamp

2 years agoGuidebook updates
Michael Meyer [Thu, 27 Oct 2022 14:40:54 +0000 (10:40 -0400)]
Guidebook updates

2 years agoadd a fixes entry for pull request #910
nhmall [Thu, 27 Oct 2022 14:07:32 +0000 (10:07 -0400)]
add a fixes entry for pull request #910

2 years agoMerge branch 'unicode-Qt' of https://github.com/chasonr/NetHack into NetHack-3.7
nhmall [Thu, 27 Oct 2022 14:05:04 +0000 (10:05 -0400)]
Merge branch 'unicode-Qt' of https://github.com/chasonr/NetHack into NetHack-3.7

2 years agoMerge branch 'no-urace-in-is_foo' of https://github.com/entrez/NetHack into NetHack-3.7
nhmall [Thu, 27 Oct 2022 14:04:11 +0000 (10:04 -0400)]
Merge branch 'no-urace-in-is_foo' of https://github.com/entrez/NetHack into NetHack-3.7

2 years agoRemove urace test from is_elf, etc, macros
Michael Meyer [Thu, 27 Oct 2022 02:07:04 +0000 (22:07 -0400)]
Remove urace test from is_elf, etc, macros

Reverts 690e072, which changed the various is_foo macros from this:

| #define is_elf(ptr) ((((ptr)->mflags2 & M2_ELF) != 0L)

to this:

| #define is_elf(ptr) ((((ptr)->mflags2 & M2_ELF) != 0L)     \
|                      || ((ptr) == g.youmonst.data &&       \
|                          !Upolyd && Race_if(PM_ELF)))

This is a problem because g.youmonst.data is not unique to the hero:
the '(ptr) == g.youmonst.data' test will also be true of all player
monsters of the same role.  For this reason, any of those player
monsters will be treated as sharing the hero's race, producing strange
results.  For example, if the player is an elven ranger, any ranger
player monster generated will be considered 'elven' too (so will get a
to-hit bonus when attacking orcs, etc) -- but only while the hero is
unpolymorphed.

There are already other ways of checking the hero's race in addition to
her current polyform, most notably the maybe_polyd() macro.  maybe_polyd
or something similar is already used in nearly all the cases where the
hero's race is being evaluated, meaning Race_if gets used instead when
the hero is in her natural form.  So I think the check of the hero's
race in is_foo had very little effect except for the unintended
side-effects on player monsters.

In reviewing all the uses of is_{elf,dwarf,gnome,orc,human}, I noticed
only one case that relied on the hero-race-checking behavior.  That has
been changed in this commit to use maybe_polyd (there's another 'raw'
is_human(g.youmonst.data) a few lines down, but it doesn't need
maybe_polyd since it already distinguishes between 'hero in nonhuman
polyform' vs 'nonpolyd or human polyform').  same_race(mondata.c) is
another case where &g.youmonst.data can be passed to is_foo, but
everywhere that calls it for the hero also calls your_race() or
same_race(&mons[Race_switch]) to handle the racial case.

2 years agoAdd WC2_U_UTF8STR and WC2_U_24BITCOLOR
Ray Chason [Thu, 27 Oct 2022 02:33:47 +0000 (22:33 -0400)]
Add WC2_U_UTF8STR and WC2_U_24BITCOLOR

2 years agoconfig.h band should have been left off prev
nhmall [Wed, 26 Oct 2022 18:28:29 +0000 (14:28 -0400)]
config.h band should have been left off prev

2 years agosome tabs to spaces
nhmall [Wed, 26 Oct 2022 18:21:23 +0000 (14:21 -0400)]
some tabs to spaces

    cd src
    grep -P -n '\t' *.c | grep -v "1:"
    cd ../include
    grep -P -n '\t' *.h | grep -v "1:"
    cd ..

side note: win/Qt/*.cpp are full of tabs

2 years agoanother README update
nhmall [Wed, 26 Oct 2022 14:34:22 +0000 (10:34 -0400)]
another README update

2 years agoanother README update
nhmall [Wed, 26 Oct 2022 14:29:27 +0000 (10:29 -0400)]
another README update

macOS Ventura (macOS 13) was tested
- successful NetHack build
- game start/save/restore

2 years agoREADME update
nhmall [Wed, 26 Oct 2022 13:07:44 +0000 (09:07 -0400)]
README update

2 years agoanother bit of reformatting
PatR [Wed, 26 Oct 2022 08:22:00 +0000 (01:22 -0700)]
another bit of reformatting

2 years agomore steadfast
PatR [Wed, 26 Oct 2022 08:13:01 +0000 (01:13 -0700)]
more steadfast

Make changes similar to the suggested patch from entrez:  support
for 'youmonst' as the monster passed to m_carrying().  This doesn't
change carrying(otyp) to call m_carrying(&g.youmonst,otyp) though.

Also, treat being on the Plane of Air or in an air bubble on the
Plane of Water similar to flying or levitating:  wielded Giantslayer
(or carried loadstone) doesn't prevent knockback there.

2 years agogithub pull request #909 - Qt yn prompt
PatR [Tue, 25 Oct 2022 22:33:08 +0000 (15:33 -0700)]
github pull request #909 - Qt yn prompt

Pull request from chasonr:  remove NUL characters from constructed
prompt for Qt_yn_function().  I couldn't see any with Qt 5.11 on
OSX 10.11.6, but with some font(s) or Qt newer versions they were
visible as reported in issue #566 about 15 months ago.

Closes #909

2 years agoRemove null characters from Qt y/n prompt
Ray Chason [Mon, 24 Oct 2022 02:10:20 +0000 (22:10 -0400)]
Remove null characters from Qt y/n prompt

Fixes issue #566.

2 years ago\#wizborn fix
PatR [Tue, 25 Oct 2022 20:58:26 +0000 (13:58 -0700)]
\#wizborn fix

The #wizborn command shows 'E' for an extinct species and 'G' for a
genocided one, but if a species first becomes extinct and then later
gets genocided, instead of showing both flags it stopped showing
either.  I was going to add a second flag column and show 'E' and 'G'
separately but decided to stick with one column and display 'X' for
the unlikely 'both extinct and genocided' case.

2 years agofix warning when ENHANCED_SYMBOLS is not defined
nhmall [Tue, 25 Oct 2022 18:12:47 +0000 (14:12 -0400)]
fix warning when ENHANCED_SYMBOLS is not defined

display.c:1484:23: warning: excess elements in struct initializer [-Wexcess-initializers]
    { 0U, { 0, 0}, 0, 0 }
                      ^
1 warning generated.

2 years agoRevert "fix warning when ENHANCED_SYMBOLS is not defined"
nhmall [Tue, 25 Oct 2022 18:08:17 +0000 (14:08 -0400)]
Revert "fix warning when ENHANCED_SYMBOLS is not defined"

This reverts commit 88cc5246b421f4589ebbfb693aafe1f38c2005c8.

2 years agofix warning when ENHANCED_SYMBOLS is not defined
nhmall [Tue, 25 Oct 2022 17:59:19 +0000 (13:59 -0400)]
fix warning when ENHANCED_SYMBOLS is not defined

display.c:1484:23: warning: excess elements in struct initializer [-Wexcess-initializers]
    { 0U, { 0, 0}, 0, 0 }
                      ^
1 warning generated.

2 years agorefine genocide prompting
PatR [Tue, 25 Oct 2022 10:44:07 +0000 (03:44 -0700)]
refine genocide prompting

More PR #882; give a different message for empty input than "such
creatures do not exist".

The new message mentions 'none' (with single quotes) as a potential
choice so recognize "'none'" as well as "none" to decline.

2 years agoX11 getlin()'s prompt
PatR [Tue, 25 Oct 2022 09:55:49 +0000 (02:55 -0700)]
X11 getlin()'s prompt

Reissuing getlin() with a different prompt wasn't reliably resizing the
X11 prompt widget.  After a lot of hacking away at win/X11/dialogs.c I
eventually tried setting the response portion of the widget first and
got much better results, enough to throw away the tentative changes to
dialogs.c.

There's still a lot of room from improvement but I think it would need
to replace the ghostview prompting instead of trying to massage that.

2 years agomore PR #906 - steadfastness
PatR [Mon, 24 Oct 2022 17:32:17 +0000 (10:32 -0700)]
more PR #906 - steadfastness

If someone gets hit for a knockback effect but resists it due to
wielding Giantslayer or carrying a loadstone, give feedback saying
so, otherwise the lack of knockback is indistinguishable from an
ordinary hit.

The message is not likely to appear for non-hero target since that
target needs to have special equipment.  A hero wielding Giantslayer
might see it enough for the player to become annoyed; if so,
MSGTYPE=hide could be used to suppress it.

2 years agowarning fix
nhmall [Mon, 24 Oct 2022 13:14:35 +0000 (09:14 -0400)]
warning fix

mhitm.c: In function 'hitmm':
mhitm.c:583:30: warning: '%s' directive writing between 8 and 9 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
  583 |             Sprintf(buf, "%s %s", magr_name,
      |                              ^~
In file included from ../include/config.h:671,
                 from ../include/hack.h:10,
                 from mhitm.c:6:
../include/global.h:279:24: note: 'sprintf' output between 10 and 266 bytes into a destination of size 256
  279 | #define Sprintf (void) sprintf
mhitm.c:583:13: note: in expansion of macro 'Sprintf'
  583 |             Sprintf(buf, "%s %s", magr_name,
      |             ^~~~~~~

2 years agoAdd Unicode support to Qt
Ray Chason [Mon, 24 Oct 2022 00:53:07 +0000 (20:53 -0400)]
Add Unicode support to Qt

2 years agomap documentation refinement
PatR [Sun, 23 Oct 2022 22:31:12 +0000 (15:31 -0700)]
map documentation refinement

Add minor detail to recently added map description in doc/window.txt:
origin is in upper left and positive y goes downward, so not typical
Cartesian x,y coordinate plane.

2 years agonmake warning
nhmall [Sun, 23 Oct 2022 16:38:22 +0000 (12:38 -0400)]
nmake warning

NMAKE : warning U4004: too many rules for target 'o\x86\cppregex.o'

2 years agosupport Unicode on Win32 pr #903
nhmall [Sun, 23 Oct 2022 16:34:16 +0000 (12:34 -0400)]
support Unicode on Win32 pr #903