Commit Graph
118 Commits
Author SHA1 Message Date
nhmall 34d38dcf82 Merge branch 'NetHack-3.6' 2019-10-28 00:45:56 -04:00
nhmall a399151d01 some symbol tweaks
A few symbol-related modifications:

- fulfill a request from a blind player to allow them to
  specify a unique/recognizable character for all pets and/or
  the player in the config file for use when using a screen
  reader (S_player_override, S_pet_override). Requires sysconf
  setting ACCESSIBILITY to be set to have an effect, although
  they can still be specified in the config file.

- Config file SYMBOLS entries were not working properly on
  the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
  specified in the config file independently.

- When values are moved into showsyms[], the overriding SYMBOLS
  or ROGUESYMBOLS entry from the config file is used if there is
  one; if there is no overriding value for a particular symbol,
  the loaded symset value is used; if there is no symset entry
  loaded for the symbol then a default symbol is used.
2019-10-27 23:12:11 -04:00
nhmall fe1b2d6e82 Merge branch 'NetHack-3.6' 2019-10-06 09:16:23 -04:00
PatR 0d76f68f2c tty xputc()
Another part of github issue 227.  Casting a function pointer when
passing it to another function is iffy when lying about the return
type.  tputs() expects a routine which returns int, so give it one.
Other xputc() usage is equivalent to putchar(), so define xputc()
with the same function signature as that has.

The tputs() declarations in system.h should probably be changed
(third argument is a function which takes an int rather than
unspecified parameters) but I've left them alone.  I made that change
to tputs() in sys/share/tclib.c though.

NT and MSDOS changes are untested.  tclib.c compiles ok with clang-
as-gcc on OSX but hasn't been tested with the port that uses it (VMS).
2019-10-05 16:49:34 -07:00
Bart House cd1b650fb7 Merge branch 'NetHack-3.6'
# Conflicts:
#	DEVEL/Developer.txt
#	include/config.h
#	include/decl.h
#	include/display.h
#	include/extern.h
#	include/global.h
#	include/hack.h
#	include/patchlevel.h
#	src/display.c
#	src/dothrow.c
#	src/makemon.c
#	src/monst.c
#	src/objnam.c
#	src/sp_lev.c
#	src/wield.c
#	src/zap.c
#	sys/share/pmatchregex.c
#	sys/winnt/Makefile.msc
2019-07-14 23:36:56 -07:00
Bart House 5870cb6a92 Revert "Added experimental feature NEW_KEYBOARD_HIT."
This reverts commit bc65112ce0.
2019-07-14 21:28:55 -07:00
Bart House 4c1c247028 Revert "Fuzzer improvements."
This reverts commit 435f1c4626.
2019-07-14 21:10:39 -07:00
nhmall 041a9ad9c1 Merge branch 'master' into NetHack-3.7 2019-07-14 09:57:32 -04:00
nhmall ec1b77ff80 Merge branch 'NetHack-3.6' 2019-07-14 09:39:24 -04:00
Bart House 435f1c4626 Fuzzer improvements.
phase_of_moon and friday_13th determined using rn2() instead of local
time if fuzzing.  Don't reseed using init_random() if fuzzing.  Allow
set_random to be called outside of hacklib.  rn2_on_display_rng uses
rn2 if fuzzing so that we have a single source of random that we can
ensure is reproducible.  Implement rul() that returns a random unsigned
long.  Fix bug in fuzzer handling of ntposkey which would cause us to use
unitialized values for x and y.  Added command line arguments to allow
auto starting and stopping of fuzzer.  Add a logging facility for the
fuzzer to use to record activity.  Added some scripts used to automate
fuzzer testing on windows.
2019-07-14 00:20:09 -07:00
nhmall 7dfffbb712 Merge branch 'NetHack-3.6' 2019-07-10 21:58:58 -04:00
Bart House bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
nhmall abfd80d3d7 Merge branch 'NetHack-3.6.2' 2019-04-02 12:25:16 -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 fac470096b Merge branch 'NetHack-3.6.2' 2018-12-29 12:37:27 -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
Bart House b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House 3645e415e3 Moved more globals to instance_globals. 2018-12-19 20:01:55 -08:00
nhmall 7495d0f2f4 more Windows gcc cleanup
Still not finished
2018-11-29 22:32:36 -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 86637bb4ef fuzzer fixes on windows for testing 2018-11-21 18:50:02 -05:00
Bart House 3f4090ac38 Remap unicode control codes.
When running NetHack.exe in a console set to code page 850, the
multi-byte to wide character mapping will generate unicode values
in the unicode control code range.  These values need to be re-mapped
to unicode renderable glyphs using the same mappings we use for
control page 437 otherwise the console font might not render a character
for these unicode control values.
2018-11-15 21:42:23 -08:00
Bart House fdd4e129a1 Removed temporary comment left in by mistake. 2018-11-15 20:58:15 -08:00
Bart House 3bb759a9ab Started work to support per monitor DPI. Using DPI to scale tiles
appropriately.

Renamed ntassert to nhassert.  (Naming mistake caused by using ntassert
at work).

Re-ordered a few more includes to get window headers included before
nethack headers.
2018-11-12 17:45:22 -08:00
Bart House 8944235282 Enforced the inclusion of windows headers before nethack headers.
Moved the code page 437 mapping table to winnt.c so that it could be
used in window and console clients.
Added check that fonts support unicode values we use from code page 437.
Use unicode to draw text if font supports it otherwise use ASCII.
2018-11-12 01:58:56 -08:00
Pasi Kallinen 0bb6754998 Fuzz testing debug tool
Add code to run a fuzz tester, simulating (more-or-less) random
keyboard mashing. There's no option to turn it on, you need to
set iflags.debug_fuzzer on via a debugger or something along
those lines.
2018-11-08 15:55:49 +02:00
nhmall 81e422189c Windows wouldn't compile without TTY_GRAPHICS defined 2018-05-21 16:44:19 -04:00
nhmall 589bdb4e2d Merge branch 'win-tty-status' into win-minor 2018-05-15 00:26:26 -04:00
nhmall fba7c06fd6 put back the functionality of commandline --debug:immediateflips overwritten recently 2018-05-14 21:09:01 -04:00
Bart House 1f877dbca1 Additional changes to xputc_core() and early_raw_print() to manage
the cursor position correctly.  This is needed to handle raw printing
correctly.  Added check for when we might be running off the bottom
of the screen when handling msmsg().  Added runtime checks to keep
cursor always within bounds.
2018-05-13 20:46:43 -07:00
Bart House 53c7cb8c78 Changes to xputc_core to handle cursor correctly. 2018-05-13 18:54:20 -07:00
Bart House 0afd2570cb Removing temporary debugging code and fixing compiler warnings. 2018-05-13 13:29:13 -07:00
Bart House 3dbbd188d9 Fixing typo. 2018-05-13 12:49:52 -07:00
Bart House 039687cf5f Fix for bug 324 (aka H4216). We now will use nhraykey by default if the
players keyboard layout is non-english.  nhraykey properly handles
non-english input.  We also now support changing altkeyhandler in game.
2018-05-12 18:06:23 -07:00
Bart House 1d31a49661 Some nttty.c clean-up. 2018-05-12 15:58:44 -07:00
Bart House 3467b9f087 Added ntassert() mechanism for Windows based port use. 2018-05-12 13:59:06 -07:00
nhmall 702154529f provide some debug developer controls - part 1 2018-05-10 10:05:29 -04:00
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 ae6a391997 fix an out of range issue on WIN32 tty 2018-03-11 23:38:00 -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