Commit Graph

338 Commits

Author SHA1 Message Date
Bart House
4b922f3e8b Implemented a fix to the lag problems that are occuring with the Win32
console port.  The fix implements a console back buffer which
significantly reduces the number of calls made to WriteConsoleOutputXXX
and eliminates the lag users have been experiencing.
2018-05-06 15:09:10 -07:00
nhmall
331abfe530 Specify both width and height when creating font for width testing
From Bart...

When we are creating the console font for testing character widths,
we were not specifying width. Because of this, the created font's
average width might be larger then what we expect and we might
falsely detect that the font was inappropriate for playing Nethack.
Fix provides the width that we are expecting when creating the font.
2018-04-28 12:11:19 -04:00
nhmall
d4ebae12f1 default to using latest SDK available on build machine
From Bart...
Modified build configuration to use latest SDK available by default.
This change will eliminate the need for us to hard code an SDK
version into our configuration file and will eliminate the need
for developers to set the SDK version when they do not have the
matching SDK version installed. Updated the Install.nt file removing
the mention of having to set the SDK version.
2018-04-26 23:02:17 -04:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
nhmall
44ac268590 Install.nt bit 2018-04-23 21:47:46 -04:00
nhmall
6a7f05cec0 fix --version:paste for NetHackW
Adjust port_insert_pastebuf() for Windows so that it
works on the console and GUI variations.
2018-04-21 10:37:10 -04:00
nhmall
a7df684d25 Windows instructions update 2018-04-21 09:33:47 -04:00
nhmall
0b6e26d9e0 windows spotless bit 2018-03-12 08:47:37 -04:00
nhmall
ae6a391997 fix an out of range issue on WIN32 tty 2018-03-11 23:38:00 -04:00
nhmall
2317288150 more nmake spotless 2018-03-04 10:37:43 -05:00
nhmall
dee2fea82d msc Makefile 2018-03-04 10:25:11 -05:00
nhmall
12562694a9 update nmake spotless for windows 2018-03-04 10:09:35 -05:00
nhmall
939bd356a4 more msc makefile tweaks 2018-03-04 09:54:29 -05:00
nhmall
777317224b windows cmdline dependency bit 2018-03-04 09:11:01 -05:00
nhmall
eddfcc4422 windows cmdline Makefile 2018-03-04 09:07:16 -05:00
keni
ef0448dd79 Merge githash 2018-02-26 09:03:12 -05:00
nhmall
5370c0d337 resolve part of H4422 related to .exe versions
I also saw
 that looking at the details of both windows .exes that they indicate file
 version 3.5.0.0. Shouldn't it be 3.6.0.0 for the NH version 3.6.0
2018-02-25 12:20:50 -05:00
nhmall
65655d2cee Incorporate some git information into NetHack
Incorporate some git information into NetHack so that it
is potentially visible to a player. That's useful when
collecting details about the version that they are
running and, if the gitinfo is present, it can tie the
code to a specific git commit in the repository.

This modifies 'makedefs -v' to check for the presence of a data file
called dat/gitinfo.txt and if it is there, parse out its
contents, then write additional lines to include/date.h beyond
what 'makedefs -v' was previously putting in there, similar to
this sample:

      #define NETHACK_GIT_SHA "0c84e564c78e2024e562d39539376ce2e21eec8e"
      #define NETHACK_GIT_BRANCH "NetHack-3.6.0"

The contents of an appropriate dat/gitinfo.txt are as follows,
and trailing/leading whitespace is not significant:

      githash = 0c84e564c78e2024e562d39539376ce2e21eec8e
      gitbranch = NetHack-3.6.0

It also adjusts the contents of the 'v' version information to
include the additional git info when available.

Also adds some hooks DEVEL/hooksdir and a perl file to DEVEL
for simplifying and automating the deposit of dat/gitinfo.txt
so that it generally reflects the most current git commit.

DEVEL/gitinfo.pl can be used to build dat/gitinfo.txt at any
time without doing a commit, merge, or checkout.
    	perl DEVEL/gitinfo.pl

command line --version and -version support

To complement the extra information being provided in the
version by the 'v' command, this also adds support for the
following new command line arguments:
    --version
     -version            Output the NetHack version string then exit.

    --version:paste      Output the NetHack version string and also copy it to
     -version:paste      the platform's paste buffer for insertion somewhere,
                         then exit.

