Commit Graph
117 Commits
Author SHA1 Message Date
nhmall 50811037f3 split some code into separate files
new .h files: hacklib.h selvar.h stairs.h

new .c files: calendar.c, getpos.c, report.c, selvar.c, stairs.c,
              strutil.c, wizcmds.c

cleanup of hacklib.c and mdlib.c

hacklib contains functions that do not have to link with the core

relocate wiz commands from cmd.c to wizcmds.c

relocate CRASHREPORT stuff to report.c

relocate getpos stuff from do_name.c to getpos.c

remove temporary struct definition from extern.h

cross-compile PRE-section split into cross-pre1.370 and cross-pre2.370

Windows sys/windows/Makefile.nmake and sys/windows/Makefile.mingw32 and
visual studio project file updates

Unix sys/unix/Makefile.src, sys/unix/Makefile.utl

populate selvar.c and selvar.h

build on MS-DOS (not cross-compile) Makefile updates
for sys/msdos/Makefile.GCC (untested)

vms updates for above (untested)
2024-03-07 11:01:04 -05:00
nhmall 02074d7461 Windows Makefile updates 2024-03-03 14:15:53 -05:00
nhmall d4dabbfa8d update tested versions of Visual Studio 2024-03-01 2024-03-01 09:33:00 -05:00
RainRat a3658f85ac fix typos 2024-02-28 20:15:56 -08:00
nhmall 4478200964 update tested versions of Visual Studio 2024-02-22 2024-02-22 15:03:13 -05:00
nhmall b6ad791f5f quiet some Windows warnings; fix fatal link error 2024-02-15 21:57:36 -05:00
nhmall b96762cdf0 update tested versions of Visual Studio 2024-02-15 2024-02-15 09:29:34 -05:00
nhmall 3119bc1ec2 more Windows Makefile updates
Default to INTERNET_AVAILABLE=Y. If the build computer is not
online with the internet available, an explicit
INTERNET_AVAILABLE=N
will be required for the build, if pdcurses and Lua are not already
staged in the lib folder. That can be done by editing the appropriate line
in the Makefile, or by altering the command line:
    nmake INTERNET_AVAILABLE=N install

With Makefile.nmake:

Store pdcurses wingui and pdcurses wincon object files in separate
directories.

Rename the two pdcurses static libraries.

Because of the static library changes, the following will be required
prior to the next build:
    nmake spotless
2024-02-10 20:20:14 -05:00
nhmall 49fa532fa8 update Windows Makefiles 2024-02-09 17:42:12 -05:00
nhmall b783b3daad update tested versions of Visual Studio 2024-02-06 2024-02-06 15:33:47 -05:00
nhmall a82317e364 update tested versions of Visual Studio 2024-01-17 2024-01-17 12:28:33 -05:00
nhmall 99db2433d6 update tested versions of Visual Studio 2023-12-18 2023-12-18 23:10:34 -05:00
nhmall 370b8b2afb update tested versions of Visual Studio 2023-12-03 2023-12-03 02:22:14 -05:00
nhmall 351a1eb9d5 suffix tag files for directories in Makefile.nmake 2023-10-29 08:51:24 -04:00
nhmall e5c6bf8ec0 update tested versions of Visual Studio 2023-10-11 2023-10-11 19:52:40 -04:00
nhmall 50b213bdc5 update dependencies in Makefile.nmake Oct 2, 2023 2023-10-02 07:50:42 -04:00
nhmall cf3cbcf832 attempt to fix github issue #1104 gui build curses
Check for pdcursesmod explicitly, since it is require for
curses support under the NetHackW gui version

Closes #1104
2023-09-30 10:20:27 -04:00
nhmall 384d726b9c adjust some fmod integration bits 2023-09-23 10:01:37 -04:00
nhmall 499a3654e5 typo fix in Makefile.nmake for 3rd party soundlib 2023-09-16 09:03:42 -04:00
nhmall 8845ead907 update tested versions of Visual Studio 2023-09-14 2023-09-14 10:18:07 -04:00
nhmall 7b2a72d083 update tested versions of Visual Studio 2023-08-10 2023-08-10 09:49:54 -04:00
nhmall 536a4bd8b3 update tested versions of Visual Studio 2023-07-16 2023-07-16 12:32:42 -04:00
nhmall 81dedbe298 stick with submodule commit defined in repository
Use the submodule commit already defined in the repository
on submodule update, rather than pulling the most recent commit
in Makefiles.
2023-07-03 11:27:40 -04:00
nhmall 4d9bfccc90 update tested versions of Visual Studio 2023-06-30 2023-06-30 12:34:29 -04:00
nhmall 5688754684 update tested versions of Visual Studio 2023-06-16 2023-06-16 07:13:55 -04:00
nhmall 7eea8291ef bring Makefile.nmake to parity for PR 1028 2023-05-29 22:40:30 -04:00
nhmall b35d8a34ed update Lua version supported 2023-05-28 22:58:47 -04:00
nhmall 476f962f67 update tested versions of Visual Studio 2023-05-18 2023-05-18 22:31:45 -04:00
nhmall b71fb18c63 warning fix for Windows Visual Stdio 2023-05-01 11:00:54 -04:00
nhmall f326a9428d update tested versions of Visual Studio 2023-04-21 2023-04-21 11:58:31 -04:00
Pasi Kallinen d3e48dfad1 Tutorial: going down and up stairs
Adds the second tutorial level, tut-2.lua
2023-04-16 10:46:03 +03:00
nhmall 2185d325c4 header file changes hack.h, decl.h/.c, system.h, wintty.h
- Move secondary preprocessor defines down further in config.h
so that they can be overridden via [platform]conf.h which is
included from global.h, specifically:
    LIVELOGFILE when LIVELOG is defined
    DUMPLOG_FILE when DUMPLOG is defined

