Commit Graph
100 Commits
Author SHA1 Message Date
nhmall c8defa67df revert to prior behavior 2018-12-16 18:52:55 -05:00
nhmall 42d9af1b23 don't show stubs in window port valid list 2018-12-15 23:11:52 -05:00
nhmall 91092cfa89 Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-15 22:58:32 -05:00
nhmall e2c78002bb Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-15 22:40:07 -05:00
nhmall 9de6c25e7e clean exit on window port init failure 2018-12-15 22:36:24 -05:00
nhmall 1b1ea19e57 comment out PDCurses bt default again 2018-12-15 22:04:55 -05:00
nhmall 91ef66b052 Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-15 22:03:44 -05:00
nhmall 31c4eba835 Guidebook bit 2018-12-15 22:03:05 -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 718c029994 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-15 19:34:56 -05:00
nhmall 902f76d1fa more win32 gui fuzzer work 2018-12-15 19:31:42 -05:00
nhmall bebc92f6fb more win32 gui fuzzer work 2018-12-15 19:31:07 -05:00
nhmall be9d974c4d Makefile.msc update 2018-12-15 02:17:15 -05:00
nhmall 56051e0b9b Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-14 23:11:37 -05:00
nhmall 16cda0882c fix up PDCurses cursor placement for prompts 2018-12-14 23:08:41 -05:00
nhmall 1be3ad0ddc Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-14 17:25:24 -05:00
nhmall b71df7b144 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-13 21:25:34 -05:00
nhmall bdae51503c stale dependency 2018-12-13 20:21:26 -05:00
nhmall 5e37d5b5d4 commented out by default 2018-12-13 20:11:03 -05:00
nhmall e6e2d8a257 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-13 20:08:47 -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
nhmall f9beca06dc core code style 2018-12-13 01:36:36 -05:00
nhmall 155499fbda Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-12 06:40:52 -05:00
nhmall 5f21dd1308 fix apparent copy and paste error 2018-12-10 18:01:43 -05:00
nhmall ac6ab22347 typo fix 2018-12-10 17:28:43 -05:00
nhmall 2243b1bb00 trigger update 2018-12-10 17:24:32 -05:00
nhmall 3837df1221 Qt build 2018-12-10 09:00:50 -05:00
nhmall 66100fd8fc Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-10 00:50:01 -05: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
nhmall 0573392f16 Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-12-09 13:47:12 -05:00
nhmall 46d2724f58 some early startup adjustments 2018-12-09 13:09:30 -05:00
nhmall d93b8b50ae fixes entry for foxen refix
commit e0927cd983 fixes #167
2018-12-09 10:31:07 -05:00
nhmall e0927cd983 Merge branch 'foxen_fix' into NetHack-3.6.2-beta01 2018-12-09 10:19:27 -05:00
nhmall cb191e6a0e more windmain 2018-12-09 10:14:19 -05:00
nhmall f706ba094c clean up some tear-down
Windows continued to use function pointers belonging
to particular window ports that were still assigned
even after that port (tty) had gone through its
shutdown procedures when requested by the core.
Fix that and return to the minimal function pointers
that are not part of any of the actual WindowPorts.
2018-12-08 23:04:53 -05:00
nhmall 8d516d4358 clean up Windows exit routines 2018-12-08 22:34:50 -05:00
nhmall afc34d3016 a late bot() call was observed on GUI Windows so prevent such a crash 2018-12-08 22:08:55 -05:00
nhmall 01625455d9 more startup tweaking for Windows 2018-12-08 21:17:34 -05:00
nhmall 547f0a32cc Update Visual Studio projects to reflect recent change 2018-12-08 20:24:24 -05:00
nhmall 4d2abbe23f Makefile.msc bit 2018-12-08 20:11:25 -05:00
nhmall a9342107c8 relocate safeproc.c from sys/share to win/share 2018-12-08 20:09:58 -05:00
nhmall b853c6a75b Makefile.msc update 2018-12-08 18:45:48 -05:00
nhmall dc1e2da359 Windows startup modifications
Changes to be committed:
	modified:   include/winprocs.h
	modified:   src/options.c
	modified:   sys/share/pcmain.c
	new file:   sys/share/safeproc.c
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/stubs.c
	new file:   sys/winnt/windmain.c
	modified:   sys/winnt/winnt.c
	modified:   win/win32/vs2017/NetHack.vcxproj
	modified:   win/win32/vs2017/NetHackW.vcxproj
	modified:   win/win32/winhack.c

Because multiple window ports are supported on Windows
now, even in the same executable and selectable via
config file in some cases, some adjustments became
necessary. There will likely be some further refining
of this over the next day or two.

List of changes:

Move Windows startup from sys/share/pcmain.c and
into its own sys/winnt/windmain.c so that it can
be modified to fix some current breakage, and
allow altering the order of some things.

There is startup processing code that is common to
all of the Windows WindowPorts, but that startup
processing code needs to have no dependency on
any one of those WindowPorts.

