]> granicus.if.org Git - nethack/log
nethack
4 years agoTweaks to nhassert implementation. Change to warnings on MSC build.
Bart House [Sat, 13 Jul 2019 01:40:34 +0000 (18:40 -0700)]
Tweaks to nhassert implementation.  Change to warnings on MSC build.

4 years agoAdded nhassert to core.
Bart House [Fri, 12 Jul 2019 05:01:39 +0000 (22:01 -0700)]
Added nhassert to core.

4 years agoModified nhassert_failed to call impossoible.
Bart House [Fri, 12 Jul 2019 03:55:27 +0000 (20:55 -0700)]
Modified nhassert_failed to call impossoible.

4 years agoRemove the remapping of snprintf to _snprintf when compiling with MSC.
Bart House [Fri, 12 Jul 2019 03:46:19 +0000 (20:46 -0700)]
Remove the remapping of snprintf to _snprintf when compiling with MSC.

_snprintf and snprintf have one very important semantic difference.
_snprintf does NOT add terminating null character when the buffer limit
is reached while snprintf guarantees a terminating null character.  It
was a mistake to make this naming change hiding the fact that the
semantics don't match what the developer might expect.

4 years agoImproved readability of topline state management.
Bart House [Thu, 11 Jul 2019 05:16:08 +0000 (22:16 -0700)]
Improved readability of topline state management.

4 years agoPrevent ghosts from being renamed
Pasi Kallinen [Sun, 18 Oct 2020 17:20:55 +0000 (20:20 +0300)]
Prevent ghosts from being renamed

(via xNetHack)

4 years agoSpitting monsters try to stay away from melee range
Pasi Kallinen [Sun, 18 Oct 2020 16:18:38 +0000 (19:18 +0300)]
Spitting monsters try to stay away from melee range

4 years agoQt status window icon alignment
PatR [Sat, 17 Oct 2020 18:10:00 +0000 (11:10 -0700)]
Qt status window icon alignment

When the game windows were initialized, the anhk icon for alignment
was centered relative to Lawful/Neutral/Chaotic label but during
the first status update it noticeably shifted left.  Non-blank
hunger or encumbrance states could change from centered to left
justified when they were present and the icon was replaced.  Oddly,
resetting the 'centered' attribute for the widget wasn't sufficient
to fix this.  Running the resize code for that widget did.  Another
case of trial and error to make things work the way they ought.

Also, don't highlight a change in alignment or dungeon location as
"got worse" if the internal numeric value went down instead of up;
always highlight as "got better" for those two fields.  There ought
to be a third choice for just "changed" but that would have been
more complicated.

4 years agoFix thinko in reset travel dest condition
Pasi Kallinen [Sat, 17 Oct 2020 13:48:07 +0000 (16:48 +0300)]
Fix thinko in reset travel dest condition

4 years agoOnly reset if we actually went to travel destination
Pasi Kallinen [Sat, 17 Oct 2020 09:13:17 +0000 (12:13 +0300)]
Only reset if we actually went to travel destination

4 years agoReset travel destination if reached via teleport
Pasi Kallinen [Sat, 17 Oct 2020 09:08:47 +0000 (12:08 +0300)]
Reset travel destination if reached via teleport

4 years agoPre-populate teleport destination prompt with travel destination
Pasi Kallinen [Fri, 16 Oct 2020 16:10:17 +0000 (19:10 +0300)]
Pre-populate teleport destination prompt with travel destination

This has been implemented in multiple variants, and seems like
a small but useful quality of life improvement.

4 years agoQt paperdoll - slight reorganization
PatR [Fri, 16 Oct 2020 01:22:26 +0000 (18:22 -0700)]
Qt paperdoll - slight reorganization

Three-way swap:  move blindfold to alt-weapon slot, alt-weapon to
quiver slot, and quiver to former blindfold slot.  Affects first
and third rows of the 6x3 grid.

Before  |After
 x H b  | b H q
 S a w  | S a w
 G C q  | G C x

[x=alt-weapon, H=helmet, b=blindfold, S=shield, a=amulet, w=weapon,
 G=gloves, C=cloak, q=quiver; bottom three rows not changed so not
 shown.]

