Commit Graph

7586 Commits

Author SHA1 Message Date
nhmall
ab9e28d1aa some fixes provided from Hardfought 2018-12-04 11:58:05 -05:00
nhmall
f6b7ce02d8 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-04 11:46:19 -05:00
nhmall
ec8f002d81 bit-use collision on WC2_TERM_SIZE, WC2_RESET_STATUS 2018-12-04 11:45:41 -05:00
PatR
285023acf6 fix #H7659 - accessing freed memory by cutworm()
hmon() can destroy the weapon being used, and known_hitum() would
still pass the pointer to the freed object to cutworm().  Remember the
relevant weapon attribute before using and maybe freeing the object,
then pass that attribute instead of the whole weapon.  Also pass
'more-likely-to-cut' for axes in addition to blades.

thimonst() behaved similarly, although due to much different code
paths none of the objects that might get to hmon() were then passed to
cutworm(), so it wasn't vulnerable.  But pass 'more-likely-to-cut'
for axes instead of for blades when thrown.
2018-12-03 18:57:01 -08:00
PatR
f2195c1212 more !SHELL, !SUSPEND
Update tty command completion to ignore #shell and #suspend when
they're disabled.  (Since they aren't flagged for command completion,
this should be unnoticeable.)

Update X11 extended command selection to not show shell and suspend
in the menu when they're disabled.  (Trickier than I expected.)

X11 currently rejects #suspend (at run time, not compile time) but
allows #shell.  If it was launched syncronously from a terminal
window, shell escape behaves sanely.  Otherwise, that seems like
asking for trouble.
2018-12-03 01:46:01 -08:00
Bart House
06fba14091 Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor 2018-12-02 20:23:03 -08:00
Bart House
f081e53876 Fix for NetHackW.exe menu icon rendering. 2018-12-02 20:22:47 -08:00
nhmall
5d9c172497 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-02 21:26:54 -05:00
Bart House
92612b8f0c Added some missing header files to VS2017 NetHackW project. 2018-12-02 18:15:02 -08:00
Bart House
f3dcdc7fda Splash dialog and main window handle dpi change notifications. 2018-12-02 18:09:34 -08:00
PatR
13ef86488a command handling for !SHELL and !SUSPEND
Change the command list to always include #shell and #suspend so that
a user's preferred key bindings can span platforms without worrying
about whether those exist or not.  They're still effectively no-ops
when compiled out.

'#?' suppresses them from the list of displayed commands.  Interface-
specific extended command handling may want to check new extcmd.flag
value CMD_NOT_AVAILABLE to do the same, but failing to do so shouldn't
pose a problem.  They behave sanely if executed when not supported.
2018-12-02 16:43:53 -08:00
nhmall
7e9bc20c3a Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-02 19:42:12 -05:00
nhmall
6fe706f274 'curses_display_nhmenu' should return a value
Caught by automated build test

../win/curses/cursdial.c:598:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
        ^
../win/curses/cursdial.c:605:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
2018-12-02 18:47:23 -05:00
Bart House
796bdce828 Update comment within mswin_status_string. 2018-12-02 13:35:48 -08:00
Bart House
6ee48481b1 Respect BL_FLUSH and BL_RESET indications to mswin_status_update. 2018-12-02 13:33:07 -08:00
Bart House
0f679b3109 NetHackW status hilite support improved to include support for attributes. 2018-12-02 13:25:03 -08:00
nhmall
a9ff2a296a remove slipped-in partial bits from another feature
Some bits from another feature by Tangles had
slipped into our merge of curses a while back.

Remove the partial bits as feature bits should
be complete or not at all, unless foundational
for something to come.
2018-12-02 11:54:42 -05:00
Tangles
7c025fc344 curses - reinstate guicolors 2018-12-02 11:22:54 -05:00
Tangles
c3ecb5c43d curses - don't use popup for count selection.
There are issues with dismissing the popup afterwards.  These
were not really investigated as a count-selection doesn't really
warrant a popup anyway.
2018-12-02 11:20:46 -05:00
Tangles
2af7a74b7d curses - fix hero turning into # when selecting a count of items.
Why was that line in there anyway?
2018-12-02 11:20:21 -05:00
Tangles
69d9a7a51b curses - don't autocomplete wiz cmds except in wizmode 2018-12-02 11:19:56 -05:00
Tangles
1f94456e46 curses - change some panics to impossibles. 2018-12-02 11:19:35 -05:00
nhmall
4a4b3fb8f1 add a macro to ease conditional testing based on active window port
Add WINDOWPORT macro

example:
if (WINDOWPORT("tty"))
	pline("Look at me, I'm on tty at the moment!");
2018-12-02 09:56:44 -05:00
nhmall
38b31dd9ca fix a build error in cmd.c 2018-12-02 09:45:07 -05:00
PatR
26a3a53786 Sting revisited
Replace recent "(light blue aura)" with
"(flickering light blue)" if there are 1..4 orcs,
"(glimmering light blue)" if 5..12, or
"(gleaming light blue)" if there are 13 or more, and move its place
in the formatted name.
_3.6.1_: Sting (weapon in hand) (glowing light blue)
_recent: Sting (weapon in hand) (light blue aura)
_now___: Sting (weapon in hand, flickering light blue)

The thresholds for intensity may need to be tweaked.  The start
message has been changed from "glows" to "flickers/glimmers/gleams"
and is given when the intensity changes (up or down) as well as when
first glowing.  Stop message will usually be "stops flickering" but
some form of mass kill (genocide for sure, maybe explosion, probably
not wand zap) might result in stopping directly from higher intensity.