Yet, during startup processing, some of the initialization
routines can end up calling NetHack functions that
expect an active Window port underneath, and if there
isn't one, routines like pline, impossible, panic can
end up invoking null function pointers.

Place a new file sys/share/safeproc.c, in which a complete
window port is available for early startup processing
purposes. It's WindowPort name field is set to
"safe-startup" just for reference.  The prototypes in
include/winprocs.h require that SAFEPROCS be

Usage:

 windowprocs = get_safe_procs(0);
initializes a set of winprocs function pointers that ensure
none of the function pointers are left null, but that's all it does.

 windowprocs = get_safe_procs(1);
initializes a set of winprocs functions pointers that ensure
none of the function pointers are left null, but also
provides some basic output and input functionality using nothing
other than C stdio routines (no platform or OS specific code).

The conditional code related to WIN32 has been removed from
sys/share/pcmain.c

The code common to all of the Windows WindowPorts calls
get_safe_procs() almost immediately to ensure that
there is a set of WindowPort winprocs available.
2018-12-08 17:56:20 -05:00
nhmall 6ff9753029 back out some spider changes
After consultation with the original committer, this
is being pulled out, possibly revisited later. There was
originally meant to be a follow-up piece to this that he
never had a chance to integrate for various reasons.
2018-12-07 19:12:56 -05:00
nhmall 89d165b501 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-07 09:40:38 -05:00
nhmall a1c1acdd24 add MM_NOGRP makemon() flag
add MM_NOGRP makemon() flag as a means of suppressing groups of monsters in
a couple places that warrant it when a specific monster type isn't
specified on the call to makemon()
2018-12-07 09:29:01 -05:00
nhmall 150d01a965 add MM_ASLEEP makemon() flag and honor it for fill_zoo 2018-12-06 22:30:15 -05:00
nhmall a9e8ad9236 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-05 23:45:56 -05:00
nhmall 1baa20dfc5 header update on cursstat.c 2018-12-05 23:43:59 -05:00
nhmall c4930c6782 update header on curswins 2018-12-05 17:45:40 -05:00
nhmall 9c873712b6 update header on cursstat 2018-12-05 17:45:15 -05:00
nhmall 2458281d42 update header on cursmisc 2018-12-05 17:44:08 -05:00
nhmall c260911f38 update header on cursmesg 2018-12-05 17:43:33 -05:00
nhmall 661ffb0133 update header on cursmain 2018-12-05 17:42:49 -05:00
nhmall 86281c5555 update header on cursinvt 2018-12-05 17:42:11 -05:00
nhmall 14335ea90c update header on cursinit 2018-12-05 17:41:30 -05:00
nhmall c258f9c3f8 update header on cursdial 2018-12-05 17:40:33 -05:00
nhmall 37b7243c57 some updates to curses
Tangles updates
2018-12-04 22:22:43 -05:00
nhmall 8fc308637b Merge branch 'NetHack-3.6.2-beta01' into macosx-minor 2018-12-04 21:39:16 -05:00
nhmall dc2539701a Revert "some fixes provided from Hardfought"
This reverts commit ab9e28d1aa.
2018-12-04 11:59:41 -05:00
nhmall ab9e28d1aa some fixes provided from Hardfought 2018-12-04 11:58:05 -05:00
nhmall f6b7ce02d8 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-12-04 11:46:19 -05:00
nhmall ec8f002d81 bit-use collision on WC2_TERM_SIZE, WC2_RESET_STATUS 2018-12-04 11:45:41 -05:00
nhmall 5d9c172497 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-02 21:26:54 -05:00
nhmall 7e9bc20c3a Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-12-02 19:42:12 -05:00
nhmall 6fe706f274 'curses_display_nhmenu' should return a value
Caught by automated build test

../win/curses/cursdial.c:598:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
        ^
../win/curses/cursdial.c:605:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
2018-12-02 18:47:23 -05:00
nhmall a9ff2a296a remove slipped-in partial bits from another feature
Some bits from another feature by Tangles had
slipped into our merge of curses a while back.

Remove the partial bits as feature bits should
be complete or not at all, unless foundational
for something to come.
2018-12-02 11:54:42 -05:00
nhmall 4a4b3fb8f1 add a macro to ease conditional testing based on active window port
Add WINDOWPORT macro

example:
if (WINDOWPORT("tty"))
	pline("Look at me, I'm on tty at the moment!");
2018-12-02 09:56:44 -05:00
nhmall 38b31dd9ca fix a build error in cmd.c 2018-12-02 09:45:07 -05:00
nhmall e19ad7d2bc Remove some Windows-specific code from src/cmd.c 2018-12-01 19:24:22 -05:00
nhmall 37b5e0e479 make curses commented out by default (again) 2018-12-01 11:31:08 -05:00
nhmall a5a51814a1 get rid of some gcc warnings with Windows build 2018-12-01 09:41:22 -05:00
nhmall 92732af7aa Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-30 20:20:05 -05:00
nhmall 802c22ed98 more gcc work for Windows
tty builds and executes
curses builds but crashes

