Commit Graph

1259 Commits

Author SHA1 Message Date
nhmall
a364348098 add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding
an mgflags parameter to mapglyph() to control its behavior

 Changes to be committed:
	modified:   doc/window.doc
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/detect.c
	modified:   src/mapglyph.c
	modified:   src/pager.c
	modified:   sys/amiga/winfuncs.c
	modified:   sys/wince/mhmap.c
	modified:   win/Qt/qt_win.cpp
	modified:   win/Qt4/qt4map.cpp
	modified:   win/X11/winmap.c
	modified:   win/curses/cursdial.c
	modified:   win/curses/cursinvt.c
	modified:   win/curses/cursmain.c
	modified:   win/gem/wingem.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mhmap.c
	modified:   win/win32/mswproc.c
2019-11-16 22:49:36 -05:00
PatR
4d3828f6ec curses lint
'orient' is the name of an enum defined in wincurs.h so don't use it
as a variable name in cursstat.c.  My compiler didn't complain using
'-Wshadow' but apparently some other one does.

Make the same change in the dead code located in the second half of
that file, plus a couple of formatting tweaks.
2019-11-16 10:03:57 -08:00
PatR
8a7169eda9 fix curses compile warning
From hardfought; latest gcc complains that /* fall through other stuff */
doesn't match its pattern for /* fall through */ comment indicating
that omitted 'break' statement is intentional and one switch case is
deliberately continuing into the code for another.
2019-11-15 19:03:11 -08:00
PatR
501541635a fix #H9426 - curses_procs null stubs 2019-11-14 14:18:59 -08:00
PatR
f5452848a5 width of curses menus
Menus with wide header or separator lines were rendered wide enough
to avoid wrapping those lines, but ones with narrow header/separators
and wide selectable entries were limited to half the display even
though lots of lines that would fit with full width were being wrapped.
Change the latter behavior.

Menus are right justified with the edge of the map when narrower than
it, left justified otherwise, and if the display is wider than the map,
they'll extend beyond its right edge.  (That hasn't actually changed;
it's just that left-justification is more likely now that menus will
be wide enough to show wide inventory lines without wrapping.)

Get rid of my ridiculous hack to force wider menu for the 'symset'
and 'roguesymset' sub-menus of 'O' since it's no longer useful.

There's still room for improvement.  If any lines need to be wrapped
despite using the full width, or perhaps are just a lot wider than
most of the entries, menu width could be narrowed to just enough for
'normal' lines to fit so that one or two really long entries don't
distort the menu.  That's a bit more complicated than I want to deal
with right now.  [If implemented, it would be relevant for tty too.]
2019-11-11 12:55:50 -08:00
Bart House
a5080da898 Dismiss the splash dialog when user hits window close. 2019-11-03 18:46:33 -08:00
Bart House
2244720133 Built windows store package. 2019-11-03 17:39:18 -08:00
Bart House
11018da6b8 Renamed configuration file for windows to .nethackrc.
Also adjusted name of template files populated during windows builds.
2019-11-02 19:11:26 -07:00
Bart House
33149eed0e Move is_desktop_bridge() api to win10 wrapper. 2019-11-02 11:39:11 -07:00
Bart House
34cf17c4d0 New package submitted to microsoft store. 2019-10-31 20:37:43 -07:00
Bart House
215815c0b5 Changes to player selection dialog support to respond to per-monitor DPI. 2019-10-31 20:18:27 -07:00
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -07:00
nhmall
feaaa93451 try travis pre-release zip build again with update powershell command 2019-10-29 17:54:58 -04:00
nhmall
fff4ceebdd travis deploy zip file name refinement 2019-10-29 09:34:21 -04:00
nhmall
4f94bcaa8b travis bits 2019-10-27 20:42:22 -04:00
nhmall
faf795b014 travis updates for Windows deploy
travis updates for Windows deploy

