Commit Graph

9407 Commits

Author SHA1 Message Date
Pasi Kallinen
32f2fdb135 Remove leftover level compiler header 2019-11-07 19:40:41 +02:00
Pasi Kallinen
6f5a50a538 Move and remove test files 2019-11-07 19:32:36 +02:00
Pasi Kallinen
4e438e0146 Use lua_tointeger instead of lua_tonumber 2019-11-07 19:28:58 +02:00
nhmall
293082079c suppress a warning in one lua file build 2019-11-07 12:06:40 -05:00
Pasi Kallinen
468ba1071d Remove the hints file change for extra warnings 2019-11-07 18:45:42 +02:00
Pasi Kallinen
6dca5e0a49 Fix couple warnings
Alloc failure is already handled.
2019-11-07 18:13:48 +02:00
nhmall
fecf930ac0 Makefile updates 2019-11-06 19:47:37 -05:00
nhmall
9380337963 obsolete makefiles in win/win32 2019-11-06 18:52:03 -05:00
nhmall
4053e38af1 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-06 16:53:23 -05:00
nhmall
c675b234d8 Merge branch 'NetHack-3.6' 2019-11-06 16:52:25 -05:00
nhmall
e3b69ccc43 buffer size 2019-11-06 16:51:47 -05:00
nhmall
dc0c95c521 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-06 16:49:33 -05:00
nhmall
0494152aea Merge branch 'NetHack-3.6' 2019-11-06 16:45:43 -05:00
nhmall
b11ff4dfbc Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-06 16:45:15 -05:00
nhmall
88f1d2f365 don't hardcode the version id in windmain 2019-11-06 16:44:25 -05:00
PatR
d13911495c unix USE_FCNTL vs 'perm'
Reported directly to devteam, the POSIX_TYPES subset (most? all
these days?) of Unix that defines USE_FCNTL was unlocking lock file
'perm' when done with it but wasn't explicitly closing it unless
the unlocking failed.  Triggered a valgrind complaint and could have
posed a problem if restart gets implemented for this configuraiton.
2019-11-06 10:52:48 -08:00
nhmall
223c31af0c some build fix-ups 2019-11-06 13:43:27 -05:00
nhmall
ee260b558f STATIC_OVL -> static that crept back in 2019-11-06 13:18:58 -05:00
PatR
423bce2bf6 fix #H9407 - "butterfiles"
Feedback when playing music while hallucinating misspelled
"butterflies".