If the paste variation of -version is requested on a platform that
hasn't incorporated any support for the capability, it will deliver
the version info then an error message, prior to exiting.

To support the extended -version:paste variation, a port needs to:
    - provide a port-specific routine to perform
      the paste buffer copy in a port code file.
    - #define RUNTIME_PASTEBUF_SUPPORT in the include/portconf.h header file.

    --skeleton--
    void port_insert_pastebuf(buf)
    char *buf;
    {
    	/* insert code to copy the version info from buf into
    	   platform's paste buffer in a supported way */
    }

macosx and Windows have both added support for RUNTIME_PASTEBUF_SUPPORT
2018-02-23 19:34:44 -05:00
nhmall
e181f1acf9 command line Makefile update for vs compiler 2018-02-09 18:57:43 -05:00
nhmall
d2245aab29 version output appearance bits 2018-01-26 17:25:21 -05:00
nhmall
2cfbd682a1 VS community editions are freely downloadable. Maintain only 2 most recent.
Changes to be committed:
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/nhsetup.bat
	deleted:    win/win32/vs2010/NetHack.sln
	deleted:    win/win32/vs2010/NetHackW.vcxproj
	deleted:    win/win32/vs2010/dgncomp.vcxproj
	deleted:    win/win32/vs2010/dgnstuff.vcxproj
	deleted:    win/win32/vs2010/dlb_main.vcxproj
	deleted:    win/win32/vs2010/levcomp.vcxproj
	deleted:    win/win32/vs2010/levstuff.vcxproj
	deleted:    win/win32/vs2010/makedefs.vcxproj
	deleted:    win/win32/vs2010/recover.vcxproj
	deleted:    win/win32/vs2010/tile2bmp.vcxproj
	deleted:    win/win32/vs2010/tilemap.vcxproj
	deleted:    win/win32/vs2010/tiles.vcxproj
	deleted:    win/win32/vs2010/uudecode.vcxproj
	deleted:    win/win32/vs2013/NetHack.sln
	deleted:    win/win32/vs2013/NetHack.vcxproj
	deleted:    win/win32/vs2013/NetHackW.vcxproj
	deleted:    win/win32/vs2013/dgncomp.vcxproj
	deleted:    win/win32/vs2013/dgnstuff.vcxproj
	deleted:    win/win32/vs2013/dlb_main.vcxproj
	deleted:    win/win32/vs2013/levcomp.vcxproj
	deleted:    win/win32/vs2013/levstuff.vcxproj
	deleted:    win/win32/vs2013/makedefs.vcxproj
	deleted:    win/win32/vs2013/nhdefkey.vcxproj
	deleted:    win/win32/vs2013/recover.vcxproj
	deleted:    win/win32/vs2013/tile2bmp.vcxproj
	deleted:    win/win32/vs2013/tilemap.vcxproj
	deleted:    win/win32/vs2013/tiles.vcxproj
	deleted:    win/win32/vs2013/uudecode.vcxproj
2017-12-03 08:42:38 -05:00
nhmall
bba7a6b44c fix Makefile build for Windows after recent changes
New code in nttty.c had a dependency on gdi32.lib. Previously
that was only being linked in for the gui build when using the
Makefile.

