Commit Graph

2399 Commits

Author SHA1 Message Date
nhmall
da08bb98e1 fix dos cross-compile attempt 2 2023-06-06 20:09:27 -04:00
nhmall
b21ef624eb fix dos cross-compile 2023-06-06 18:42:27 -04:00
nhmall
4034ec915c curses_putmixed() initial attempt
The curses interface was using genl_putmixed() which doesn't
preserve the symbol actually used for a glyph on the display.
This is a first-attempt at implementing curses_putmixed().

On Linux you'll need to distribute the Makefiles again
    sh sys/unix/setup.sh sys/unix/hints/linux.370

On macOS, you'll need to distribute the Makefiles again
    sh sys/unix/setup.sh sys/unix/hints/macOS.370
2023-06-06 17:50:08 -04:00
Ray Chason
199a76eaaa Fix compile on Qt 4 2023-06-04 18:05:09 -04:00
PatR
ecd3593163 github pull request #1030 - VDECL
The pull request from argrath would have moved the definition of
VDECL from tradstdc.h to vmsconf.h because some out of date references
to it in sys/vms/*.c were the only place it still appeared to be used.
Instead of applying that, remove those old references.

NetHack 3.7.x requires C99 so just remove VDECL since it was present
in order to support pre-ANSI compilers.  (There is at least one
comment that still mentions it though.)

This also gets rid of another chunk of tradstdc.h that was allowing
either pre-ANSI or nearly-ANSI compilers to deal with nethack's old
code.  I left the USE_STDARG/USE_VARARGS/USE_OLDARGS stuff in place
even though anything supporting C99 shouldn't need that.  Some or
all of the [UN]WIDENED_PROTOTYPES stuff is still there too.

Closes #1030
2023-05-31 01:34:11 -07:00
nhmall
102c0e3270 fix directory in Makefile.mingw32 2023-05-29 23:07:51 -04:00
nhmall
7eea8291ef bring Makefile.nmake to parity for PR 1028 2023-05-29 22:40:30 -04:00
Ray Chason
9037592ea1 parent 97edec62b5
author Ray Chason <ray.chason@protonmail.com> 1684372172 -0400
committer nhmall <nhmall@nethack.org> 1685414340 -0400

Add configuration to support Curses on WinGUI

and enable support for Unicode on Curses.

Allow NetHackW to select the Curses interface

Reorder drawing of extended command prompt

Curses on WinGUI needs this change. This may be a bug in PDCursesMod,
but it seems to be harmless to the other ports.

Avoid calling Curses after the windows are closed

Provide erase_char and kill_char for WinGUI Curses

Set Lua version to 5.4.6
2023-05-29 22:39:43 -04:00
nhmall
4bd7b79dd9 update sys/unix/hints/include/cross-pre.370 missed comment 2023-05-28 23:16:12 -04:00
nhmall
e6d94acbe1 update sys/unix/hints/include/cross-pre.370 2023-05-28 23:11:35 -04:00
nhmall
5e497ceeab sys/unix/Makefile.src 2023-05-28 23:08:39 -04:00
nhmall
b35d8a34ed update Lua version supported 2023-05-28 22:58:47 -04:00
PatR
cf8a49cae6 use to "feature" in DEBUGFILES
The code to lookup a value in DEBUGFILES usually operates on a file
name, but there are few non-file uses.  The latter wouldn't work on
VMS because of the way it was manipulating the name:  first stripping
away path, suffix, and version, then adding hardcoded ".c" suffix on.

I thought we already had a routine to get the base part of a name
from a full path, but if so, I haven't been able to find it.  This
adds new nh_basename() to do that, with the option of either keeping
or discarding the suffix or type portion.

The VMS usage that prompted this hasn't actually been tested.
2023-05-25 15:35:49 -07:00
nhmall
2876b6e8fd vmsbuild.com update 2023-05-24 19:46:33 -04:00
nhmall
65a0ff2d9a update OpenVMS com files (VSI C, NetHack-3.7) 2023-05-23 17:50:24 -04:00
nhmall
4761bf190e OpenVMS update follow-up 2023-05-22 20:50:35 -04:00
nhmall
68b8e84aa3 changes to build with VSI C compiler
The changes from past OpenVMS compilers are #ifdef'd VMS9
2023-05-22 14:43:10 -04:00
nhmall
0d116ac193 update tested OS in hints/macOS.370 2023-05-19 2023-05-19 09:48:41 -04:00
nhmall
476f962f67 update tested versions of Visual Studio 2023-05-18 2023-05-18 22:31:45 -04:00
nhmall
75e8e06dee commit 02a48aa8 split of g fixup 2023-05-17 21:17:35 -04:00
nhmall
ec9d3cb88e keep external identifiers under 31 characters length 2023-05-13 13:49:57 -04:00
PatR
65debc1adb incorporate 3.6.7+ build fix for VMS
Make sure CLR_MAX is defined when winprocs.h uses it.
sys/vms/vmsmail.c uses wintypes.h and winprocs.h without hack.h;
a change in 3.6.3 broke that but wasn't noticed until now.

I haven't added a fixes entry since we don't know whether 3.7.x
will eventually be buildable on VMS.
2023-05-10 12:47:42 -07:00
nhmall
b71fb18c63 warning fix for Windows Visual Stdio 2023-05-01 11:00:54 -04:00
nhmall
d4fb34bbb4 system.h 2023-04-23 12:29:02 -04:00
nhmall
8ec274bf2b unreachable code warning in VS uudecode build 2023-04-21 14:16:13 -04:00
nhmall
f326a9428d update tested versions of Visual Studio 2023-04-21 2023-04-21 11:58:31 -04:00
nhmall
9fd719cbf2 macOS build with latest clang from Xcode
A bunch of new warnings appeared by default on macOS compiler provided with Xcode,
including on every usage of sprintf(). Suppress those for now.

The issues with utilizing WANT_ASAN=1 on the make command line with macOS seem
to be resolved in this latest version, so allow it to be specified. Don't specify
it if using a problematic clang version.
2023-04-21 11:33:15 -04:00
nhmall
826ce951e7 get rid of NetHack macro conflict with curses routine delay_output() 2023-04-21 08:25:53 -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
85feda8774 comment out WANT_ASAN=1 for now
encountered an error testing it on macOS
2023-03-29 22:09:19 -04:00
nhmall
d783afbda1 support WANT_ASAN=1 on make command line in linux.370 and macOS.370
When the address sanitizer is in use for gcc, clang, or visual studio,
(-fsanitize=address) define the NetHack preprocessor symbol USING_ADDRESS_SANITIZER.
2023-03-29 21:39:44 -04:00
nhmall
de64ae538c update tested versions of Visual Studio 2023-03-25 2023-03-25 11:38:36 -04:00
nhmall
8f142020a1 some Windows fixes
remove a couple of extraneous files from visual studio project
remove several trailing whitespace at end of line
remove an address sanitizer bounds error during player dialog init
rework fix for darkened lit tiles (fix issue #997)
2023-03-22 11:29:10 -04:00
nhmall
64eeafc2d7 remove package from visual studio solution for now 2023-03-02 22:17:51 -05:00
nhmall
11d83bbad3 retarget Visual Studio SDK 2023-03-02 22:06:14 -05:00
nhmall
76e82d1312 fix remaining contrived issues re HANGUPHANDLING 2023-03-01 12:01:43 -05: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
d31db79558 more macOS.370 macro usage 2023-02-27 11:47:09 -05:00
nhmall
a2047714d1 fix a 'make bundle' error
make[1]: *** No rule to make target `../util/uudecode', needed by `/Users/testuser/nethack/NHsource/bundle/NetHackTerm.app/Contents/Resources/NetHackTerm.icns'.  Stop.
make: *** [bundle] Error 2
2023-02-27 11:08:51 -05: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
cb0c7e00d1 update Xcode project 2023-02-25 16:20:10 -05:00
nhmall
9168e1f30b remove a maintenance/synchronization requirement
adds a file include/seffects.h
2023-02-25 16:05:27 -05:00
nhmall
52c2ce0caf Makefile.mingw32 placement 2023-02-24 17:45:02 -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
PatR
998b5af644 non-Unix sysconf updates
For non-Unix systems, disable the "description of NetHack's command
line" entry in the help command's menu.
2023-02-21 11:15:08 -08:00
nhmall
a92ed87c93 fix recover on Linux
Also, recover should be a target-side utility, not host. That
really only makes a difference if you are cross-compiling.
2023-02-19 15:06:55 -05:00
nhmall
84390fa600 expand C99=1 with macOS.370 and linux.370 hints
In addition to C99=1 on the make command line, also allow
C89=1 or C11=1 or C23=1.

NOTE: Those won't all lead to a successful build of NetHack,
and the use of C23=1 (-std=c2x) will only be valid on recent
compiler versions (clang-15, for one, accepts it).
2023-02-18 11:35:40 -05:00