It still "quivers" if hero is blind when there are orcs on the level,
but no name augmentation shows in inventory for that situation;
describing it as "(weapon in hand, quivering)" would be too silly.
Also, the quiver or glow intermediate message if blindness is toggled
while Sting is active only worked for make_blinded(), not for putting
on and taking off a blindfold.  Now fixed.  I think becoming blind due
to polymorphing into an eyeless form is still not handled, but there
are no eyeless creatures capable of wielding weapons so that can wait.
Polymorphing from eyeless to sighted is handled but moot for Sting.
2018-12-02 02:09:22 -08:00
PatR
9e047f871b zap.c formatting bit
that's been sitting around for a while and I want to get out of the way.
2018-12-02 01:51:23 -08:00
PatR
f12565398a debug_fuzzer vs '!' and ^Z
My sysconf allows shell escape, and the fuzzer seems fond of that.
Suppress '!' and also '^Z', although I didn't notice it execute the
latter.  Without this hack, the sequence '!', sub-shell exit, '&'
causes nethack to be killed via SIGTTOU while fiddling with terminal
settings for introff().
2018-12-01 16:43:13 -08:00
nhmall
e19ad7d2bc Remove some Windows-specific code from src/cmd.c 2018-12-01 19:24:22 -05:00
nhmall
37b5e0e479 make curses commented out by default (again) 2018-12-01 11:31:08 -05:00
nhmall
a5a51814a1 get rid of some gcc warnings with Windows build 2018-12-01 09:41:22 -05:00
Pasi Kallinen
4c9603298a glyph variable is actually used 2018-12-01 08:58:36 +02:00
nhmall
92732af7aa Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-30 20:20:05 -05:00
nhmall
802c22ed98 more gcc work for Windows
tty builds and executes
curses builds but crashes

gui - not even trying right now
2018-11-30 20:17:42 -05:00
PatR
028efc7342 X11 text popup fix
Text popups on OSX could be dismissed with <space> or <return> or
<esc> if user's X resources had 'NetHack*autofocus' set to True, but
for the default of False they ignored all keystrokes even if you
clicked inside the popup window to set focus explicitly.  Clicking
on the Close Window button of the popup's title bar was the only way
to get the popup to go away.  Fix suggested by Pasi.
2018-11-30 16:02:55 -08:00
nhmall
c0897f2f0d more Windows Makefile synch and gcc Makefile updates
The gcc-built tty version builds fully now, but it won't play.

The GUI version definitely does not build right now.
2018-11-30 18:44:37 -05:00
nhmall
8a9f98f179 curses follow-up bits
Move the curses global variable defininitions to cursmain.c.

Make the references to those global variables extern in
include/wincurs.h

Get rid of a warning:
../win/curses/cursmesg.c:379:9: warning: declaration shadows a
variable in the global scope [-Wshadow] int orig_cursor = curs_set(0);

Kludge for Visual Studio compiler: Add a stub- file for use
in Windows curses port builds to ensure that a needed #pragma
is invoked prior to compiling the file pdcscrn.c in the
PDCurses source distribution. All command line options and
compile of the file. It is unreasonable to expect a NetHack
builder to have to tinker with the PDCurses source files in
order to build NetHack. This kludge means the NetHack builder
doesn't have to.
The file stub-pdcscrn.c contains only two lines:
	#pragma warning(disable : 4996)
	#include "pdcscrn.c"
Some day, if the PDCurses sources corrects the issue, this
can go away.
2018-11-30 16:00:24 -05:00
Pasi Kallinen
75bf7c1975 X11: Disable menucolors when showing text files 2018-11-30 15:26:38 +02:00
nhmall
ad838f2236 typos 2018-11-29 22:37:54 -05:00
nhmall
7495d0f2f4 more Windows gcc cleanup
Still not finished
2018-11-29 22:32:36 -05:00
nhmall
2a2107c3a4 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-29 22:23:58 -05:00
nhmall
3811845dbf more Makefile.gcc work
Still not completed
2018-11-29 22:23:17 -05:00
PatR
bb8ba53ed9 vms/Makefile.src
Catch up with recent changes to vmsbuild.com and unix/Makefile.src.
2018-11-29 18:45:37 -08:00
PatR
4ffe088a67 workaround for ^G "senior moment"
The less said, the better.
2018-11-29 18:33:34 -08:00
PatR
351c731e06 downgrade Sting's glow
Change "(glowing light blue)" to "(light blue aura)" so that there's
less suggestion that it might function as a light source.
2018-11-29 18:19:20 -08:00
PatR
b113aa7439 more steed dismount
By creating a spot of lava, filling up the whole level, and creating
a lurker above, I managed to trigger the impossible "Dismount: can't
place former steed on map" that was added earlier today.  I also was
told that my god was displeased even though the engulfer's attack was
responsible.  This addresses both situations.  I can't trigger that
impossible any more, and only voluntary dismount blames the hero if
it's killed because there's nowhere to place it.  Hero is still blamed
for any dismount that kills the steed while flying or levitating over
dangerous terrain--hero took steed into jeopardy.
2018-11-29 18:02:52 -08:00
nhmall
5049d23ce0 make some progress on mingw build
Still not quite there yet though.
Focusing on tty (maybe curses) right now.

The gui has had significant code deviation from
prior gcc builds for windows and will take more
work.
2018-11-29 20:59:03 -05:00
nhmall
d45b8e4fb3 More Makefiles 2018-11-29 17:41:20 -05:00
nhmall
5f02f2455b more Makefile for Windows 2018-11-29 16:36:07 -05:00
nhmall
de5acee7fc Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-29 16:27:48 -05:00
nhmall
f2da47a347 Windows Makefile updates (first batch) 2018-11-29 16:27:02 -05:00