Commit Graph

1767 Commits

Author SHA1 Message Date
nhmall
55f3a015c9 Xcode project catch-up 2020-07-05 09:55:55 -04:00
nhmall
2bbfd4cce2 trailing whitespace bit 2020-07-05 09:30:17 -04:00
nhmall
6c0d522b1a relocate some more outdated code 2020-07-05 09:27:59 -04:00
nhmall
5a437b336a remove SYSFLAGS and MFLOPPY code
A check into github issue 364 confirmed that
ba6edbe5dc
had incorrectly updated the bwrite sizeof entry for sysflags.

The SYSFLAGS and MFLOPPY code is all in the outdated part of the tree, so just
remove it rather than re-correct it.

Closes #364
Closes #207
2020-07-05 08:50:13 -04:00
nhmall
e4b18f0545 fix github issue 361 to make user_sounds useful even if MSGTYPE is hidden
fixes #361

Also, experminental introduction of vt_sounddata to enable tty to pass
a sound file index to the terminal side of things where perhaps someone
can add code to something like hterm to take the information relayed by
NetHack to trigger user_sounds locally even if playing on a server.

Compile time option TTY_SOUND_ESCCODES required to build that support in.

It should be independent of TTY_TILE_ESCCODES.
2020-07-02 15:49:45 -04:00
nhmall
f365bdd254 some mingw bits to move its gui variation closer to building and running 2020-06-11 12:26:44 -04:00
nhmall
bb1a0dd60b build warning for noreturn function that does return
The warning showed up with gcc on msdos (__DJGPP__)

end.c: In function 'nh_terminate':
end.c:1729:1: warning: 'noreturn' function does return
 }
 ^
2020-06-08 14:44:29 -04:00
nhmall
2c83e2e7e1 recognize visual studio 16.6 (released spring 2020) 2020-06-03 13:40:09 -04:00
nhmall
0fed5a06db Cross-compiling, msdos Makefile 2020-05-30 08:41:20 -04:00
nhmall
1d7ee022e6 remove outdated header files from Xcode project 2020-05-23 14:08:45 -04:00
nhmall
305ad3c58e remove outdated Xcode references 2020-05-23 14:00:34 -04:00
nhmall
e726bfe98a Xcode bit 2020-05-23 13:52:17 -04:00
PatR
ed5a2ea11e unix/Makefile.top bit
Guard against SYSCFLAGS someday containing space-separated tokens.
2020-05-19 11:07:48 -07:00
nhmall
696aaf8b8d remove added hints file
append the -fno-common to the existing Makefile
2020-05-18 23:24:29 -04:00
nhmall
98ba1bdf20 travis update - have a build with and without -fno-common 2020-05-18 22:49:05 -04:00
nhmall
ee41403af2 add -fno-common build to travis 2020-05-18 22:39:49 -04:00
PatR
ce5eebcb9b fix lua tmpname() vs mkstemp() on linux
Avoid the warning that tmpname should be replaced by mkstemp by
replacing tmpname with mkstemp.  lua has code to do that but it isn't
trivial to activate while leaving the lua distribution unmodified.
[I've no idea whether nethack's usage even results in liblua ever
creating any temporary files.]

Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to
lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a
on linux with that has not.
2020-05-18 12:01:23 -07:00
nhmall
c1cd4eb0ae Windows Makefile.msc update for more recent VS 2019 2020-05-15 17:49:50 -04:00
PatR
b42535fb2c add "ec2-user" to sysconf's list of generic users
Pull request #330 would add "ec2" ("ec2-user" after dash and whatever
follows has been stripped off) to GENERICUSERS for Amazon Linux.  Now
that dashes-in-username handling has been fixed, that doesn't need to
be obscure and the full user name can be included instead.

I also added a commented out entry for PORTABLE_DEVICE_PATHS to the
default sysconf, then cloned that for Windows' sysconf.template.

