Commit Graph

177 Commits

Author SHA1 Message Date
nhmall
9bb96322a8 compile NetHack-3.7 without makedefs-generated .h files
This evolves and hopefully eases the game-build requirements by
removing game-compile dependencies on any header files generated
by the makedefs utility, including:

date.h dependency and its inclusion is removed and comparable functionality
is produced at runtime via new file src/date.c.

pm.h dependency and its inclusion is removed and comparable functionality is
produced by moving the monster definitions from monst.c into new header
file called monsters.h and altering them slightly. The former pm.h header
file #define PM_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

onames.h dependency and	its inclusion is removed and comparable functionality
is produced by moving the object definitions from objects.c into new header
file called objects.h and altering them slightly. The former onames.h header
file #define values are now replaced with appropriate emitted enum entries
during the compiler preprocessing.

artilist.h has been slightly altered, and the former onames.h artifact-related
header file #define ART_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

makedefs can still produce date.h (makedefs -v), pm.h (makedefs -p), and
onames.h (makedefs -o) for reference purposes. They won't be used during
the compiler.

The other uses for makedefs remain. They are used to prepare external
file content that the game utilizes, not prerequisite code for the
compile:
    makedefs -d    (database)
    makedefs -r    (rumors)
    makedefs -h    (oracles)
    makedefs -s    (epitaphs, engravings, bogusmons)

date.c

Pull the code for date/time stamping from mdlib.c into date.c.
Set date.o to be dependent on source files, header files, and .o files
so that date.o is rebuilt from date.c when any of those changes, thus
ensuring an accurate date/time stamp. It also includes git sha
functionality formerly done by makedefs writing #define directives
into include/date.h. For unix it passes the git info on
the compile line for date.c (via sys/unix/hints/linux.2020, macOS.2020)

nethack --dumpenums (optional, but on by default)

Allow developer to obtain some internal enum values from NetHack
without having to resort to an external utility such as
makedefs.

Uncomment #define NODUMPENUMS in config.h to disable this.

The updates to sys/windows/Makefile.gcc have not been tested yet.
2021-08-21 07:59:18 -04:00
nhmall
2baadd6a29 header files sym.h and defsym.h
There were multiple symbol-related lists that had to be kept
in sync in various places.

Consolidate some of that into a single new file
    defsym.h
with a set of morphing macros that can be custom-called from
the various places that use the sym info without maintaining
multiple occurrences. Most maintenance can be done there.

Rename monsym.h to sym.h since it looks after some
symbols not related to monsters now too.

The defsym.h header file is included in multiple places to
produce different code depending on its use and the controlling
macro definitions in place prior to including it.

Its purpose is to have a definitive source for
pchar, objclass and mon symbol maintenance.

