Commit Graph

14442 Commits

Author SHA1 Message Date
nhmall
583d124735 some follow-up for warnings experienced on macOS 2022-11-13 22:56:05 -05:00
nhmall
3f93d54b66 some Makefile and hints tinkering
1. remove all window interface bits from compiler.370, and have
   the preceding include files set some variables to control
   the behavior of compiler.370 when it comes to c++.
2. some more common Makefile lines into sys/unix/hints/include/multiw-3.370.
3. make it so you can pass cppregex=1 on the Make command line to build with
   sys/share/cppregex.cpp instead of posixregex.c
4. fix sys/share/cppregex.cpp so that it will build with clang compiler
   (required an additional header include). I don't know if it would have
   worked with g++ without that change. The include can be placed into an #ifdef
   block if there's an issue with the change on other compilers.
5. Anything that needs to compile using c++ (Qt, sys/share/cppregex.cpp) can
   just ensure that CPLUSPLUS_NEEDED Makefile variable is set above the lines
   in compiler.370 to ensure that things get set up for c++. It no longer
   checks specifically for Qt. That is what sys/unix/hints/include/multiw-2.370
   does now.
2022-11-13 22:25:07 -05:00
PatR
d957d70d15 reset X11's "interface has been initialized" flag
Reset 'x_inited' after the various widgets have been released
during shutdown.

This might prevent the second panic ('X11_mark_synch()' during
emergency save) in the double panic reported in a later comment of
github issue #569.  It definitely doesn't address whatever caused
the first panic, nor the poor handling of missing fonts that was
apparently responsible for #569's initial report.
2022-11-13 13:12:19 -08:00
PatR
7caa6ab8c7 winX.c
Mostly reformatting, but also initialize all output arguments in
get_window_frame_extents() in case it makes an early return.
2022-11-13 12:43:34 -08:00
nhw_cron
dbb440d86c This is cron-daily v1-May-8-2022. 000files updated: Files 2022-11-13 12:34:51 -05:00
nhmall
21203c950e multiw-3.370
Add a 3rd multi-window include file that comes after compiler.370.

Relocate a small section of Makefile lines common to both macOS.370
and linux.370 to multiw-3.370.

Also relocate a section near the tail of compiler.370 that really
has nothing to do with compilers or compiler flags, but was
related to Qt which is one of the supported multi-window interfaces.
2022-11-13 12:17:27 -05:00
PatR
a83ef812a4 streamline defsym.h
Condense the setup of PCHAR/PCHAR2 and OBJCLASS/OBJCLASS2 (last one
renamed from OBJCLASS7) so that it's easier to see the variations
at once on an ordinary size terminal/window.  Revise some of the
indentation and other spacing, also to try to enhance readability
a little.

Unrelated:  remove a trailing space that crept in with a recent pull
request.
2022-11-10 15:44:53 -08:00
nhmall
9ef7135ccd typo 2022-11-10 12:22:13 -05:00
nhmall
6864e6cf22 add a note 2022-11-10 11:57:00 -05:00
nhmall
27e311b733 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.
2022-11-10 11:47:31 -05:00
nhmall
88a0153a6e 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.
2022-11-10 11:18:49 -05:00
PatR
ea163f8865 pull request #922 - remove #ifdef GCC_WARN
Pull request from argrath:  remove another instance of #if GCC_WARN.

Fixes #922
2022-11-08 12:09:50 -08:00
SHIRAKATA Kentaro
99d974333c 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.
2022-11-08 12:09:26 -08:00
PatR
53c4d96c59 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
2022-11-08 11:57:49 -08:00
Michael Meyer
721a407454 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.
2022-11-08 11:56:10 -08:00
nhmall
9e92fefdd8 keep propertynames static in timeout.c 2022-11-06 10:02:27 -05:00
nhmall
38ff4029aa follow-up bit to fixes3-7-0.txt 2022-11-05 19:40:23 -04:00
nhmall
6b804c0e84 warning resolution
makedefs.c:100:6: warning: unused variable 'Dont_Edit_Code' [-Wunused-variable]
    *Dont_Edit_Code =
     ^