Fixes #330
2020-05-15 13:49:11 -07:00
PatR
41ae223585 hyphenated Unix user names
Fix for $USER, $LOGNAME, getlogin() values that have dashes in them:
keep dash and whatever follows as part of the name instead of stripping
it off for role/race/gender/alignment.

Before:
% USER=test-bar-fem ./nethack
|Shall I pick your female Barbarian's race and alignment for you?
and character ended up named 'test'.

After:
% USER=test-bar-fem ./nethack
|Shall I pick character's race, role, gender and alignment for you?
and character ends up named 'test-bar-fem'.  However,
% ./nethack -u test-bar-fem
still behaves like the 'before' case.
|Shall I pick your female Barbarian's race and alignment for you?

Dash handling is only changed when the dash comes from user name (or
from envionment overriding user name), not from direct player input
or run-time config file.
2020-05-12 16:38:12 -07:00
nhmall
a6d84209bf msdos Makefile bit
still untested
2020-05-10 12:16:37 -04:00
nhmall
285fc69da0 Makefile updates for windows, msdos
The msdos Makefile changes are untested.
2020-05-10 12:11:17 -04:00
nhmall
390a531f16 relocate the real mode msdos code to outdated/sys/msdos 2020-05-10 11:46:07 -04:00
nhmall
c6d09a58d6 move unmaintained files into outdated folder
If an old port is resurrected to work with current version code, its files
can be relocated to the appropriate sys or win folder as required.

In the meantime, the burden of upkeep can be avoided for the stuff in the
outdated folder for now.
2020-05-10 11:24:51 -04:00
nhmall
c2fa3c36d8 dependency bit 2020-05-09 18:19:56 -04:00
nhmall
044b55a8ba sys/winnt/Makefile.gcc updates for new file (mingw) 2020-05-06 16:24:03 -04:00
nhmall
c831522e94 Xcode fixes 2020-05-06 11:35:55 -04:00
nhmall
cdf280628c split symbols bits from drawing.c; new file src/symbols.c 2020-05-06 10:55:54 -04:00
nhmall
f1d7676bfb more CROSSCOMPILE fixes 2020-05-05 14:04:29 -04:00
nhmall
aa5eb5a355 yet another host-side crosscompile fix
The host build portion using sys/msdos/Makefile1.cross) was failing because it
was attempting to compile the generated tile.o which is using hack.h.

gcc  -o../util/tilemap host_o/tilemap.o
A new ../src/tile.c has been created
gcc -c -O -I../include -I../sys/msdos -DDLB  -DUSE_TILES -DCROSSCOMPILE -DCROSSCOMPILE_HOST -ohost_o/tile.o ../src/tile.c
In file included from ../include/hack.h:201:0,
                 from ../src/tile.c:3:
../include/dungeon.h:70:5: error: unknown type name ‘lua_State’
     lua_State *themelua;   /* themerms compiled lua */
     ^
../sys/msdos/Makefile1.cross:286: recipe for target 'host_o/tile.o' failed
make: *** [host_o/tile.o] Error 1

I don't think think the tile.o is required on the host build build portion,
so it is probably an error in the Makefile. Try removing it.
2020-05-03 21:22:55 -04:00
PatR
6b2fcd7d73 X11 missing prototypes
Add some prototypes and add a new include to a couple of files that
use config.h instead of hack.h.  So sys/unix/Makefile.src has been
changed slightly.
2020-04-24 02:40:22 -07:00
Pasi Kallinen
9b74ea0b22 Shaped and themed rooms
Allows creating shaped or themed rooms for the Dungeons of Doom
via lua script.

Invalidates bones and saves.