Other bits in the same code (not part of #H9407):

All feedback messages while impaired gave "You produce <something>"
which was immediately followed by many of the instruments giving
their own "You produce <some other thing>."  Change the verb for the
playing-while-impaired messages to avoid having two consecutive
"you produce" ones.

Also, multiple impairments (two or more of stunned, confused, and
hallucinating) always gave the generic "what you produce is far
from music" message.  Have them sometimes ignore excess impairments
to give the message for one of those.
2019-11-06 10:06:59 -08:00
nhmall
d9c6cc35ab just make .travis.yml match current 3.7 2019-11-06 13:06:25 -05:00
nhmall
bcb627100b Merge branch 'paxed-lua-merged3' into paxed-lua-v2-merged 2019-11-06 12:56:21 -05:00
Pasi Kallinen
9cd9280276 Lua: remove dgn_comp, use lua instead 2019-11-06 18:45:10 +02:00
Pasi Kallinen
fd55d9118e Use lua for special level files
Game is playable, and should compile on linux and Windows.
Assumes you have a lua 5.3 library available.

Removes level compiler and associated files.
Replaces special level des-files with lua scripts.
Exposes some NetHack internals to lua:
 - des-table with commands to create special levels
 - nh-table with NetHack core commands
 - nhc-table with some constants
 - u-table with some player-specific data (u-struct)
 - selection userdata

Adds some rudimentary tests.

Adds new extended command #wizloadlua to run a specific script,
and #wizloaddes to run a specific level-creation script.

nhlib.lua is loaded for every lua script.

Download and untar lua:
  mkdir lib
  cd lib
  curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
  tar zxf lua-5.3.5.tar.gz

Then make nethack normally.
2019-11-06 18:43:20 +02:00
PatR
3e029d2900 attributes disclosure: experience points
Wizard mode shows the number of points needed to reach the next level
(unless already maxxed out at 30) for ^X and end of game disclosure.
Do it in normal play for the latter too.  (I think it would ok to do
that for ^X too but haven't gone that far.)

Even when it was wizard mode only, the phrasing for past tense had a
minor grammar bug, and it could make the line a little too long for
tty and curses (not sure about others) when level was high, resulting
in wrapped text.  That looked bad for tty, which first tries removing
indentation (just 1 space in this case), making that line outdented
as well as wrapped.  So change the phrasing slightly when experience
level is 'too high'.  I had a version which formatted, measured, and
re-formatted if necessary but that was overkill; simple hardcoded
rephrasing suffices particularly when measuring was against assumed
display width (80) rather than actual width.
2019-11-06 17:25:45 +02:00
nhmall
ee70762c69 add --depth 1 to git clone for travis windows test 2019-11-06 17:25:45 +02:00
nhmall
c9bba80786 add pdcurses support to travis ci windows test builds
pdcurses is obtained on-the-fly from the github source
2019-11-06 17:25:45 +02:00
nhmall
466516b125 remove "bogus" bit :) 2019-11-06 17:25:45 +02:00
nhmall
ddb5e6e8e5 lower case windows in .travis.yml 2019-11-06 17:25:44 +02:00
nhmall
43935698e0 TRAVIS CI updated to include Windows and osx testing
TRAVIS CI added Windows to their platform list in late 2018.

Update the .travis.yml file to include a pair of Windows in
machines in the testing suite, one built with visual studio
command line tools and the other with mingw gcc tools.

The visual studio build is currently using nmake with the
sys/winnt/Makefile.msc Makefile from our distribution,
That's the same process we've been using for building
our binaries, pretty much.

BRH may be able to modernize it over the next couple of
weeks to use the msbuild process instead.

I went with the HINTS environment variable on windows
for consistent self-documenting purposes, even though
the environment variable isn't used on windows.

included:
   os: linux
   Compiler: gcc C
   HINTS=linux

   os: linux
   Compiler: clang C
   HINTS=linux

   os: linux
   Compiler: gcc C
   HINTS=linux-x11

   os: linux
   Compiler: gcc C
   HINTS=linux-qt5

   os: linux
   Compiler: gcc C
   HINTS=linux-minimal

   os: windows
   language: shell
   HINTS=Windows-visual-studio

   os: windows
   HINTS=Windows-mingw

excluded:
   os: osx
   Compiler: clang
   Xcode: xcode10.2 C
   HINTS=macosx10.14
2019-11-06 17:25:44 +02:00
nhmall
29002ccf0b No PDCurses right out-of-the-box; requires an edit 2019-11-06 17:25:44 +02:00
nhmall
0c7e740b44 update Windows Makefiles to support TRAVIS CI builds 2019-11-06 17:25:44 +02:00
PatR
de44286d79 curses+EDIT_GETLIN again
Turns the "fix" in commit 319dcf4746
handled removing the default answer for single-line-prompt plus
multi-line-answer but not for multi-line-prompt plus long-enough-
answer-to-reach-another-line.  The logic wasn't quite right and I
misunderstood what is stored in linestarts[] so even correct logic
wouldn't have solved things.
2019-11-06 17:25:44 +02:00
nhmall
be94808d67 build fix for Windows if pdcurses is included after recent changes
cursmain.o : error LNK2001: unresolved external symbol _erase_char
cursmesg.o : error LNK2001: unresolved external symbol _erase_char
cursmain.o : error LNK2001: unresolved external symbol _kill_char
cursmesg.o : error LNK2001: unresolved external symbol _kill_char
2019-11-06 17:25:44 +02:00
nhmall
0b861f64e6 merge bit 2019-11-06 17:25:44 +02:00
nhmall
a7e3129919 Merge branch 'NetHack-3.6' 2019-11-05 11:02:24 -05:00
nhmall
e8c5da768e updated Guidebook.txt 2019-11-05 09:18:25 -05:00
nhmall
26121fca9a deafness left "Perhaps that why you cannot move it" message orphaned 2019-11-04 23:08:15 -05:00
nhmall
86aa5634a7 chasonr's msdos Makefile.gcc pdcurses build changes
# Please enter the commit message for your changes. Lines starting

closes #243
2019-11-04 22:50:04 -05:00
nhmall
9daa598e86 Merge branch 'chasonr-msdos-build-363' into NetHack-3.6 2019-11-04 22:47:21 -05:00
nhmall
b66a2cd093 Merge branch 'msdos-build-363' of https://github.com/chasonr/NetHack into chasonr-msdos-build-363 2019-11-04 22:46:35 -05:00
Ray Chason
59c6425f4c Deal with FreeDOS bugs when building pdcurses.a 2019-11-04 22:26:47 -05:00
nhw_cron
a778cf3e06 This is cron-daily v1-Oct-31-2019. files updated: Files 2019-11-04 21:53:52 -05:00
PatR
7efdec7f5e fix symset:curses S_tree
Symbol set changes...

curses:
  S_tree (use plus-or-minus sign instead of accidental horizontal line);
  S_bars (switch from default '#' to not-equals sign);

DECgraphics:
  S_altar (switch from default '_' to 'pi');
  S_bars (switch from 'pi' to not-equals sign);

DECgraphics_2: get rid of this commented out set since its contents are
  now folded into DECgraphics.

(The IBMgraphics one is just whitespace; delete a <space> that precedes
a <tab>.)
2019-11-04 10:42:14 -08:00
nhmall
2170b9946b Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-04 12:33:01 -05:00
nhmall
25edd16945 code maintenance bit to white-list current "You hear" instances
Flag existing occurrences of "You hear" as "Deaf-aware" so
that a grep for that string in the future doesn't need to
trigger further investigation of those.
2019-11-04 12:28:25 -05:00
PatR
fbc790a34d dipping into holy/unholy water while blind
Something I realized while following up a newsgroup post.  If you
knew an item's bless/curse state and dipped it into water while
blind, the bknown flag stayed set and you learned the item's new
bless/curse state without seeing any "glows blue/black/&c" feedback.
Clear the flag unless you know that the potion being dipped into is
water (or is clear if not water has not been discovered) and also
know the water potion's own bless/curse state.
2019-11-04 09:14:18 -08:00
Pasi Kallinen
efbef0f22c Fix unleashable message given for non-leashed monster 2019-11-04 18:58:22 +02:00
nhmall
f07bf610b8 Merge branch 'NetHack-3.6' 2019-11-04 01:18:24 -05:00
nhmall
93f95dd051 more deafness-related message corrections 2019-11-04 00:36:54 -05:00
Bart House
c92544750a Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-03 18:46:44 -08:00