Commit Graph
525 Commits
Author SHA1 Message Date
Bart House 5d2872dd4f Add stopping in the debugger when nhassert() is hit in the windows port.
When stopping in the debugger after having called impossible, the windowing
state will have been modified since the assertion was hit.  This made
examining state that caused the nhassert to fire no longer possible.
To avoid this issue, we now detect the debugger and stop in the debugger
prior to impossible.
2019-07-13 16:08:47 -07:00
Bart House 2f3da35c68 Tweaks to nhassert implementation. Change to warnings on MSC build. 2019-07-12 18:40:34 -07:00
Bart House 0ca299acb3 Added nhassert to core. 2019-07-11 22:01:39 -07:00
Bart House 3e4a0759a3 Modified nhassert_failed to call impossoible. 2019-07-11 21:13:02 -07:00
Bart House bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
nhmall 3e86b46f8a fix up Windows gcc Makefile 2019-06-30 22:19:37 -04:00
nhmall bef9799eb5 No PDCurses right out-of-the-box; requires an edit 2019-06-30 01:10:32 -04:00
nhmall 51f2d610e2 update Windows Makefiles to support TRAVIS CI builds 2019-06-30 01:09:41 -04:00
nhmall 7c7f29a2e3 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-06-28 18:59:06 -04:00
nhmall bd2cd75f7a PDCurses requires PDC_NCMOUSE for compatibility with ncurses
The PDC_NCMOUSE has to be defined on the command line
or above the #include entries in win/curses/cursmisc.c.

This does the former command line change.
2019-06-27 23:12:06 -04:00
nhmall 0b74f2adeb makedefs: add enum support when generating pm.h
Only changes pm.h content if ENUM_PM is defined when compiling
util/makedefs.c

While NON_PM and LOW_PM could be included, it would require
for the makedefs.c compile, as well as an
around their macro definitions in permonst.h so for now those
particular lines are commented out in makedefs.c
2019-06-02 17:21:35 -04:00
nhmall b51c0ebb6f clean up Windows panic results further 2019-05-28 21:24:04 -04:00
nhmall 6f71f483d2 make the rc file match the build target name for Windows 2019-05-27 18:42:25 -04:00
nhmall 23c613c42c vs 2019 update bit 2019-05-23 00:11:18 -04:00
nhmall 46d85db233 remove a debug bit from Makefile.msc 2019-05-19 11:55:05 -04:00
nhmall 811fb0174b Makefile.msc bit for Windows 2019-05-19 11:48:20 -04:00
nhmall d05ab50876 Makefile.msc update for Windows 2019-05-17 15:57:04 -04:00
nhmall bcd05308aa support version-specific dlb file
There was a post-3.6.2 discussion on a forum where someone had
tried to copy the NetHack 3.6.2 exe file overtop of an
existing NetHack 3.6.0 playground, and then try to run it.

We have never suggested trying that, nor do we attempt to
provide any backward or forward compatibility between the
supporting files found in nhdat that would allow that. Any
particular version of NetHack expects to have matching
support files designed and matched to that version.

This adds optional support for helping to prevent the
opening of nhdat containing support files from an
unmatched version of NetHack.

If you #define VERSION_IN_DLB_FILENAME in your
platform's include/*conf.h file, it will use a
name such as nhdat362, instead of plain nhdat, and
will exit more gracefully than the fault/crash
mentioned in the discussion if it doesn't find the
file it is looking for.

Developers - please note that if you do
to cause NetHack to look for an nhdat* file with
the version info appended to the name, you will likely
have to modify your build/clean/spotless mechanics
beyond the C compile itself to properly deal with the
new generated file name.
2019-05-12 14:51:26 -04:00
nhmall 24fa83e5dc Report of no error msg deliverd by NetHackw.exe for some startup issues 2019-05-11 21:55:27 -04:00
nhmall 730f9684eb vs nhsetup bit 2019-04-09 00:41:12 -04:00
nhmall 5258bb0ed4 adjust for recently released MS Visual Studio 2019
win\curses\cursstat.c(886) : error C4703: potentially uninitialized local pointer variable 'p' used
2019-04-09 00:35:02 -04:00
PatR add4d4d724 untested build fix for term_attr_fixup()
modified:
  sys/mac/mttymain.c
  sys/msdos/video.c
  sys/winnt/nttty.c