4 years agorecognize visual studio 2019 16.7.6 in sys/winnt/Makefile.msc
nhmall [Thu, 15 Oct 2020 13:38:52 +0000 (09:38 -0400)]
recognize visual studio 2019 16.7.6 in sys/winnt/Makefile.msc

4 years agoQt paperdoll - tool tips used to describe items
PatR [Wed, 14 Oct 2020 23:06:25 +0000 (16:06 -0700)]
Qt paperdoll - tool tips used to describe items

New for Qt, moving the mouse over one of the slots in the paperdoll
inventory subset and letting it pause there will use Qt's tool tip
mechanism to give a description of the item under the pointer, if
there is one, or of what the slot would contain when there isn't.

So "e - uncursed leather gloves (being worn)" or "no gloves" when
the pointer is over the glove slot.  If you do something with the
keyboard to make the paperdoll change while the mouse is still
hovering, you'll need to move the pointer slightly to have Qt
recheck for tool tip at that spot.  It may be feasible to force
an immediate update, but I'm satisfied with how it's working.

Interestingly, you can move pointer and hover while yn_function()
has asked you to pick an inventory item and is waiting for an
answer.  Mostly useful for Take-off/Remove or #adjust.

4 years agoartifact.h formatting
PatR [Wed, 14 Oct 2020 16:25:45 +0000 (09:25 -0700)]
artifact.h formatting

The automated reformatting way back when left artifact.h in need
of manual fixup, particularly SPFX_HPHDAM.

4 years agoQt toolbar: add button for 'search'
PatR [Wed, 14 Oct 2020 10:02:55 +0000 (03:02 -0700)]
Qt toolbar: add button for 'search'

The toolbar contains do-Again, Pick up, Drop, Kick, Throw, Fire,
Eat, and Rest.  Insert Search in front of Rest since it's useful
in its own right and some players prefer it even when resting.
Includes a new 12x13 icon; a tiny magnifying glass shown straight
on is something I can manage.

4 years agoQt "Get" -> "Pick up"
PatR [Tue, 13 Oct 2020 21:05:52 +0000 (14:05 -0700)]
Qt "Get" -> "Pick up"

Both the toolbar button for pick up and the action menu entry for
pick up were labeled "Get".  That's confusing for an experienced
player who is looking for "Pick up".  Rename both of them.

Also, consolidate repetitive code used to set up toolbar buttons.

4 years agoQt toolbar 'rest' button
PatR [Tue, 13 Oct 2020 20:41:57 +0000 (13:41 -0700)]
Qt toolbar 'rest' button

An issue in the core made the "Zz" button in the Qt toolbar only
work if rest_on_space was enabled.  cmd_from_func() was returning
' ' instead of '.' for the keystroke to run the rest command.

4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Sun, 11 Oct 2020 18:30:30 +0000 (14:30 -0400)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agocron daily Files update
nhmall [Sun, 11 Oct 2020 18:29:16 +0000 (14:29 -0400)]
cron daily Files update

4 years agomore integration suggestion adoption
nhmall [Sun, 11 Oct 2020 17:42:12 +0000 (13:42 -0400)]
more integration suggestion adoption

4 years agoadopt some integration suggestions
nhmall [Sun, 11 Oct 2020 17:33:51 +0000 (13:33 -0400)]
adopt some integration suggestions

sys/lib -> sys/libnh
sys/lib/libnethackmain.c -> sys/libnh/libnhmain.c
libnethack.a -> libnh.a

4 years agoget this working: "make wasm"
nhmall [Sun, 11 Oct 2020 14:51:46 +0000 (10:51 -0400)]
get this working: "make wasm"

4 years agolibnethackmain.c includes date.h
nhmall [Sun, 11 Oct 2020 13:43:15 +0000 (09:43 -0400)]
libnethackmain.c includes date.h

4 years agofollow-up bit
nhmall [Sun, 11 Oct 2020 13:16:23 +0000 (09:16 -0400)]
follow-up bit
remove an unnecessary dependency for top Makefile wasm

4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Sun, 11 Oct 2020 13:12:02 +0000 (09:12 -0400)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agocross-compiles need not build host native lua library
nhmall [Sun, 11 Oct 2020 13:08:27 +0000 (09:08 -0400)]
cross-compiles need not build host native lua library