Move the reference into the base libraries if both tty and gui
depend on it now.
2017-10-28 09:53:27 -04:00
Bart House
6322aec829 Win32TTY: Fix using a console font with wide glyphs
Added support to detect when the current console font has glyphs
that are too wide and will cause rendering errors in the console.
If detected, we warn the user and change the code page to 437
and the font to Consolas. At exit, if we had changed the font
and code page then we will restore to the original font and code page.
2017-10-25 10:59:11 +03:00
Pasi Kallinen
4659c55b5c Win32GUI: increase scroll_margin
Scrolling when 5 tiles from the edge is far too little,
you could get zapped from farther away.
2017-10-08 18:56:10 +03:00
Pasi Kallinen
61e2960c02 win32: Turn off autopickup by default
Watching new players stream NetHack, the conclusion is that
everyone turns off autopickup by default... once they learn how
to do it.
2017-10-08 18:36:57 +03:00
Pasi Kallinen
2804e750a0 Default status hilites for Windows 2017-10-01 17:44:41 +03:00
Pasi Kallinen
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
Pasi Kallinen
596bc64341 Add option to make commands ask an inventory item via menu
Turning the boolean option force_invmenu makes all the commands
that ask for an inventory item pop up a menu instead of asking
a text query.  This should be much more friendlier to new
players, and is very useful for window ports on systems
with touch screens and no physical keyboard, such as cell phones.
2017-09-23 22:47:14 +03:00
Bart House
70ac8a12af Improvements to build.bat scripts used to build Windows builds. Remove CRT Secure warnings. 2017-09-05 13:14:13 +03:00
Bart House
51f7cb5e9d Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global namespace collision between window headers and nethack headers. This time it is the macro Protection that is defined before it is used in a function prototype in the windows headers. 2017-09-04 12:56:20 +03:00
Pasi Kallinen
26328d28ab Default menucolors for Windows 2017-09-01 12:45:28 +03:00
Pasi Kallinen
ecdebff121 Typofix 2017-09-01 12:20:21 +03:00
Bart House
f9a6cf2bf7 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:04 +03:00
Bart House
77bd37b435 Visual Studio 2015 build improvements. 2017-09-01 12:13:58 +03:00
Pasi Kallinen
1eca824321 Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
2017-08-20 23:04:59 +03:00
Pasi Kallinen
a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen
7d8b4d4f97 Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux.

Define DUMPLOG to enable. By default only enabled for the TTY linux.
2017-02-19 15:33:27 +02:00
PatR
d69f0787be add '(uchar)' casts to ctype calls
This is from the pull request for the assertion failure fix.  It
did not mention how to reproduce the assertion failure, just added
casts to a bunch of isspace/isprint/tolower calls that didn't already
have such.

I removed an obsolete change for win/tty/topl.c and changed the
win/win32/mswproc.c code to avoid using an expression with side-effects
(*colorstring++) in calls to tolower() in case someone overrides that
with a macro which evaluates its argument more than once as some pre-
ANSI ones used to do.  Not tested, might have typos....

sys/wince/*.c still needs similar casts.
2016-07-19 05:40:09 -07:00
nhmall
78857961d2 some of Ray Chason's MSDOS and other fixes 2016-03-05 14:44:50 -05:00
nhmall
297d4d11e7 ensure raw_printf has visible output
Changes to be committed:
	modified:   sys/winnt/nttty.c
2016-02-01 21:57:35 -05:00
nhmall
5774804524 typo bit nttty.c 2016-01-31 18:16:13 -05:00
nhmall
37b79d68cd some updates to nttty.c
Changes to be committed:
	modified:   sys/winnt/nttty.c

better attribute support
more functional inverse support
2016-01-31 18:08:03 -05:00
Alex Kompel
c4bf762ec1 win32_gui: mimic tty interface when "Nethack mode" is selected (remove window features) 2016-01-03 19:52:05 -08:00
nhmall
14ce76a159 windows visual studio 2013 build updates 2016-01-01 22:01:25 -05:00
nhmall
4566b2903f windows: PDB files in Debug and Release 2015-12-31 20:16:48 -05:00
nhmall
fa092f5fe9 housekeeping for 3.6.1
Changes to be committed:
	modified:   Files
	modified:   README
	modified:   dat/history
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/global.h
	modified:   include/obj.h
	modified:   include/patchlevel.h
	modified:   src/invent.c
	modified:   src/objnam.c
	modified:   src/shknam.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/nethack.def
	modified:   win/macosx/NetHackGuidebook.applescript
	modified:   win/macosx/NetHackTerm.applescript
	modified:   win/win32/mswproc.c
2015-12-16 17:52:34 -05:00
nhmall
215060219d fix windows bugs H4030 and H4045 (123 and 138)
Changes to be committed:
	modified:   sys/share/pcmain.c
	modified:   sys/winnt/nttty.c
	modified:   sys/winnt/stubs.c

Bug 123 Report 4030:
Minor thing I've noticed - if I quit the game, at the "Hit <Enter> to end."
prompt, if I close the window rather than pressing Enter, I get the following:

Bug 138  - #H4045:
 "nethack -s" leads to "-s is not supported for the Graphical Interface".
 That's wrong.
 (The Graphical Interface comes with "nethackw".)
2015-12-11 23:08:01 -05:00
nhmall
d46a80b1c5 nmake Makefile updates 2015-11-19 23:12:20 -05:00