2019-04-02 07:38:57 -07:00
nhmall acc92bcacb yet more mingw w64 build
Fix:
../sys/winnt/nhraykey.c: In function 'CheckInput':
../sys/winnt/nhraykey.c:459:37: warning: type of 'mode' defaults to 'int' [-Wimplicit-int]
 int __declspec(dllexport) __stdcall CheckInput(hConIn, ir, count, numpad,
                                     ^~~~~~~~~~
2019-03-13 19:55:43 -04:00
nhmall 80683eacaf re-comment some optional Makefile lines for sys/winnt/Makefile.gcc 2019-03-12 21:32:54 -04:00
nhmall 93201e9e24 first attempt at mingw w64 build for Windows 2019-03-12 21:14:43 -04:00
nhmall d5d4aed4e1 NetHack Windows curses port build with Jan 2019 PDCurses update
Clear up some NetHack warnings with updated PDCurses by using
-DCHTYPE_32

..\win\curses\cursinvt.c(98): warning C4244: 'function': conversion from 'attr_t' to 'int', possible loss of data
..\win\curses\cursinvt.c(101): warning C4244: 'function': conversion from 'attr_t' to 'int', possible loss of data
..\win\curses\cursinvt.c(105): warning C4244: 'function': conversion from 'attr_t' to 'int', possible loss of data
2019-02-16 14:15:35 -05:00
nhmall 97fdc3f3e4 build bits - mostly for Windows
Allow sys/share/random.c to be included in the build
always, even if USE_ISAAC64 is defined, by making most
of its contents conditional in that case.

That avoids Makefile tinkering when going back and
forth between USE_ISAAC64 and not during testing.
2019-01-29 11:31:41 -05:00
nhmall f53d02f0bb Windows build bit 2019-01-28 09:44:35 -05:00
nhmall 0aa4d62a2c detect rng seed strength at runtime based on algorithm not compile time based on platform features 2019-01-28 10:32:57 +01:00
nhmall 0a430cab11 every platform provides sys_random_seed() and SYS_RANDOM_SEED goes away 2019-01-28 10:32:57 +01:00
nhmall 6c114640f5 some system-specific adjustments for RNG routines
move some system-specific seed-related stuff from hacklib.c to
a system-specific source file and #define SYS_RANDOM_SEED to
utilize it during build.

Windows changes for random seed generation using
crypto next gen (CNG) api routines.

Corresponding vms changes due to disentangling of VMS and
unix when the unix seed bits got moved (untested).
2019-01-28 10:02:08 +01:00
nhmall a6c290399b Windows warning fix 2019-01-19 11:04:26 -05:00
nhmall 83e8033f72 remove curses date.h dependency in Windows Makefiles 2018-12-30 07:58:39 -05:00
nhmall eed7c4bdd1 nttty topten output processing
switch back to using the safe routines
after tty port exits on Windows console
tty port.

Fixes H7758
1613
2018-12-29 12:26:33 -05:00
nhmall fc504dfa89 yet more Windows Makefile
Now that the dependency lines are corrected for the
correct output files in the Makefile, it revealed a
dependency on a non-existent file.
2018-12-28 12:51:11 -05:00
nhmall be67656932 More Windows Makefile corrections 2018-12-28 12:34:41 -05:00
nhmall 1cdb9c561c Windows Makefile updates 2018-12-28 12:29:12 -05:00
nhmall a2296d043f eliminate sys/share/pcsys.c from Windows build
Windows build was actually only using a single function
in there, so just add a similar function to sys/winnt/winnt.c
and eliminate the need for including sys/share/pcsys.c in
the build.
2018-12-19 06:43:00 -05:00
nhmall 42d9af1b23 don't show stubs in window port valid list 2018-12-15 23:11:52 -05:00
nhmall 1b1ea19e57 comment out PDCurses bt default again 2018-12-15 22:04:55 -05:00
nhmall 1b0719a8cc Makefile.msc update
Tell people where to find the latest PDCurses git
repository
2018-12-15 21:52:00 -05:00
nhmall be9d974c4d Makefile.msc update 2018-12-15 02:17:15 -05:00
nhmall 16cda0882c fix up PDCurses cursor placement for prompts 2018-12-14 23:08:41 -05:00
nhmall 5e37d5b5d4 commented out by default 2018-12-13 20:11:03 -05:00
nhmall 36d27b11bd pdcurses expected objs
Match the required curses obj's in most recent updates from
git clone https://git.code.sf.net/p/pdcurses/code pdcurses
2018-12-13 20:07:22 -05:00
Bart House 0cd50847fb Changes to get fuzzer working in NetHackW. 2018-12-12 21:46:14 -08:00
nhmall 56dc7e150c allow a deferred windowport init during options processing
When options processing encountered OPTIONS=windowtype:X,
the code would immediately attempt to switch over to that
windowtype right in the midst of options processing.

This stores the chosen option into
chosen_window[WINTYPELEN]
thus allowing the startup code to choose it after
options processing has been completed.
2018-12-10 00:44:18 -05:00
Bart House 04d3be930b Changes to font size and vary_msgcount options for Windows nethack ports. 2018-12-09 14:37:07 -08:00
nhmall 46d2724f58 some early startup adjustments 2018-12-09 13:09:30 -05:00
nhmall cb191e6a0e more windmain 2018-12-09 10:14:19 -05:00