Commit Graph

1045 Commits

Author SHA1 Message Date
nhmall
e90b20a3a9 optimization of output was ruining display effects 2018-05-07 20:20:36 -04:00
nhmall
97c826ccb0 Merge branch 'barhouse-lagFix' into tty-status 2018-05-06 18:23:21 -04:00
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
f2e9b8a60a merge glitch cleanup 2018-05-06 17:52:29 -04:00
nhmall
7d1e1a163d Merge branch 'lagfix' of https://github.com/barthouse/NetHackPublic into tty-status 2018-05-06 16:52:11 -04:00
Bart House
b7f351fdbb Updated console back buffer support to correctly size the buffers as
appropriate.
2018-05-06 13:22:36 -07:00
nhmall
64cec86abb more performance fixes for the port code portion 2018-05-06 06:04:33 -04:00
Bart House
8db7237cfc Console buffer support for variable size console windows. 2018-05-06 02:47:17 -07:00
Bart House
ea2f2d1aac Quick fix to buffer height. Will need to determine why we needed a
buffer height of 26.
2018-05-06 01:40:13 -07:00
Bart House
d6f9790d79 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 01:13:30 -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
nhmall
2576ae071f text bit in sys/unix/Makefile.dat 2018-04-25 19:26:35 -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
d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -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
e236c23b35 windows record file diagnostic info 2018-04-22 12:15:30 -04:00
nhmall
d420d8073d update some old version references 2018-04-21 18:05: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
Pasi Kallinen
22cc37ed61 How to create single-page Guidebook.txt 2018-04-10 18:19:45 +03:00
PatR
a365dc3450 {dgn,lev}_lex.c - suppress yyunput() complaint
When dgn_comp.l and lev_comp.l are processed by older versions of
flex, 'gcc -Wunused' complains when compiling dgn_lex.c and lev_lex.c
because flex creates 'static void yyunput()' and nethack doesn't use
it.  Newer versions honor macro YY_NO_UNPUT to hide the offending
code, but that doesn't help with older versions (like the one
masquerading as 'lex' on OSX).  Adding a dummy usage would probably
cause problems with other lexers, so change it from static to
'void yyunput()' as a 'sed' fixup in util/Makefile after flex has
finished.  That will be a no-op when yyunput doesn't exist or isn't
static.

In addition to the sys/unix/Makefile.utl change, this checks in new
sys/share/{dgn,lev}_lex.c with the fixup in place.
2018-03-27 16:34:47 -07:00
PatR
c43b19a6d2 sys/unix/gitinfo.sh
Avoid '[[ ... ]]' to cater to a more rudimentary shell.
2018-03-16 00:39:05 -07:00
Pasi Kallinen
cbf6f83a8b Fix the filename in qt4 hints file 2018-03-14 19:02:07 +02: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
PatR
ddb830911e more Unix gitinfo
When make uses 'makedefs -v' to create date.h, force it to create
gitinfo.txt all the time instead of just when that doesn't already
exist.  Use 'make GITINFO=0' to get the previous behavior.

To skip it entirely, you need to do that and also make sure that
some file by that name already exists.  'touch dat/gitinfo.txt' or
perhaps 'echo "#no git" > dat/gitinfo.txt' would suffice.
2018-03-10 12:32:52 -08:00
PatR
4d35ca86f3 gitinfo.txt on Unix
Hide the scary perl command during 'make all' feedback in src/.
I'm not a shell programmer but this works fine for me when skipping
NHgithook::NHversioning because dat/gitinfo.txt is already present,
when creating dat/gitinfo.txt successfully, and when creation fails
because perl can't find NHgithook.pm.  It hasn't been tested when
perl itself is absent.
2018-03-04 14:17:13 -08: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
nhmall
27a7538e38 enable USE_WIN_IOCTL code unless explicitly avoided
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/unixconf.h
	modified:   sys/share/ioctl.c

github pull request #19 made reference to resulting code behaviour
being better when windows were resized when USE_WIN_IOCTL was defined.

The logic for including the necessary enabling code in the build in
sys/share/ioctl.c was an explicit "opt-in" strategy, so anything not
deliberately and explicitly listed was not able to take advantae
of the potentially useful code. The need to add #defines to that
list would have been perpetual as new platforms came online, and
unnecessarily restrictive for everything else.

This switches the logic to include the code by default now,
and thus
unless there is an explicit "opt-out" by uncommenting
AVOID_WIN_IOCTL in include/unixconf.h

Some platforms, and we have no way of knowing which ones, may have
to ensure that AVOID_WIN_IOCTL is #define'd.
2018-03-03 12:58:53 -05:00
Pasi Kallinen
09554c2b96 Make spotless should remove qt4 specific files 2018-03-03 16:58:07 +02:00
keni
ef0448dd79 Merge githash 2018-02-26 09:03:12 -05:00
nhmall
4126b1e57a final msdos bit un-revert a reversion 2018-02-25 18:15:28 -05:00
nhmall
424ce85e79 msdos Makefile update for posix regex 2018-02-25 16:28:46 -05:00
nhmall
418b5e9034 update msdos header 2018-02-25 15:15:10 -05:00
nhmall
176b85fbb7 update msdos Makefile so at least possible to build 2018-02-25 15:09:56 -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
269363467c another msdos bit 2018-02-24 23:32:54 -05:00
nhmall
9773742e82 fix some msdos build errors 2018-02-24 23:26:25 -05:00
keni
cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
keni
cf9cf038f3 gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first
NHgithook.pm: add some warnings if nhversioning can't open files
make sure nhversioning fails before opening gitinfo.txt if it can't get valid
 data
2018-02-23 19:50:15 -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
keni
12530cb155 infrastructure fixes:
- fix bug in git hooks that loses file permissions when doing variable expansion
- fix execute permissions on sys/unix/hints/macosx.sh
- explicitly call out perl as required for hooks in Developer.txt
2018-02-16 12:07:37 -05:00