Makefiles updated for unix/linux by adding themerms.lua, but other
OSes need to have that added.
2020-04-18 19:55:09 +03:00
Pasi Kallinen
5f9714bf92 Remove workarounds for ancient compilers 2020-04-03 08:21:08 +03:00
Pasi Kallinen
fcfa5dc267 Fail fetch-lua in Unix Makefile more gracefully
If missing curl or failing to download the lua tarball,
don't try to untar the nonexistent file.
2020-03-07 22:38:33 +02:00
nhmall
2913983c64 amiga .gitattributes bit 2020-03-06 11:04:24 -05:00
nhmall
2af37f44d4 Merge March 2020 changes into NetHack 3.7 2020-03-06 10:59:50 -05:00
nhmall
abdd3254ae updates for 3.6 March 2020 2020-03-04 10:41:57 -05:00
nhmall
1e5fd608bf update to Install.nt 2020-03-04 10:31:48 -05:00
nhmall
74b7ca1ad9 update a parameter in some ancient platforms 2020-02-26 21:53:07 -05:00
nhmall
68fdc3bbcb February 2020 options.c overhaul
combine boolean and compound options into a single allopt[] array for
processing in options.c.

move the definitions of the options into new include/optlist.h file which
uses a set of macros to define them appropriately.

during compile of options.c each option described in include/optlist.h:
   1. automatically results in a function prototype for an optfn called
      optfn_xxxx (xxxx is the option name).
   2. automatically results in an opt_xxxx enum value for referencing
      its index throughout options.c (xxxx is the option name).
   3. is used to initialize an element of the allopt[] array at index
      opt_xxxx (xxxx is the option name) based on the settings in the
      NHOPTB, NHOPTC, NHOPTP macros. Those macros only live during the
      compilation of include/optlist.h.

each optfn_xxxx() function can be called with a req id of: do_init, do_set,
get_val or do_handler.

req do_init is called from options_init, and if initialization or memory
allocation or other initialization for that particular option is needed,
it can be done in response to the init req.

req do_set is called from parseoptions() for each option it encounters
and the optfn_xxxx() function is expected to react and set the option
based on the string values that parseoptions() passes to it.

req get_val expects each optfn_xxxx() function to write the current
option value into the buffer it is passed.

req do_handler is called during doset() operations in response to player
selections most likely from the 'O' option-setting menu, but only if the
option is identified as having do_handler support in the allopts[]
'has_handler' boolean flag. Not every optfn_xxxx() does.

function special_handling() is eliminated. It's code has been redistributed
to individual handler functions for the option or purpose that they serve.

moved reglyph_darkroom() function from options.c to display.c
2020-02-26 00:24:37 -05:00
nhmall
d81c096ce6 window port interface change - add mbehavior flags to start_menu()
Provide a way to communicate additional behaviors and/or appearances
desired from NetHack window port menus.

This is foundation work for changes to follow at a future date.
2020-02-20 20:12:51 -05:00
PatR
91b569e6c4 Guidebook.dat, one-page edition of Guidebook.txt
Update sys/unix/Makefile.doc to be able to build Guidebook.dat, an
unpaginated copy of the plain text Guidebook.  It's generated from
the 'roff source rather than by attempting to post-process the
regular text Guidebook.

No doubt there are easier ways to do this.
2020-02-14 18:15:25 -08:00
nhmall
751f1f47ab Windows options dynamically
There are two executables int the windows binary, each of which
have different options and capabilities. Sharing of one dat/options
file hasn't really been an accurate approach.

Produce that information dynamically for the Windows exe files.

This impacts alt-v results.
2020-02-13 21:24:24 -05:00
nhmall
c234f5a97d version bit 2020-02-04 07:57:43 -05:00
nhmall
0f27a8e71d fix copy-and-paste error 2020-02-03 03:54:14 -05:00
nhmall
816e2285ea add recent file addition to msdos Makefile2.cross 2020-02-03 03:51:30 -05:00
nhmall
56b196772e windows vs Makefile follow-up bit 2020-02-02 21:04:45 -05:00
nhmall
80a602d344 add recent file addition to windows visual studio project and Makefile 2020-02-02 20:59:41 -05:00
nhmall
f41e0b9eec add recent file addition to Xcode project 2020-02-02 20:43:00 -05:00
nhmall
eaebc2c9e0 Merge branch 'statue-glyphs' of https://github.com/chasonr/NetHack into chasonr-statue-glyphs 2020-02-01 22:05:55 -05:00