Commit Graph

1529 Commits

Author SHA1 Message Date
Pasi Kallinen
32f2fdb135 Remove leftover level compiler header 2019-11-07 19:40:41 +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
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
88f1d2f365 don't hardcode the version id in windmain 2019-11-06 16:44:25 -05:00
nhmall
223c31af0c some build fix-ups 2019-11-06 13:43:27 -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
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
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
a7e3129919 Merge branch 'NetHack-3.6' 2019-11-05 11:02:24 -05:00
Ray Chason
59c6425f4c Deal with FreeDOS bugs when building pdcurses.a 2019-11-04 22:26:47 -05:00
nhmall
f07bf610b8 Merge branch 'NetHack-3.6' 2019-11-04 01:18:24 -05:00
Bart House
6b88a19365 Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe 2019-11-03 17:59:39 -08:00
nhmall
ffec86b244 Merge branch 'NetHack-3.6' 2019-11-02 22:53:46 -04:00
nhmall
9319e3577b use new Windows file names 2019-11-02 22:43:25 -04:00
nhmall
a259d03460 Windows Makefile catch-up bits 2019-11-02 22:33:34 -04:00
Bart House
11018da6b8 Renamed configuration file for windows to .nethackrc.
Also adjusted name of template files populated during windows builds.
2019-11-02 19:11:26 -07:00
Bart House
3a315a7c76 Make type Win10 and gWin10 local to win10.c module. 2019-11-02 12:10:13 -07:00
Bart House
0bbedb2933 Fix cut and paste error in output string. 2019-11-02 11:51:20 -07:00
Bart House
4e11038871 Merge branch 'NetHack-3.6' 2019-11-02 11:40:19 -07:00
Bart House
33149eed0e Move is_desktop_bridge() api to win10 wrapper. 2019-11-02 11:39:11 -07:00
nhmall
28a4c65caa Merge branch 'NetHack-3.6' 2019-11-02 12:12:59 -04:00
nhmall
35fc46e3eb missing constants on mingw build fix
Errors seen during build:
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1

DEFINE_KNOWN_FOLDER is using this particular definition in the mingw
header files:

rather than this one:

So, the known folder values that recent code is using such as
FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are
being declared as external constants.

That is why the error is a link error. We need to include -luuid on
the link command line because those external constants are defined
in uuid.lib.
2019-11-02 09:23:34 -04:00
nhmall
6d385661c0 Merge branch 'NetHack-3.6' 2019-11-02 01:58:32 -04:00
nhmall
3587d8aee9 bump Windows supported version in mingw-w64 sys/winnt/Makefile.gcc
mingw-w64 sys/winnt/Makefile.gcc required a Windows version bump from
0x0501 to 0x0601 (XP level to Windows 7 level) during compile in
order for the mingw system header files to include some of the
needed support for recent Windows port changes.
2019-11-02 01:03:02 -04:00
nhmall
4b163e3d55 Revert "quiet a mingw warning"
This reverts commit e33dfed456.
2019-11-01 16:33:04 -04:00
Bart House
d9d47c120b Merge branch 'NetHack-3.6' 2019-10-31 20:46:54 -07:00
nhmall
e33dfed456 quiet a mingw warning 2019-10-31 19:43:59 -04:00
nhmall
b377771849 Merge branch 'NetHack-3.6' 2019-10-31 12:26:27 -04:00
nhmall
919765f67f Windows: link with ole32.lib and shell32.lib 2019-10-31 12:16:03 -04:00
Bart House
86473526b8 Save a copy of the symbols file to symbols.save when updating. 2019-10-30 19:17:03 -07:00
nhmall
61fe703331 Merge branch 'NetHack-3.6' 2019-10-30 20:22:48 -04:00
nhmall
33d00cf0e4 attempt to get mingw building correctly after recent changes
make typedef of boolean match mingw header files
link with shell32 and ole32 as Makefile.msc now had to do
kludge some stuff missing from mingw headers in sys/winnt/windmain.c
2019-10-30 18:48:28 -04:00
nhmall
2eab66617d Merge branch 'NetHack-3.6' 2019-10-30 13:21:20 -04:00
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -07:00
nhmall
34d38dcf82 Merge branch 'NetHack-3.6' 2019-10-28 00:45:56 -04:00
nhmall
a399151d01 some symbol tweaks
A few symbol-related modifications:

- fulfill a request from a blind player to allow them to
  specify a unique/recognizable character for all pets and/or
  the player in the config file for use when using a screen
  reader (S_player_override, S_pet_override). Requires sysconf
  setting ACCESSIBILITY to be set to have an effect, although
  they can still be specified in the config file.

- Config file SYMBOLS entries were not working properly on
  the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
  specified in the config file independently.

- When values are moved into showsyms[], the overriding SYMBOLS
  or ROGUESYMBOLS entry from the config file is used if there is
  one; if there is no overriding value for a particular symbol,
  the loaded symset value is used; if there is no symset entry
  loaded for the symbol then a default symbol is used.
2019-10-27 23:12:11 -04:00
nhmall
3ccc6e5308 Merge branch 'NetHack-3.6' 2019-10-17 20:52:10 -04:00
PatR
e4f3559acc curses on unix - terminal reset needed after abort
Noticed while investigating the message loop.  If I had level files
from an interrupted game and was asked "Destroy old game?" when
starting a new one, answering 'n' left the terminal in an unusable
state.  Executing 'stty sane' (invisibly since input echo was off)
repaired things but the user shouldn't have to do that.

Change unixtty.c's error() to shut down windowing if that has been
initialized.  This might need some tweaking for tty, which will now
clear the screen before showing the startup error message.  Other
systems besides unix use unixtty.c so are affected, but I think the
change doesn't introduce anything that should cause trouble (aside
from the potential screen erasure).
2019-10-09 13:18:34 -07:00
nhmall
f32ff16ecc Merge branch 'NetHack-3.6' 2019-10-07 22:05:40 -04:00
PatR
659b3ce9a7 more unix username (#26 - validating #explore)
I had this in place at one point but must have accidentally undone it
before deciding that yesterday's patch was finished.  Defer fetching
'pw' until it's needed.
2019-10-07 14:44:32 -07:00