gui - not even trying right now
2018-11-30 20:17:42 -05:00
nhmall c0897f2f0d more Windows Makefile synch and gcc Makefile updates
The gcc-built tty version builds fully now, but it won't play.

The GUI version definitely does not build right now.
2018-11-30 18:44:37 -05:00
nhmall 8a9f98f179 curses follow-up bits
Move the curses global variable defininitions to cursmain.c.

Make the references to those global variables extern in
include/wincurs.h

Get rid of a warning:
../win/curses/cursmesg.c:379:9: warning: declaration shadows a
variable in the global scope [-Wshadow] int orig_cursor = curs_set(0);

Kludge for Visual Studio compiler: Add a stub- file for use
in Windows curses port builds to ensure that a needed #pragma
is invoked prior to compiling the file pdcscrn.c in the
PDCurses source distribution. All command line options and
compile of the file. It is unreasonable to expect a NetHack
builder to have to tinker with the PDCurses source files in
order to build NetHack. This kludge means the NetHack builder
doesn't have to.
The file stub-pdcscrn.c contains only two lines:
	#pragma warning(disable : 4996)
	#include "pdcscrn.c"
Some day, if the PDCurses sources corrects the issue, this
can go away.
2018-11-30 16:00:24 -05:00
nhmall ad838f2236 typos 2018-11-29 22:37:54 -05:00
nhmall 7495d0f2f4 more Windows gcc cleanup
Still not finished
2018-11-29 22:32:36 -05:00
nhmall 2a2107c3a4 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-29 22:23:58 -05:00
nhmall 3811845dbf more Makefile.gcc work
Still not completed
2018-11-29 22:23:17 -05:00
nhmall 5049d23ce0 make some progress on mingw build
Still not quite there yet though.
Focusing on tty (maybe curses) right now.

The gui has had significant code deviation from
prior gcc builds for windows and will take more
work.
2018-11-29 20:59:03 -05:00
nhmall d45b8e4fb3 More Makefiles 2018-11-29 17:41:20 -05:00
nhmall 5f02f2455b more Makefile for Windows 2018-11-29 16:36:07 -05:00
nhmall de5acee7fc Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-29 16:27:48 -05:00
nhmall f2da47a347 Windows Makefile updates (first batch) 2018-11-29 16:27:02 -05:00
nhmall 99891455d3 earlier Guidebook change neglected to update the date 2018-11-29 00:24:35 -05:00
nhmall c52fc366a0 not everyone has PDCurses so re-comment it in the official sources 2018-11-29 00:15:34 -05:00
nhmall 0ab9e7d087 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-11-29 00:08:09 -05:00
nhmall 3634d16582 fix nethackw start without arguments
The Windows graphical version in NetHackW.exe is meant to lock
itself to its own windowtype and ignore the OPTIONS=windowtype
setting in the config file, but the code to perform the lock
only did so if (argc > 1).
2018-11-28 23:29:28 -05:00
nhmall c35c2df14d Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-11-28 21:47:34 -05:00
nhmall 3db1e42dc8 dungeoneers update - Karl Garrison 2018-11-28 21:46:52 -05:00
nhmall 8d1aa429ca catch up on some fixes36.2 entries 2018-11-28 20:39:09 -05:00
nhmall bf4bb47518 Update header at the top of the curses files
Place the copyright notice within the win/curses files as confirmed
by the original curses port author on November 28, 2018.
2018-11-28 20:00:20 -05:00
nhmall ec1f3d3f57 bring ms and gcc Makefiles into better alignment
Makefile.msc has been tested.
Makefile.gcc has not been tested yet.
2018-11-28 19:47:58 -05:00
nhmall e9b2f47e62 add a comment to sample config file showing how to enable curses 2018-11-28 08:43:05 -05:00
nhmall 478b53b4c2 Merge branch 'mouse_support' into NetHack-3.6.2-beta01 2018-11-27 22:58:42 -05:00
nhmall cc0e7a8750 mouse_support docs 2018-11-27 22:56:19 -05:00
nhmall d18bf800ae expand mouse_support to three values rather than boolean
On Windows only:
   0 = turn off mouse_support
   1 = turn on mouse_support and turn off QuickEdit mode
   2 = turn on mouse_support and leave QuickEdit mode untouched

More generally, but not implemented anywhere:
   0 = turn off mouse_support
   1 = turn on mouse_support and make supporting O/S adjustments
       (O/S adjustments not implented beyond Windows as yet)
   2 = turn on mouse_support and do not make OS adjustments
       (unimplemented as yet so behaves as 1)
2018-11-27 22:15:34 -05:00
nhmall 554ec17c8b Merge branch 'macosx-minor' into NetHack-3.6.2-beta01 2018-11-27 08:02:38 -05:00
nhmall 53e72acb98 correct sz error when gang parameter is null 2018-11-26 10:59:57 -05:00