Change zip file name from NetHack.zip
to
NetHack-x86-beta$TRAVIS_TAG.zip
where $TRAVIS_TAG represents the tag info.

Also, log the commands from the sh script in win/win32/vs2017 to the build log.
2019-10-27 20:36:03 -04:00
Bart House
2d7901372e Change ZIP file layout to be flat. 2019-10-26 20:39:24 -07:00
Bart House
eef880214b Modified travis builds to deploy the x86 windows build to github if tagged.
Moved the travis visual studio build bash script to live outside of
the travis YML file.  Updated the script to use powershell to generate
ZIP file form the binary results.

Deploy Windows build ZIP file to github releases if build has commit
has been tagged.  Build will be marked pre-release.
2019-10-26 20:09:14 -07:00
PatR
b7ca0b4cc6 pull request #236 - tty's 'maxwin'
'maxwin' was not being get up to date.  Just get rid of it.
2019-10-22 16:31:25 -07:00
k21971
a0d57d0a74 curses - remove unused variable in curses_str_remainder()
and remove incorrect use of 'count' which could result in messages being
repeated indefiitely.
2019-10-19 00:43:52 +11:00
PatR
6182b014ca github pull request #235 - curses symbol set init
Fixes #235

For initial options under curses, specifying 'DECgraphics' as a
boolean rather than as 'symset:DECgraphics' wasn't overriding the
new default 'symset:curses'.  Since previously DECgraphics was
rejected for curses, it's possible that no one noticed.
2019-10-17 14:38:45 -07:00
PatR
61b976e0d5 couple of curses symbol handling bits
Primary and rogue symbols were being set to default if primary hadn't
been given a value, possibly clobbering rogue symbols if those had
been given a value.  Initialize them independenly.

Return early from curses_convert_glyph() if the value doesn't have
the 8th bit set since it now deals exclusively with DECgraphics
handling.  Force a sane value for returning early on rogue level.
2019-10-17 05:07:03 -07:00
PatR
33d33fcf19 fix curses build warning and update fixes36.3
Move a declaration that became mid-block when a preceding 'if () {'
got removed to top of block suppress warning about C99 feature.

Add new entry for the curses symset change to fixes36.3.
2019-10-16 16:19:51 -07:00
PatR
d0c4d27a50 githib pull request #232 - curses symset
This time I'm putting things in as-is before making a few tweaks.

The pull request was three or four separate changes.  I used the
patch instead so they've been collected into one commit.
2019-10-16 15:52:00 -07:00
PatR
7c53077eb7 comment typo 2019-10-14 16:02:30 -07:00
PatR
d550a33167 curses decgraphics bit
Array bounds error; thinko rather than typo.
2019-10-14 02:53:19 -07:00
PatR
32e2d7cfc5 fix use_inverse (aka wc_inverse) for curses
Highlighting for monsters shown due to extended monster detection and
for lava shown in black and white didn't work because that keys off
of 'iflags.use_inverse' (actually a macro for 'iflags.wc_inverse') and
curses wasn't enabling that window-capability option.  To be fair, it
was probably unconditional at the time the curses interface was first
developed.  It checked for whether a monster was supposed to be drawn
with inverse highlighting but wouldn't draw it that way because the
flag was always false.  Inverse b&w lava is relatively new and curses
hadn't been taught about it.

Various other things such as pets (if hilite_pet is on) and object
piles (if hilite_pile is on) get highlighted with inverse video when
use_color is off, regardless of whether use_inverse is on or off.
That's probably a bug.
2019-10-14 02:28:27 -07:00
PatR
027ce7c8b9 pull request 229/#H9299 - DECgraphics for curses
Fixes #230