1 warning generated.
2022-11-05 19:36:46 -04:00
nhmall
993a82858b Merge branch 'old-software-compatibility' of https://github.com/chasonr/NetHack into NetHack-3.7 2022-11-05 19:30:20 -04:00
nhmall
76833d6f5e add fixes3-7-0.txt entry for pr923 2022-11-05 19:28:28 -04:00
nhmall
e0f4ad405b Merge branch 'pr923' into NetHack-3.7 2022-11-05 19:26:50 -04:00
nhmall
779d0b2f20 Merge branch 'unicode-X11-2' of https://github.com/chasonr/NetHack into pr923 2022-11-05 19:23:18 -04:00
nhmall
185322421a relocate mstrength() and supporting function again
Also, purge the code for makedefs -m
2022-11-05 18:40:57 -04:00
Ray Chason
0322ea9341 Some cleanup for non-ENHANCED_SYMBOLS build 2022-11-05 18:34:44 -04:00
Ray Chason
69d76ed4b6 Free the font structure when done
Also, adjust some comments about not supporting supplementary
characters.
2022-11-05 18:24:02 -04:00
nhmall
242c05ccf3 Revert "ranged_attk() - there can be only one"
This reverts commit b399e3f2f5.
2022-11-05 15:26:29 -04:00
nhmall
b399e3f2f5 ranged_attk() - there can be only one
Relocate the newer code for the function to mdlib.c
where makedefs can still use it.
2022-11-05 13:07:10 -04:00
nhmall
eeedff9478 prefix static version of ranged_attk() in mdlib.c 2022-11-05 12:38:02 -04:00
Ray Chason
6754b85294 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.
2022-11-05 11:56:21 -04:00
Ray Chason
0c7d42c739 Add Unicode, IBMgraphics and DECgraphics to X11 2022-11-05 00:40:04 -04:00
Ray Chason
940c37f13e Add Xlib.h
Gets us running on XFree86 3.3.5
2022-11-03 22:13:52 -04:00
Ray Chason
14b8350bce Fix inadvertent change of strchr to index
Thanks to entrez for pointing this out.
2022-11-03 19:58:56 -04:00
Ray Chason
de32aa74c7 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.
2022-11-03 19:35:41 -04:00
Ray Chason
5eaa162c82 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.
2022-11-03 19:33:30 -04:00
nhmall
cf897d9293 prefix some macro names 2022-11-03 16:50:25 -04:00
nhmall
d80e8d9569 adjust 4 line lengths from previous commit 2022-11-03 15:50:32 -04:00
nhmall
fac75f5ae4 purge more E for extern 2022-11-03 15:42:24 -04:00
PatR
f6b3b968e7 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.
2022-11-03 00:00:34 -07:00
PatR
5ac048c8a6 '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.
2022-11-02 15:56:10 -07:00
PatR
dd36d765b6 revise Guidebook.mn comment 2022-11-02 14:29:35 -07:00
PatR
8b466b227a 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
2022-11-01 16:26:29 -07:00
Michael Meyer
eebe30b037 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.
2022-11-01 16:21:47 -07:00
nhmall
39b9669725 transcription error 2022-11-01 12:58:09 -04:00
nhmall
b4080cefcb more unnecessary #undef 2022-11-01 12:52:22 -04:00
nhmall
5192191e5d Qt: remove obsolete #undef lines 2022-11-01 12:46:10 -04:00
PatR
52511cd329 comment thinko 2022-11-01 09:29:19 -07:00
PatR
55ec68ef0a 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.
2022-10-31 23:13:05 -07:00
PatR
f3579ef4a5 refine all_options_conds()
Change the details of all_options_conds() which was added yesterday.
Creates the same output as then for #saveoptions.
2022-10-31 17:24:06 -07:00
PatR
1572877429 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.
2022-10-31 15:43:14 -07:00
nhmall
068b8fde71 Merge branch 'fix-makedefs' of https://github.com/argrath/NetHack into NetHack-3.7 2022-10-31 14:20:10 -04:00