Commit Graph

8868 Commits

Author SHA1 Message Date
nhmall
d2d2887cbc leave option setting as previous (it was not part of the change) 2019-11-30 15:51:58 -05:00
nhmall
e8ef02d597 one more win_proc 2019-11-30 15:27:04 -05:00
nhmall
31cfe76b67 build with TEXTCOLOR undef'd turned up a couple of things
Also, one more has_color in obsolete sys/mac folder. Adjusted code.
2019-11-30 15:05:48 -05:00
nhmall
0843c5d922 some dead code eliminations and a couple of documentation updates 2019-11-30 13:35:14 -05:00
nhmall
42a13a1198 has_color() performance fixes
Performance profiling showed that multiple strcmpi() calls were
occurring each and every time a character was going to the map.

This update:
- honors the WC_COLOR capability
- It allows a window-port to control individual color availability should the window-port wish to do so.
- Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset.

iflags.use_color remains a master on/off switch for use of color, regardless of the capability
compiled into the game (default TRUE).

The has_color() routine, which is now a shared routine in src/windows.c, could likely be made
into a simple macro to eliminate the function call, but this update does not go that far.

This hits a lot of port files due to the window-port interface change, mostly cookie-cutter.
2019-11-30 11:44:07 -05:00
PatR
49e4dfbc0f fix teetering typo
do.c:1005:54: warning: address of function 'uescaped_shaft' will always
      evaluate to 'true' [-Wpointer-bool-conversion]
        if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) {
                                                  ~~ ^~~~~~~~~~~~~~
2019-11-29 11:38:42 -08:00
nhmall
97a61e2e95 move fixes entry to correct section 2019-11-29 12:05:21 -05:00
nhmall
fd7d0f5d52 more things considered when you're on the brink 2019-11-29 11:14:55 -05:00
nhw_cron
059e0277ff This is cron-daily v1-Nov-24-2019. guidebook updated: doc/Guidebook.txt 2019-11-28 12:32:10 -05:00
PatR
7ca572eb60 paranoid_confirmation:eating
Add 'eating' (synonym 'continue') to the list of things that can be
set via paranoid_confirmation to require "yes" instead of "y" when
the user is prompted about something, in this case "Continue eating?".

dat/opthelp was missing a few of the paranoid_confirmation choices.
2019-11-27 16:27:13 -08:00
PatR
919f0e82d8 untested curses number pad fix
This compiles ok but I don't have a number pad to test it with.
2019-11-27 15:19:52 -08:00
nhmall
a351f90476 number pad changes from pull request #247
Below is the accompanying text from the pull request on
GitHub https://github.com/NetHack/NetHack/pull/247:

> This fixes the issue brought up in https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d .
>
> I don't know why the "regular" (tty) method doesn't seem to work for him,
> but I'm going to chalk it up to a PDCurses oddity. What I do know, however,
> is that the alternate method I added a year ago or maybe longer, that allows
> numpad usage even with number_pad:0 (to retain the default keybindings in case
> an user is used to them, while keeping number pad behaviour making sense,
> similar to NetHack4+friends) was only partially implemented, for some reason.
> This adds the rest of the keys, meaning that this means of key interpretation
> should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses
> documentation, and is thus behind an ifdef -- but PDCurses, amongst other
> implementations, makes use of them.
>
> As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement,
> since some terminals interpret number_pad keys that way. I do not consider this
> a problem since they went unused in normal gameplay anyway (This does not
> interfere with menus or similar).

Closes #247
2019-11-27 17:19:55 -05:00
nhmall
a12b9c4cc3 Merge branch 'FredrIQ-numpad' into NetHack-3.6 2019-11-27 17:14:15 -05:00
nhmall
657e7e7f76 Merge branch 'NetHack-3.6' of https://github.com/FredrIQ/NetHack into FredrIQ-numpad 2019-11-27 17:04:35 -05:00
PatR
0c98a30b8d fix part of #H9467 - clairvoyance vs sensed mons
When a monster is drawn on the map, remove any "remembered, unseen
monster" glyph being shown at the same spot.  Clairvoyance shows
all monsters in vicinty, then ones which can't be seen are replaced
with the 'I' glyph (which is on the object layer or the display,
not the monster layer show is subject to different update behavior).
But subsequent monster refresh didn't get rid of it when a sensed
monster was displayed over it.  (3.6.1 included a similar fix for
warned-of monsters.)

Also during clairvoyance, don't draw an 'I' at a spot that will
immediately be refreshed with a monster because 'I' clobbers any
remembered object at the same location.
2019-11-27 11:24:23 -08:00
PatR
cc3152dc9a ignore 3.7 file if present 2019-11-27 09:53:40 -08:00
Fredrik Ljungdahl
9b42e32c3b Fix alternate number pad interpretation only working for diagonals
This fixes the issue brought up at https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d .

I don't know why the "regular" (tty) method doesn't seem to work for him,
but I'm going to chalk it up to a PDCurses oddity. What I do know, however,
is that the alternate method I added a year ago or maybe longer, that allows
numpad usage even with number_pad:0 (to retain the default keybindings in case
an user is used to them, while keeping number pad behaviour making sense,
similar to NetHack4+friends) was only partially implemented, for some reason.
This adds the rest of the keys, meaning that this means of key interpretation
should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses
documentation, and is thus behind an ifdef -- but PDCurses, amongst other
implementations, makes use of them.

As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement,
since some terminals interpret number_pad keys that way. I do not consider this
a problem since they went unused in normal gameplay anyway (This does not
interfere with menus or similar).
2019-11-27 17:08:10 +01:00
PatR
3130676077 alignment of mimicked or polymorphed altars
A reddit thread about an unaligned altar in an aligned temple was
a tipoff that mimics posing as altars didn't have any particular
alignment.  The look-at code was misusing an operloaded field of the
underlying terrain.  Pick an alignment at random when taking on the
appearance of an altar, store it in the mimic's mon->mextra->mcorpsenm
field, and have look-at use that.

Also, dropping a ring of polymorph into a sink can transform it, and
one possible outcome is an altar.  In this case, the alignment is
part of the location's topology, but code setting that up was using
Align2amask(rn2(foo)).  That's a macro which evaluates its argument
more than once.  The first evaluation was effectively a no-op.  If
the second evaluation picked lawful then the result was lawful as
intended.  But if the second picked non-lawful and the third picked
lawful, the result would end up as none-of-the-above (a value of 3
when it needs to be a single-bit mask of 1, 2, or 4).
2019-11-25 15:01:40 -08:00
PatR
2288b94ae4 fix #H9462 - segfault with levitation boots
This is similar to the helm of opposite alignment case fixed some
time ago.  Deferring the setting of foo->known until an item is fully
worn (because it used to get set earlier but gave away information if
the wear operation was interrupted) didn't take into account that foo
might end up Null in various circumstances.  So Boots_on() needs to
validate uarmf before setting uarmf->known in case putting on boots
of levitation while on a sink caused them to come right back off.

I put similar validation into all foo_on() just in case (as far as
I'm aware, only Boots_on() and Helmet_on() actually need that).
2019-11-24 15:33:16 -08:00
PatR
fe2826c856 more #H9375 - Rider bargethrough
I think the previous expression would allow moving (via swapping
places) from a pool to solid rock or closed door which was not what
was intended (but moot since there aren't any pools on the Astral
level).  This revised expression does what is intended:  can only
swap to a pool location if already located in/over (the Riders fly?
they should probably be non-breathing) another pool.
2019-11-23 09:28:08 -08:00
PatR
ce46c97e6e fix #H9375 - unintended Rider corpse suppression
Don't let Riders swap places with something (fog or ooze, perhaps)
located at a closed door spot because if it gets killed there, there
won't be any corpse and it will stop auto-reviving.

Just avoid moving to spots where mondied() won't place a corpse
instead of worrying about whether a bargethrough creature (if there
ever are any besides the Riders) might be able to survive at the
destination (so ignore pass-walls, door-opening, swimming, &c).
2019-11-22 18:16:59 -08:00
nhmall
c8af8e23c1 slash vs backslash Makefile bit 2019-11-22 07:45:43 -05:00
nhmall
7af4797671 when decl.h changes, ensure windmain is rebuilt 2019-11-22 07:40:17 -05:00
PatR
d4df876a6f docall fix
Noticed while testing something:  hero drank a potion of see invisible
and nearby invisible monster could now be seen--in theory--but I was
asked what to call the potion while the updated map was buffered.  So
I didn't see the invisible monster until after naming the potion.

pline() flushes buffered map updates, but getlin() doesn't.  I didn't
change that, but I've made docall() do so since the updated map may
make a difference in what the player can tell about whatever is being
'called'.
2019-11-22 02:46:28 -08:00
Pasi Kallinen
5cad6a15dc More hallu monsters 2019-11-22 09:24:19 +02:00
PatR
a62d6145bd fix part of #H9397 - hallucinatory mon names
Fix the issue where a hallucinatory monster name which begins with
a slash is having that stripped off as if it was a gendor and/or
personal-name flag.

The main issue was pronouns ignoring hallucination and this doesn't
attempt to address that.

Also, add new hallucinatory name "leathery-winged avian" which has
been lurking for a while.
2019-11-21 17:43:55 -08:00
nhmall
893fa4efa8 update nhusage output on Windows 2019-11-18 19:20:03 -05:00
PatR
fc2886efb4 yet more --showpaths (dumplog)
Provide a little more information when dumplog is unavailable.
While testing various permutations, I encountered a couple of
problems with conditionally declared variables.
2019-11-18 14:28:25 -08:00
nhmall
22180fc523 typo in fixes36.3 2019-11-18 16:58:43 -05:00
nhmall
a763b99afd catch up on some post-beta1 corrections 2019-11-18 16:56:52 -05:00
nhmall
41299d44ae Merge branch 'k-sound' into NetHack-3.6 2019-11-18 15:14:55 -05:00
nhmall
fbd10e4b0e some further refinements to --showpaths
The Windows data file path has to be constructed because
Windows defines VERSION_IN_DLB_FILENAME.

Keep the personal configuration file details as the last
information displayed.
2019-11-18 15:12:38 -05:00
PatR
040c13f6aa more tribute: Eric #3, Witches Abroad #10 2019-11-18 11:56:45 -08:00
PatR
516761b9bb another tribute typo: The Light Fantastic #11
Another transciption mistake ("to"; the book has "do").
2019-11-18 11:01:26 -08:00
nhmall
450957bfe9 further refine k-sound pluralization 2019-11-18 13:23:13 -05:00
Pasi Kallinen
65ccd1d89e Fix double DLB definition in linux hints file 2019-11-18 09:16:51 +02:00
nhw_cron
32e61f7dd2 This is cron-daily v1-Oct-31-2019. guidebook updated: doc/Guidebook.txt 2019-11-17 20:48:40 -05:00
nhw_cron
8a6ce7d7ef This is cron-daily v1-Oct-31-2019. files updated: Files 2019-11-17 20:34:27 -05:00
nhmall
a045763f56 date bump 2019-11-17 20:19:41 -05:00
nhmall
e85646816c mark source tree as beta, previously marked work-in-progress 2019-11-17 20:06:21 -05:00
nhmall
f4cbd4e538 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-17 19:57:18 -05:00
nhmall
f75939e27e re-enable ifdef'd out code during code sleuthing a while back 2019-11-17 19:55:50 -05:00
PatR
1301e3bd76 '--showpaths' dlb vs non-dlbb
Have the --showpaths feedback mention whether dlb is in use or not,
and show the container file name(s) when it is.  Users of prebuilt
binaries or who build with a hints file instead of picking and
choosing things in config.h might not know, and vms (if it ever
catches up with --showpaths) uses a different container name from
everybody else ("nh-data.dlb" instead of "nhdat").
2019-11-17 16:45:10 -08:00
nhmall
689775024c Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-17 19:15:02 -05:00
nhmall
57584a22d7 add some guard code to the Is_*_level macros in dungeon.h
All Is_*_level tests during early startup would test as true until
dungeon_topology was initialized in a new game or restored from
a save file. That could result in some unexpected code paths being
taken.
2019-11-17 19:13:23 -05:00
keni
e32a132a7c grammar tid 2019-11-17 18:41:03 -05:00
PatR
9ea7b074fe pager warning fix and formatting
The mapglyph() change made a variable obsolete but it got left in
(idx = SYM_PET_OVERRIDE...).  Take it out and fix up the formatting
for the block of code that had it.
2019-11-17 09:25:26 -08:00
nhmall
21e4595127 sysconf template for windows 2019-11-17 00:16:02 -05:00
nhmall
88127e2b8c Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-16 22:53:53 -05:00
nhmall
a364348098 add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding
an mgflags parameter to mapglyph() to control its behavior

 Changes to be committed:
	modified:   doc/window.doc
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/detect.c
	modified:   src/mapglyph.c
	modified:   src/pager.c
	modified:   sys/amiga/winfuncs.c
	modified:   sys/wince/mhmap.c
	modified:   win/Qt/qt_win.cpp
	modified:   win/Qt4/qt4map.cpp
	modified:   win/X11/winmap.c
	modified:   win/curses/cursdial.c
	modified:   win/curses/cursinvt.c
	modified:   win/curses/cursmain.c
	modified:   win/gem/wingem.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mhmap.c
	modified:   win/win32/mswproc.c
2019-11-16 22:49:36 -05:00