Because some Makefile.top dependencies triggered the build
of the host native lua library, the cross-compiles were
building it needlessly.

Make it a make variable so that it can be overridden by
cross-compile recipes in sys/unix/hints/include/cross-*.2020

4 years agocron daily Files update
nhmall [Sat, 10 Oct 2020 23:36:36 +0000 (19:36 -0400)]
cron daily Files update

4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
Bart House [Sat, 10 Oct 2020 23:28:54 +0000 (16:28 -0700)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agoUpdate files heading to reflect that we support VS 2017 and 2019.
Bart House [Sat, 10 Oct 2020 23:28:41 +0000 (16:28 -0700)]
Update files heading to reflect that we support VS 2017 and 2019.

4 years agoupdate win/win32/vs/.gitattributes text
nhmall [Sat, 10 Oct 2020 22:38:25 +0000 (18:38 -0400)]
update win/win32/vs/.gitattributes text

4 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Sat, 10 Oct 2020 22:24:07 +0000 (18:24 -0400)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

4 years agoSupport both VS 2017 and VS 2019 without making changes to project files.
Bart House [Sat, 10 Oct 2020 22:15:59 +0000 (15:15 -0700)]
Support both VS 2017 and VS 2019 without making changes to project files.
Renamed 'vs2017' folder to 'vs'.

4 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
Bart House [Sat, 10 Oct 2020 21:18:18 +0000 (14:18 -0700)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

4 years agoAdd text mentioning that LUA sources must be copied into tree.
Bart House [Sat, 10 Oct 2020 21:17:58 +0000 (14:17 -0700)]
Add text mentioning that LUA sources must be copied into tree.

4 years agomore warnings
nhmall [Sat, 10 Oct 2020 20:41:09 +0000 (16:41 -0400)]
more warnings

4 years agomore warning bits
nhmall [Sat, 10 Oct 2020 20:28:17 +0000 (16:28 -0400)]
more warning bits

4 years agofix github issue #399 - [not] fixing chest lock
PatR [Sat, 10 Oct 2020 18:46:02 +0000 (11:46 -0700)]
fix github issue #399 - [not] fixing chest lock

Use ansimpleoname() instead of doname() to describe the key or
lock pick or credit card when reporting "You can't fix a chest's
broken lock with a <foo>."  doname() includes BUC status when
known and feedback mentioning a particular bless/curse state on
the tool that can't be used to fix the lock suggests that some
other bless/curse state might be viable.

4 years agosilence some util/makdefs.c src/mdlib warnings
nhmall [Sat, 10 Oct 2020 12:55:43 +0000 (08:55 -0400)]
silence some util/makdefs.c src/mdlib warnings

In file included from makedefs.c:213:0:
../src/mdlib.c: In function ‘runtime_info_init’:
../src/mdlib.c:808:12: warning: variable ‘timeresult’ set but not used [-Wunused-but-set-variable]
     time_t timeresult;
            ^~~~~~~~~~
makedefs.c: In function ‘do_date’:
makedefs.c:1140:16: warning: unused variable ‘ind’ [-Wunused-variable]
     const char ind[] = "    ";
                ^~~
makedefs.c:1139:9: warning: unused variable ‘steps’ [-Wunused-variable]
     int steps = 0;
         ^~~~~
makedefs.c: In function ‘do_monstr’:
makedefs.c:1934:12: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
     int i, j;
            ^

4 years agoLua: Allow matching any wall
Pasi Kallinen [Sat, 10 Oct 2020 08:31:16 +0000 (11:31 +0300)]
Lua: Allow matching any wall

A 'w' in a map fragment will match any wall (IS_WALL macro):

   des.replace_terrain({ mapfragment = "w", toterrain = "F" });

4 years agofix #K2393 - brass lantern hit by water
PatR [Fri, 9 Oct 2020 19:02:26 +0000 (12:02 -0700)]
fix #K2393 - brass lantern hit by water

Don't extinguish a brass lantern when hit by water unless it is
being submerged.

4 years agounix/Makefile.utl
PatR [Fri, 9 Oct 2020 15:45:03 +0000 (08:45 -0700)]
unix/Makefile.utl

Replace use of $(LINK) with $(CLINK) or $(CXXLINK) as warranted.
When the Qt interface is enabled, the utility programs were all
(except dlb) being linked with C++ support.  That didn't cause
any problems, just looked wrong.  Link them as C instead of C++.
Two actually do need C++ support (and still have it) but both
are dead:  'tile2beos' because the source file doesn't exist (not
even in 'outdated'), 'tileedit' because it won't build with Qt5.
I didn't bother with QUIETCC support for them.

There were still a couple of references to dgn_comp (for the lint
target; just in the name of a macro, not its value); remove those.

4 years agore-enable the MSDOS cross-compile on travis-ci
nhmall [Fri, 9 Oct 2020 13:36:55 +0000 (09:36 -0400)]
re-enable the MSDOS cross-compile on travis-ci

4 years agomore wasm dependency order tinkering
nhmall [Fri, 9 Oct 2020 13:18:51 +0000 (09:18 -0400)]
more wasm dependency order tinkering

4 years agofollow-up bit
nhmall [Fri, 9 Oct 2020 13:05:56 +0000 (09:05 -0400)]
follow-up bit
make variable had changed in PRE but not in POST

4 years agomore wasm build
nhmall [Fri, 9 Oct 2020 12:54:36 +0000 (08:54 -0400)]
more wasm build

This issue
https://github.com/NetHack/NetHack/issues/398
reported some issues with the wasm build. Attempt to resolve
some of those.

4 years agocross-compile fix-up
nhmall [Fri, 9 Oct 2020 12:52:46 +0000 (08:52 -0400)]
cross-compile fix-up

4 years agoQt prompt highlighting
PatR [Thu, 8 Oct 2020 18:24:11 +0000 (11:24 -0700)]
Qt prompt highlighting

When qt_yn_function() or qt_more() is asking for a single character
response, typing anything will cause the prompt line in the message
window to stop being highlighted.  If they reject what's been typed,
they beep (--More-- doesn't start beeping until second rejection);
change both of them to also rehighlight the prompt line to give a
visual indication that the question/acknowledgement is still being
asked.

4 years agobe more consistent with CROSS_TO_target macro names for cross-compiles
nhmall [Thu, 8 Oct 2020 17:49:24 +0000 (13:49 -0400)]
be more consistent with CROSS_TO_target macro names for cross-compiles

-DCROSS_TO_MSDOS msdos cross-compile (djgpp cross-compiler)
-DCROSS_TO_AMIGA Amiga cross-compile
-DCROSS_TO_WASM wasm cross-compile (emscripten)

4 years agoQt menu hack
PatR [Thu, 8 Oct 2020 17:18:44 +0000 (10:18 -0700)]
Qt menu hack

Prevent a small inventory menu as the first one shown from forcing
all subsequent ones from being the same short height by forcing it
to have room for at least 15 lines.  Temporary hack until someone
figures out why resizing the reused WIN_INVEN isn't working.

Does not affect non-inventory menus which get created on demand and
destroyed when done so don't need to change size to fit different
contents.

4 years agofollow-up to previous
nhmall [Wed, 7 Oct 2020 13:23:41 +0000 (09:23 -0400)]
follow-up to previous

4 years agosmall monsters seeping through their shirt
nhmall [Wed, 7 Oct 2020 13:09:51 +0000 (09:09 -0400)]
small monsters seeping through their shirt

The code is slightly different than in the PR which left out the noncorporeal case.

Closes #397

4 years agoQt click-to-command
PatR [Wed, 7 Oct 2020 11:19:55 +0000 (04:19 -0700)]
Qt click-to-command

Consolidate some recently added duplicated code.

4 years agoQt status panel as command button
PatR [Tue, 6 Oct 2020 22:20:25 +0000 (15:20 -0700)]
Qt status panel as command button

Clicking on the status panel runs ^X to show character and status
information without abbreviations.  The code needed is identical
to what's now used for clicking on the paper doll inventory panel
except for the command to execute.

4 years agoQt "paperdoll" as command button
PatR [Tue, 6 Oct 2020 16:42:59 +0000 (09:42 -0700)]
Qt "paperdoll" as command button

Clicking on the paper doll inventory subset window will cause
the '*' command (#seeall) to execute.  They convey the same
information (unless multiple leashes or multiple light sources
are in use; seeall lists all of them instead of just the first
of each) but the doll shows the info with a small grid of map
tiles and seeall shows it with an inventory display of worn and
wielded items plus tools in active use.

Ideally it should show information about a specific item as a
"tool tip" when the mouse hovers over one of the doll slots.
I don't know whether I'll ever attempt to tackle that or even
if that's feasible with Qt.  Perhaps use right click instead.

4 years agoleft out of "Qt menus, mostly item counts"
PatR [Tue, 6 Oct 2020 16:15:32 +0000 (09:15 -0700)]
left out of "Qt menus, mostly item counts"

4 years agoQt menus, mostly item counts
PatR [Tue, 6 Oct 2020 16:09:09 +0000 (09:09 -0700)]
Qt menus, mostly item counts

Don't allow the user to construct a count value when operating on
a pick-none menu where counts aren't meaningful.  Unfortunately
that can still be done on pick-one or pick-any menus which don't
happen to have any entries where a count is applicable.

Allow a count to be optionally started with '#'.  Note that if
there is an entry using '#' for the selector letter (probably
inventory that has something in the overflow slot), typing '#'
will select the entry instead of initiating a count.

Flail about a bit trying to get menu size correct--failed on this
front.

4 years agoupdate Cross-compiling document for PR385 Web Assemply and libnethack
nhmall [Tue, 6 Oct 2020 15:00:33 +0000 (11:00 -0400)]
update Cross-compiling document for PR385 Web Assemply and libnethack

Credit: The initial Web Assembly cross compile was found in a pull request:
            https://github.com/NetHack/NetHack/pull/385
        by apowers313. The pull request was merged with some accompanying
        NetHack source tree integration changes in early October 2020.

Cross-compiler used: emscripten
Cross-compiler url: https://emscripten.org/docs/getting_started/downloads.html

    Here's a brief guide to obtaining the cross-compiler sources via git and
    building it on your system.

    For Ubuntu, the build prerequisite packages for building the compiler can
    be easily obtained:

        sudo apt-get install python3 cmake default-jre

    For macOS, you will need to install Xcode, git, cmake, Python 3.5 or new
    (at time of this writing).

    After installing the prerequite packages above, obtain the cross-compiler
    via git and build it from the directory of your choice using steps similar
    to these:

            git clone https://github.com/emscripten-core/emsdk.git
            cd emsdk
            git pull
            ./emsdk install latest
            ./emsdk activate latest
            source ./emsdk_env.sh

    The steps above reflect what was outlined at this url at the time
    of writing:

            https://emscripten.org/docs/getting_started/downloads.html

    That is the definitive source and trumps anything documented here.

    On your linux host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
        make fetch-lua

    On your macOS host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/macOS.2020 ; cd ../..
        make fetch-lua

    Then, cross-compile to targets/wasm as follows:

        make CROSS_TO_WASM=1

    You can build src/nethacklib.a from pull request 385 as follows:

        make WANT_LIBNH=1

    Do not add any additional windowport interfaces to your build
    (such as WANT_WIN_TTY=1 WANT_WIN_CURSES=1 WANT_WIN_X11=1 or
    WANT_WIN_QT=1) as those aren't applicable to the Web Assembly
    or nethacklib builds. A "shim" pseudo-windowport is included
    from pull request 385.

    Result: As mentioned, the wasm cross-compile will end up in
            targets/wasm and the nethacklib.a will end up
            src.

    The cross-compiler hints additions are enclosed inside ifdef sections
    and shouldn't interfere with the non-cross-compile builds using
    hints/linux.2020 or hints/macOS.2020.

4 years agoadding ; was inappropriate for BUILDMORE list of dependencies
nhmall [Tue, 6 Oct 2020 06:26:40 +0000 (02:26 -0400)]
adding ; was inappropriate for BUILDMORE list of dependencies

4 years agotemporarily turn off the msdos cross-compile on travis
nhmall [Tue, 6 Oct 2020 06:15:25 +0000 (02:15 -0400)]
temporarily turn off the msdos cross-compile on travis

4 years agotarget lua build was missing -c on cross-compile
nhmall [Tue, 6 Oct 2020 06:01:30 +0000 (02:01 -0400)]
target lua build was missing -c on cross-compile

4 years agomore wasm cross-compiling follow-up
nhmall [Tue, 6 Oct 2020 05:47:19 +0000 (01:47 -0400)]
more wasm cross-compiling follow-up

4 years agoQt menu search
PatR [Mon, 5 Oct 2020 23:26:27 +0000 (16:26 -0700)]
Qt menu search

Remove a 'TODO' for once.  Have the popup that's used to accept the
target string--after clicking on [search] or typing ':' to initiate
menu search+select operation--force keyboard focus to itself.  Menu
searching worked without this, but only if you manually clicked on
the search popup prior to typing the target string.  Failure to do
so resulted in typed characters being used to select menu entries.

4 years agoFix dropping const from params
Pasi Kallinen [Mon, 5 Oct 2020 14:17:07 +0000 (17:17 +0300)]
Fix dropping const from params

4 years agoclear a -Wshadow warning in options.c
nhmall [Mon, 5 Oct 2020 13:24:42 +0000 (09:24 -0400)]
clear a -Wshadow warning in options.c

options.c
options.c: In function ‘match_optname’:
options.c:5734:27: warning: declaration of ‘opt_name’ shadows a global declaration [-Wshadow]
 const char *user_string, *opt_name;
                           ^~~~~~~~
In file included from options.c:52:0:
../include/optlist.h:56:1: note: shadowed declaration is here
 opt_##a,
 ^
../include/optlist.h:307:5: note: in expansion of macro ‘NHOPTC’
     NHOPTC(name, PL_NSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
     ^~~~~~

4 years agocron daily Files update
nhmall [Mon, 5 Oct 2020 01:14:59 +0000 (21:14 -0400)]
cron daily Files update

4 years agoplacement of libnethack targets required adjusting
nhmall [Mon, 5 Oct 2020 01:12:03 +0000 (21:12 -0400)]
placement of libnethack targets required adjusting
From -PRE to -POST section

4 years agoupdates for LIBNH build
nhmall [Mon, 5 Oct 2020 00:48:09 +0000 (20:48 -0400)]
updates for LIBNH build

4 years agounixmain and libnethackmain diverged in the updated PR
nhmall [Mon, 5 Oct 2020 00:14:45 +0000 (20:14 -0400)]
unixmain and libnethackmain diverged in the updated PR
put unixmain back the way it was, now that libnethackmain is in the tree after all.

4 years agoMerge branch 'libnethack2' into NetHack-3.7
nhmall [Mon, 5 Oct 2020 00:13:35 +0000 (20:13 -0400)]
Merge branch 'libnethack2' into NetHack-3.7

4 years agothe .gitignore doesn't match the target locations on the merged code
nhmall [Mon, 5 Oct 2020 00:09:28 +0000 (20:09 -0400)]
the .gitignore doesn't match the target locations on the merged code

Leave it be for now.

4 years agomerging conflict fixup
nhmall [Mon, 5 Oct 2020 00:07:57 +0000 (20:07 -0400)]
merging conflict fixup

4 years agointegrate updates made to PR earlier on Oct 4
nhmall [Mon, 5 Oct 2020 00:05:29 +0000 (20:05 -0400)]
integrate updates made to PR earlier on Oct 4

4 years agoMerge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2
nhmall [Sun, 4 Oct 2020 23:51:37 +0000 (19:51 -0400)]
Merge branch 'libnethack' of https://github.com/apowers313/NetHack into libnethack2

4 years agoMakefile.src: avoid extra feedback while linking
PatR [Sun, 4 Oct 2020 23:34:59 +0000 (16:34 -0700)]
Makefile.src: avoid extra feedback while linking

Recently added cross-compile stuff had resulted in an extra line
of feedback when linking:  'true;'.  Suppress that.

Also, I think 'AWK=nawk' was needed for Solaris or maybe even
SunOS.  Switch 'make depend' to use ordinary awk by default since
most systems have Posix-compliant awk these days and OSX doesn't
have nawk.

4 years agomore friendly javascript arguments
Adam Powers [Sun, 4 Oct 2020 21:04:56 +0000 (14:04 -0700)]
more friendly javascript arguments

4 years agoadd globals, constants, and helpers
Adam Powers [Sun, 4 Oct 2020 21:03:04 +0000 (14:03 -0700)]
add globals, constants, and helpers

4 years agocron daily Files update
nhmall [Sun, 4 Oct 2020 19:26:50 +0000 (15:26 -0400)]
cron daily Files update

4 years agoupdate original documentation for pr385
nhmall [Sun, 4 Oct 2020 19:19:58 +0000 (15:19 -0400)]
update original documentation for pr385
 Changes to be committed:
modified:   sys/lib/README.md

4 years agoMerge branch 'NetHack-3.7'
nhmall [Sun, 4 Oct 2020 18:54:41 +0000 (14:54 -0400)]
Merge branch 'NetHack-3.7'

4 years agoremove two unneeded files
nhmall [Sun, 4 Oct 2020 18:51:10 +0000 (14:51 -0400)]
remove two unneeded files

4 years agolibnethack pr385
Adam Powers [Thu, 27 Aug 2020 02:22:00 +0000 (19:22 -0700)]
libnethack pr385

roll parts of pr385 into source tree

This does not take the PR as is.

Unlike the PR, this streamlines and minimizes the integration somewhat:

- use hints/include mechanism instead of creating alternative
  Makefile.dat, Makefile.src, Makefile.top, Makefile.utl in sys/lib;
  those would have been a maintenance nightmare.

- don't have alternative mkmkfile.sh and setup.sh in sys/lib.

- sys/lib/libnethackmain.c differed from sys/unix/unixmain.c by
  very little, so just place a small bit of conditional code at the
  top of sys/unix/unixmain.c instead.

- changed the conditional code bits from __EMSCRIPTEN__ to
  CROSS_TO_WASM.

- You should be able to build the wasm result by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make WANT_LIBNH all

- You should be able to build LIBNBH by:
    cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
    make fetch-lua    (<-one time)
    make CROSS_TO_WASM=1 all

As it is currently coded, winshim.c requires C99.

4 years agoinitial shim graphics
Adam Powers [Thu, 27 Aug 2020 02:17:40 +0000 (19:17 -0700)]
initial shim graphics

4 years agoQt ynaq/yn#aq dialogs
PatR [Sun, 4 Oct 2020 14:36:12 +0000 (07:36 -0700)]
Qt ynaq/yn#aq dialogs

When 'popup_dialog' is set, the Qt interface uses a popup window
for yn_function() calls and the dialog has a list of buttons, one
per potential choice.  It has been handling "yn?" and "ynq?"
questions differently from general request-one-char prompts, using
buttons "Yes", "No, and "Cancel" instead of showing individual
letters.  This extends that to "ynaq" and "yn#aq" questions and
labels 'q' reply as "Stop" instead of "Cancel" for those.  Also,
when player uses keyboard instead of mouse to answer, allow 'c'
as well as 'q' for cancel ones, 's' as well as 'q' for stop ones.

Prompt  Buttons
yn      [Yes ][ No ]
ynq     [ Yes  ][  No  ][Cancel]
ynaq    [Yes ][ No ][All ][Stop]
yn#aq   [Yes ]Count:______[ No ][All ][Stop]
rl      [ Left ][Right ]    //unchanged; included for completeness

(For contrast, when something specifies "ny" as the acceptable
choices, the buttons will just be [n][y].  Prompts for choosing
from a list of inventory letters can't accidentally match these
special cases as long as they're specified in alphabetical order.)

4 years agoupdate sys/winnt/console.rc
nhmall [Fri, 2 Oct 2020 20:01:04 +0000 (16:01 -0400)]
update sys/winnt/console.rc

4 years agoGuidebook.txt update
nhmall [Fri, 2 Oct 2020 16:32:11 +0000 (12:32 -0400)]
Guidebook.txt update

4 years agobump Guidebook date to reflect most recent changes
nhmall [Fri, 2 Oct 2020 16:29:26 +0000 (12:29 -0400)]
bump Guidebook date to reflect most recent changes

4 years agoIncrement EDITLEVEL due to safe_wait
Pasi Kallinen [Fri, 2 Oct 2020 16:11:15 +0000 (19:11 +0300)]
Increment EDITLEVEL due to safe_wait

4 years agoFix some Guidebook.tex errors
Pasi Kallinen [Fri, 2 Oct 2020 16:00:16 +0000 (19:00 +0300)]
Fix some Guidebook.tex errors

4 years agoAdd safe_wait to toggle search and wait prevention
Pasi Kallinen [Fri, 2 Oct 2020 15:50:19 +0000 (18:50 +0300)]
Add safe_wait to toggle search and wait prevention

4 years agoQt build fix
PatR [Fri, 2 Oct 2020 11:51:15 +0000 (04:51 -0700)]
Qt build fix

The failing Travis build issued about 500 lines of diagnostics
when complaining about one line of the source.  It compiled ok
for me but I use older versions of Qt library and C++ compiler.

4 years agoQt popup_dialog's count entry
PatR [Fri, 2 Oct 2020 00:59:58 +0000 (17:59 -0700)]
Qt popup_dialog's count entry

For Qt with 'popup_dialog' On, fix number entry when user types
a digit (or '#') directly onto the dialog instead of clicking
inside the Count box and then typing.  Before, that first typed
digit was starting out as selected, so typing the next digit
replaced the selection instead of getting appended to the string
of digits being constructed.  Fixed by moving the relevant code
to the KeyPress handler instead of re-executing the dialog.

Also, if a keypress is just a modifier, ignore it.  The next
event should be the actual character.  Prevents treating <shift>
(and <caps lock>!) as useless dialog responses.  Before this,
attempting to type '#' to initiate a count wouldn't work because
the <shift> part of shift+3 ended the dialog.  Now '#' works
(and is still optional; starting with a digit suffices).

4 years agovenom fixes
PatR [Thu, 1 Oct 2020 23:41:56 +0000 (16:41 -0700)]
venom fixes

Noticed when fixing 'D$'.  Some commands, including D, which should
have been handling venom weren't doing so.

I'm not sure whether I got all the applicable cases.

4 years agoggetobj bug when dropping just gold
PatR [Thu, 1 Oct 2020 23:16:26 +0000 (16:16 -0700)]
ggetobj bug when dropping just gold

Noticed when testing something unrelated: for menustyle=traditional
and =combination, when using 'D' to drop multiple items, if the
player only supplied '$' for the list of object classes of interest
then that list remained empty and all classes were processed.
Caused by retaining an old special case for gold which isn't needed
any more.

I think that it only mattered for 'D'.  Other callers of ggetobj()
don't include gold as applicable so player can't pick gold hence
can't pick just gold to trigger this.

4 years agomore recover and cross-compiling
nhmall [Thu, 1 Oct 2020 14:04:05 +0000 (10:04 -0400)]
more recover and cross-compiling

4 years agoimplement "--More--" for Qt
PatR [Thu, 1 Oct 2020 10:16:14 +0000 (03:16 -0700)]
implement "--More--" for Qt

Support MSGTYPE=stop by having qt_display_nhwindow(WIN_MESSAGE,TRUE)
issue a tty-style --More-- prompt.  For popup_dialog Off, the prompt
gets appended to the most recent message; for popup_dialog On, it is
issued via a popup and not displayed in the message window.

It accepts <space>, ^J, ^M, and ^[ (ESC) to dismiss.  There's no way
to dismiss it with the mouse (for !popup_dialog) which might need
some fix....

Several adventures along the way.  The '^C-in-parent-terminal triggers
infinite loop repeatedly complaining about "event loop already running"'
is now a one-shot complaint.  It isn't fixed but the severity of
having it happen is greatly reduced.

4 years agomake sure recover utily is built for the CROSSCOMPILE target
nhmall [Thu, 1 Oct 2020 01:45:45 +0000 (21:45 -0400)]
make sure recover utily is built for the CROSSCOMPILE target

4 years agoFire sources can ignite candles, lamps, and potions of oil
Pasi Kallinen [Wed, 30 Sep 2020 16:43:12 +0000 (19:43 +0300)]
Fire sources can ignite candles, lamps, and potions of oil

... on the floor, in monster inventory, and in hero's inventory.

Items in your inventory being ignited produce a message even if you're
blind - you can see the lit-state by viewing inventory anyway, so just
give player the message.

(via xNetHack)

4 years agoMake piranhas faster and more bitey
Pasi Kallinen [Wed, 30 Sep 2020 15:59:09 +0000 (18:59 +0300)]
Make piranhas faster and more bitey

Piranhas are pretty bland, so make them faster and give them
an extra bite attack.

(via xNetHack)