Incorporate github pull request #230, support for DECgraphics-style
line drawing in the curses interface.  I've rewritten the
curses_convert_glyph() part so that it doesn't require C99 and
doesn't reinitialize its pair of arrays for every character written
to the map.  The DECgraphics conversion is now a straight char for
char one, DEC line drawing code to ACS, without regard to what map
symbol is intended or what 'cursesgraphics' uses for that symbol.
2019-10-13 17:41:24 -07:00
nhmall
bab05ea680 remove one band from a recent attempted warning correction 2019-10-08 20:17:01 -04:00
nhmall
2172c5e7ff more github 229 warning 2019-10-07 22:02:26 -04:00
nhmall
193f8c39bd clear up some reported curses warnings 2019-10-06 09:07:49 -04:00
nhmall
57d87db92c tty condition_size() name and return value
the return value from condition_size() was unused so
eliminate an unused variable warning and rename the function
to better reflect that it updates tty_status[NOW][BL_CONDITION].lth
2019-10-05 22:17:48 -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
PatR
301a558a9c curses menu coloring
Have the 'menucolors' option control menu color pattern matching
(instead of curses-specific 'guicolor') for all menus, not just for
the persistent inventory window.
2019-08-31 23:51:59 -07:00
PatR
e9aac25922 fix #H9164 - menu colors for curses perm_invent
Commit e3af33c9db in June changed
curses handling for perm_invent to strip off doname()'s "a ", "an ",
or "the " prefix in order to shorten inventory entries and get a
couple of significant extra characters before end-of-line truncation.
That had an unintended impact on menu colors pattern matching for
patterns which expected the article prefix.  Do the matching before
stripping off the prefix instead of after so that the matching gives
the same results as when used on a normal inventory menu (even though
this means that from the user's perspective most perm_invent entries
will have invisible text at the start).

Also for menu colors, don't require curses-specific 'guicolor' option
be enabled when the general, more-specific 'menucolors' option exists
to control menu coloring.  (curses was requiring that both be True.)
2019-08-31 10:46:35 -07:00
nhmall
8a328ff7eb quite some Xcode warnings 2019-08-17 12:55:48 -04: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
e83fcd0353 Revert "Improved readability of topline state management."
This reverts commit 08a1910867.
2019-07-14 21:28:40 -07:00
Bart House
a598428fc9 Revert "Fixed bug with inmore and toplin state management."
This reverts commit 0f57f0e48c.
2019-07-14 21:17:19 -07:00
Bart House
988d474d42 Revert "Added assertions to check toplin state."
This reverts commit 1db45c8016.
2019-07-14 21:16:59 -07:00
Bart House
04f4ac94ca Revert "Comment out nhassert() calls."
This reverts commit 45a9c5eb14.
2019-07-14 21:16:27 -07:00
Bart House
fe9fc4cac1 Revert "Added nhassert to core."
This reverts commit 0ca299acb3.
2019-07-14 21:15:54 -07:00
Bart House
a90f9d4365 Revert "Fixed sign/unsigned comparisions."
This reverts commit 0e8e5aac93.
2019-07-14 21:15:31 -07:00
Bart House
2df1b179ca Revert "Removing assertion that does not hold under all scenarios."
This reverts commit c44ad5645d.
2019-07-14 21:13:18 -07:00
Bart House
1c5b28e7f9 Revert "Re-worked tty_putmsgistory and tty_getmsghistory."
This reverts commit 1d0b8b4680.
2019-07-14 21:12:21 -07:00
Bart House
454419e6c1 Revert "Removed the older version of tty_putmsghistory and tty_getmsghistory."
This reverts commit aa95e20ca7.
2019-07-14 21:10:51 -07:00
Bart House
4c1c247028 Revert "Fuzzer improvements."
This reverts commit 435f1c4626.
2019-07-14 21:10:39 -07:00
Bart House
0f0b6c5aab Revert "Tweaks to fuzzer scripts."
This reverts commit cd375064dd.
2019-07-14 21:10:07 -07:00
Bart House
340ec01caf Revert "Remove dead code."
This reverts commit 5428d73287.
2019-07-14 21:09:16 -07:00
Bart House
5428d73287 Remove dead code. 2019-07-14 14:31:00 -07:00