- Minimize platform-specific, or compiler-specific code in hack.h and decl.h.

- reorganize src/decl.c to align with include/decl.h.

- a new header file cstd.h added, containing calls to C99
standard header files.

- hack.h, decl.h, and decl.c have been cleaned up and had code
moved so that things line up as follows:

     hack.h     defines values that are available to all
                NetHack source files, contains enums for use in all
                NetHack source files, and contains a number of
                struct definitions for use in all NetHack source files.
                It does not contain variable declarations or variable
                definitions.

     decl.h     contains the extern declarations for variables that
                are defined in decl.c. These variables are global and
                available to all NetHack source files. The location of
                the variables within decl.h was random, so give it some
                order for now.

     decl.c     contains the definition of the variables declared in
                decl.h, and initializes them where appropriate. The
                variable definitions are laid out in much the
                same order as their declarations in decl.h.

- wintty.h: There were some varying terminal-related prototypes in
system.h, and that was the only thing left that demanded that
system.h be included. Those have been replaced by an #include
<term.h> in include/wintty.h to get the more current (and hopefully
more correct) prototypes, rather than hardcoding them in NetHack
sources.

For edge-case platform compatiblity, there is no #include <term.h>
if the build defines NO_TERMCAP_HEADERS. In that case one set of
hardcoded prototypes is still used in include/wintty.h.

The added #include "term.h" is also bypassed for NO_TERMS builds (builds
that don't link to terminfo/termcap at all, but still present a tty
interface using platform or window-port specific functions to fulfill
the same role as that of terminfo/termcap).

- some scattered, unnecessary #include "integer.h" were removed from
various files, since that's always included in current NetHack-3.7
sources, either directly from config.h or indirectly from #include
"hack.h".

- system.h references removed.

- new cstd.h added; the #include "system.h" references in Makefiles
and project files (Xcode, visual studio), were replaced
with #include "cstd.h" references. A "make depends" is probably
warranted.

Also:

 - Use of <term.h>, which defines clear_screen() as a macro, conflicts
with an actual function with that name in win/tty/termcap.c. The most
straight-forward course of action was to rename the NetHack function,
and change the references to it, from clear_screen() to
term_clear_screen(), so that was done.
2023-04-05 11:49:09 -04:00
nhmall de64ae538c update tested versions of Visual Studio 2023-03-25 2023-03-25 11:38:36 -04:00
Pasi Kallinen fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
nhmall abdc8e6cbe Revert "update Makefile.nmake"
This reverts commit 8c7922635e.
2023-02-26 09:42:35 -05:00
nhmall 8c7922635e update Makefile.nmake 2023-02-25 16:28:58 -05:00
nhmall 9168e1f30b remove a maintenance/synchronization requirement
adds a file include/seffects.h
2023-02-25 16:05:27 -05:00
nhmall db60679665 Windows: add lua files dependency 2023-02-24 17:40:35 -05:00
nhmall 700ca5a7b2 update tested versions of Visual Studio 2023-02-21 2023-02-21 23:51:02 -05:00
nhmall 36ca64acdb start to add some SOUND_TRIGGER_ACHIEVEMENTS code
Start to add supporting code to windsound and macsound. The latter
remains commented out because I haven't had a chance to try
it on macOS yet.

In order to test it out, I added two more stock sounds:
sa2_xplevelup and sa2_xpleveldown.
2023-02-04 14:28:59 -05:00
nhmall e6012ab658 Only embed wav resources if soundlib defined 2023-01-31 02:22:25 -05:00
nhmall a7b8099ecb some Makefile.nmake fixups 2023-01-30 19:24:21 -05:00
nhmall 8bb1feab61 remove a value used for a test run of nmake 2023-01-29 22:09:54 -05:00
nhmall 6ce2994646 Windows Makefiles easier soundlib opt-in or opt-out 2023-01-29 22:07:31 -05:00
nhmall 021cda2bdd transcription error 2023-01-25 23:10:51 -05:00
nhmall 8e0ed1e69d smooth use of soundlib(s) in Makefile.nmake
Related: also add a preprocesor #if defined(SND_LIB_WINDSOUND) around the
assign_soundlib() call in sys/windows/windmain.c
2023-01-25 23:05:36 -05:00
nhmall a48e32a1f9 add missing Magic_Flute files 2023-01-25 01:16:08 -05:00
SHIRAKATA Kentaro 06615b6e9e substitute non-ASCII chararacters in Makefile.nmake 2023-01-25 04:09:02 +09:00
nhmall ae6bb2420b comment out sample.c inclusion in Makefile.nmake
Makefile.nmake

A sample file that was tested for compilability was left in
the Makefile. Harmless if you have the sample.c in the right
place on your machine. Fatal to the build if you do not.

Resolves #961
2023-01-23 07:42:06 -05:00
nhmall e9e62d7ad2 follow-up for today's sound interface changes 2023-01-22 16:44:48 -05:00