The controlling macros used to morph the resulting code are
used in these places:
  - in include/sym.h for enums of some S_ symbol values
    (define PCHAR_ENUM, MONSYMS_ENUM prior to #include defsym.h)
  - in include/objclass.h for enums of some S_ symbol values
    (define OBJCLASS_ENUM prior to #include defsym.h)
  - in src/symbols.c for parsing S_ entries in config files
    (define PCHAR_PARSE, MONSYMS_PARSE, OBJCLASS_PARSE prior
    to #include defsym.h)
  - in src/drawing.c for initializing some data structures/arrays
    (define PCHAR_DRAWING, MONSYMS_DRAWING, OBJCLASS_DRAWING prior
    to #include defsym.h)
  - in win/share/tilemap.c for processing a tile file
    (define PCHAR_TILES prior to #include defsym.h).
2021-08-10 13:35:25 -04:00
nhmall
0a10bd632d change references from winnt to windows
rename sys/winnt to sys/windows
move vs (visual studio) folder out of win/win32 and into sys/windows
rename include/ntconf.h to include/windconf.h
rename winnt.c to windsys.c
place visual studio projects into individual subfolders.

This will hopefully resolve GitHub issue #484 as well.
2021-06-03 23:26:00 -04:00
nhmall
b851b28cbe FDECL and NDECL in sys/vms 2021-01-31 12:49:22 -05:00
nhmall
1d94e65e45 finish mapglyph() removal 2021-01-02 09:22:53 -05:00
PatR
99cc236d4a vis_tab removal for VMS
Get rid of vis_tab.{c,h}, also the commented out remnants of
{dgn_comp,lev_comp}.*, and put back sfstruct.* that erroneously
got removed along with some other stuff way back when.

Untested, and the lua stuff needs to be modularized.
2020-12-30 08:58:15 -08:00
nhmall
8c42d306f7 purge trampoli.h 2020-12-13 10:27:49 -05:00
PatR
5c291bc540 honor sysconf SHELLERS on VMS
I was looking into adding a confirmation prompt for '!' and it
isn't very promising due to sequencing issues.  (The check for
whether '!' is allowed should happen before the prompt about
running it but the latter should take place in the core rather
than in the port code.)  In the mean time, I noticed that VMS was
ignoring the SHELLERS value from SYSCF.

Untested implementation of a SHELLERS check on VMS.  Even if it
works, it should not be using $USER as the user name to verify.

Tweaks the Unix implementation of check_user_string() but doesn't
switch the testing loop to the simpler version used by VMS which
is derived from the generic users test used by Qt.
2020-11-15 18:28:20 -08:00
nhmall
f965d187b8 support for build with current Lua version 5.4.1
This may require
	make spotless
	make fetch-lua
for some platforms.
2020-11-15 11:08:10 -05:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
nhmall
c95fe8c32b Merge branch 'NetHack-3.7' into header-order3.7 2020-07-07 20:10:25 -04:00
nhmall
b967f73b96 build with the current Lua version 5.4.0 by default if not overridden 2020-07-07 17:36:23 -04:00
nhmall
1443ceecc5 more patchlevel consolidation 2020-07-07 08:55:11 -04:00
nhmall
6c0d522b1a relocate some more outdated code 2020-07-05 09:27:59 -04:00
PatR
70611afc48 splitting cmd.c, phase I
Preparation for moving enlightenment and conduct into new source
file insight.c.  Right now it's a stub that shouldn't break anything
whether included or omitted.  Once makefiles and project files have
been updated to compile and link it, the actual code will be moved.

unix/Makefile.src has been updated;
vms/Makefile.src and vmsbuild.com have been updated but not tested.
2020-02-01 08:59:19 -08:00
nhmall
efd0911f89 Merge recent changes into NetHack-3.7 2020-01-27 16:49:31 -05:00
PatR
5146827307 Another VMS tweak
One of the new paragraphs inadvertently duplicated an existing one.
2020-01-27 12:14:19 -08:00
nhmall
bd83b6e194 one more missed inconsistency and README updates 2020-01-27 15:05:45 -05:00
PatR
858bd2f376 Readme tweaks
Replace a few tabs, remove a few trailing spaces, and shorten a few
long lines.

Readme still needs another fix:  if falsely claims to contain all bug
fixes since 3.6.4.  I wasn't sure how to reword that so didn't try.

Also, fix a couple of old typos in Install.vms.
2020-01-27 11:53:18 -08:00
nhmall
86b045f80c Merge updates from 'NetHack-3.6' into NetHack-3.7-Jan2020 2020-01-27 09:02:05 -05:00
PatR
eb61690f34 Install.vms update 2020-01-27 02:20:47 -08:00
nhmall
a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
480c3eb6e0 include/lev.h is an empty header file so just get rid of it 2019-12-14 17:18:48 -05:00
nhmall
f4720edfbf include/qtext.h is an empty header so just get rid of it 2019-12-14 12:31:29 -05:00
nhmall
bc8c1f8f56 remove field-level savefile code 2019-12-08 07:27:01 -05:00
nhmall
a9c946a05f Merge branch 'NetHack-3.6' 2019-12-01 19:30:09 -05:00
nhmall
d2d40289e6 update and/or clarify some version references 2019-12-01 19:07:28 -05:00
nhmall
48852b0857 missed a part of vmsbuild.com 2019-11-27 13:48:25 -05:00
nhmall
c1dad9bb25 more lib subfolder updates 2019-11-27 13:19:45 -05:00
nhmall
392ddb2fef updates to vmsbuild.com to include lua and new 3.7 files 2019-11-12 23:41:01 -05:00
nhmall
bc0d78138f some, but not all, vms issues fixed 2019-11-12 19:58:48 -05:00
nhmall
9b0090aad9 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-08 12:28:36 -05:00
nhmall
50d04bbd61 Merge branch 'NetHack-3.6' 2019-11-07 23:10:47 -05:00
nhmall
0c5b1674ef restore use of wildcards in sys/vms/install.com (untested) 2019-11-07 19:39:11 -05:00
PatR
2058ad10f9 missing data file on vms
vms's install.com was processing bigrm-%.lev (which corresponds to
bigrm-?.lev on unix) so missed two-digit bigrm-10.lev.
2019-11-07 16:21:52 -08:00
nhmall
40c8c6894b move vms lua support bits (untested of course) 2019-11-07 18:34:51 -05:00
nhmall
5264589994 comment out unneeded levcomp and dgncomp bits on vms 3.7 build 2019-11-07 17:47:26 -05:00
nhmall
4f654b630e src and include are down 1 level in src subfolder of lua tree 2019-11-07 17:30:55 -05:00
nhmall
8d4ccf5111 attempt to add the additional include directory to vms build 2019-11-07 17:28:57 -05:00
nhmall
39972beb0d cut-and-paste error bit 2019-11-07 17:21:23 -05:00
nhmall
f2d8ff49d5 add vms lua build bits 2019-11-07 17:17:17 -05:00
PatR
f5a0e43e31 version number 3.7.0 for vms 2019-05-12 15:57:05 -07:00
PatR
048454c0c3 version number 3.6.3 for vms 2019-05-12 15:52:04 -07:00
nhmall
145bb3f172 Merge branch 'NetHack-3.6' 2019-05-10 15:01:59 -04:00
nhmall
5f56440956 instead of BETA or not, have devel states of release, wip, beta
Now that development sources are made public prior to
BETA testing, it is useful to have a work-in-progress
state prior to BETA.
2019-05-10 14:59:03 -04:00
nhmall
db25fe56a8 Merge branch 'NetHack-3.6.2' 2019-05-05 23:30:50 -04:00
PatR
a08c0ed2ab VMS update
Long overdue.  Install.vms ought to be rewritten from scratch but that
will probably never happen.
2019-05-05 16:56:58 -07:00
nhmall
42e7f6fcba Merge branch 'NetHack-3.6.2' 2019-02-23 12:16:13 -05:00
PatR
98002b3166 vms/Makefile.src - curses
Add curses dependencies to VMS Makefile.  Not tested.
2019-02-22 14:56:42 -08:00