Commit Graph

138 Commits

Author SHA1 Message Date
nhmall
a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
d2d40289e6 update and/or clarify some version references 2019-12-01 19:07:28 -05:00
nhmall
e8ef02d597 one more win_proc 2019-11-30 15:27:04 -05:00
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
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -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
bc65112ce0 Added experimental feature NEW_KEYBOARD_HIT. 2019-07-09 22:30:34 -07:00
PatR
37e5a9cad2 randrole() fix
Give all the calls to randrole() its new argument.
2019-01-29 17:14:55 -08:00
PatR
02cfd131ee status gold vs symset:Blank
Symset:Blank sets all the map symbols (except STRANGE_OBJECT) to
<space>.  The status lines for !STATUS_HILITES force status to use '$'
instead of ' ' for the prefix before ":1234" for gold, but the status
lines for STATUS_HILITES did not.  tty ended up with ":1234" for gold.
win32 and curses both ignore the prefix and construct their own, but
since win32 uses the map symbol for that it must also be ending up
with ":1234" (I assume; I haven't seen it).  curses is forcing '$' for
the prefix, even on the rogue level.

This attempts to fix win32 without be able to test the result.  I've
left curses alone.
2018-12-24 18:43:51 -08:00
Bart House
266b5e3891 Small improvements to fuzzer for NetHackW.
Can toggle fuzzer on/off using "Pause" key if attached to debugger.
Extended command selected randomly.
2018-12-15 14:49:59 -08:00
Bart House
0cd50847fb Changes to get fuzzer working in NetHackW. 2018-12-12 21:46:14 -08: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
Bart House
6ee48481b1 Respect BL_FLUSH and BL_RESET indications to mswin_status_update. 2018-12-02 13:33:07 -08:00
Bart House
0f679b3109 NetHackW status hilite support improved to include support for attributes. 2018-12-02 13:25:03 -08:00
Bart House
c44c0d3e01 Added support for color condition hilites to tile mode.
Code is complete but might take another pass over the code to simplify
where we can.
2018-11-25 21:04:30 -08:00
Bart House
52cbbdafae Completed map back buffer work and implemented map cursor blink.
Map back buffer work is done eliminating all flickering caused by
clears of the front buffer during partial updates.

Implemented a cursor blink in both ascii and tile modes.

Fixed bug where we would lose fit to screen when entering rogue level.
2018-11-16 12:39:04 -08:00
nhmall
21a81d0294 BL_RESET usage for window port status line updating
Like BL_FLUSH, only send BL_RESET if the window port has
indicated it wants them via setting the appropriate WC2
bits in its window_procs structure. Update documentation.
2018-09-22 22:41:02 -04:00
Mak Kolybabi
60ea2874ed Fix other spelling issues. 2018-09-19 21:46:07 -05:00
nhmall
7123812327 try to coax an error code for display on tile_file failure
If the underlying error is that Windows LoadImage() just
wasn't happy with the format of the image file, you'll just
get a 0x0 result, which won't help much.

If, however, it shows a 0x2 result that means it couldn't
find the file to load it.
2018-09-17 15:46:47 -04:00
PatR
3eded06669 fix #H7156 - perm_invent
Bug report #H7156 listed three items, all relating to perm_invent:
1) it shouldn't persist across save/restore since restore might be
   on a system which doesn't have enough room to display it (report
   actually complained that config file setting was ignored when
   restoring old games, which is an expected side-effect for options
   that persist across save/restore);
2) permanent inventory wasn't updated when using scroll of charging;
3) attempts to update permanent inventory during restore could lead
   to crash if it tries to access shop cost for unpaid items.
Items (2) and (3) have already been fixed.  This fixes (1).

Replace 'flags.perm_invent' with a dummy flag, preserving save files
while removing it from flags.  Add 'iflags.perm_invent' to hold the
value of the perm_invent option.

The win32 files that are updated here haven't been tested.  Whichever
branch contains the curses interface needs to be updated; ditto for
any other pending/potential interfaces which support perm_invent.
2018-09-14 17:34:33 -07:00
nhmall
4be2467cc9 win32 gui bits
fix an index out-of-bounds
status hitpoint bar behavior at zero hp to match tty
2018-09-08 08:54:35 -04:00
nhmall
878823ad8a another mswproc bit - remove enum values from comments 2018-09-03 08:52:16 -04:00
nhmall
ec2258ae70 mswproc.c bit 2018-09-03 08:49:47 -04:00
nhmall
a417d67572 status_update distinguish new BL_RESET from BL_FLUSH
This adds BL_RESET to status_update to send a flag to a window
port that every field should be updated because something has
happened in the core to make current values shown to be
untrustworthy or potentially obliterated.

That is now distinguished from BL_FLUSH, which now has no
bearing on whether every field needs to be redone, and instead
can be used by a window port indicator that it is time to render
any buffered status field changes to the display.

tty port now sets WC2_FLUSH_STATUS indicator for BL_FLUSH support
and now does one rendering per bot() call, instead of up to 22.

Side note: The tty hitpoint bar code was relying on the old
behavior of redrawing everything upon BL_FLUSH apparently, so it
initially had some color change lag issues, corrected by marking
BL_STATUS as dirty (in need of updating) in tty_status_update()
whenever BL_HP was marked as dirty.
2018-09-03 08:18:18 -04:00
nhmall
2b66b5ecd1 bump version ID values 2018-05-16 23:06:44 -04:00
nhmall
93e0cb5235 nethackw clear after getlin
Alex wrote: in nethackw, getlin clears message
window, so any unread messages are scrolled off the screen without
"--more--" prompt. If vary_msgcount is set to 1 and "potion shatters", it
is not easy to see the effect to name the potion correctly.
2018-04-24 08:15:36 -04:00
Pasi Kallinen
a2f6a7bec9 Support EDIT_GETLIN for win32
... but only without popup_dialog
2018-03-27 20:24:05 +03:00
Bart House
3d2e59ecec Win32GUI: Changes to player selection dialog.
Significant changes to player selection dialog that attempt
to match recently made changes to the Qt and X11 window ports.
2017-10-25 10:49:14 +03:00
Bart House
a588541a27 Win32GUI: Gather raw_print text and display it all in single dialog
Defined strbuf_t and related routines to support dynamically sized
strings. Modified strip_newline() to strip the last newline in a string
instead of the first.

Simplified splash window code using new strbuf_t.

Prior to exiting game, re-enable getreturn and call wait_synch() in
case there is buffered raw prints that must be displayed to user.
2017-10-25 10:34:27 +03:00
Bart House
8656807b4d Windows GUI supports WC2_HILITE_STATUS
Avoids raw_print on startup
2017-10-08 01:56:18 +03:00
Bart House
b744e2ce1f Win32GUI: Fix permanent inventory window going away
Fix bug where permanent inventory window would go away after
any operation that used the inventory window to pick items. Since
we were hiding the permanent inventory window, this would also
leave a space filled with white, creating jarring visual if
using dark themed window backgrounds.
2017-10-08 01:26:24 +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
1e22a9aaf7 Win32GUI: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map
2017-09-13 14:02:43 +03:00
Pasi Kallinen
189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
Pasi Kallinen
f95747e3ef win32: Save and load map colors from registry 2016-10-06 21:00:15 +03:00
Pasi Kallinen
680c8a542c Add key rebinding
This is a modified version of Jason Dorje Short's key rebinding
patch, and allows also binding special keys, such as the ones
used in getloc and getpos.

One of the ways to play NetHack on nethack.alt.org is via a HTML
terminal in browser. Unfortunately this means several ctrl-key
combinations cannot be entered, because the browser intercepts
those. Similar thing applies to some international keyboard layouts
on Windows. With this patch, the user can just rebind the command
to a key that works best for them.

I've tested this on Linux TTY, X11, and Windows TTY and GUI.
2016-10-05 20:04:56 +03: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
52b8139a4b Merge branch 'win32-guitty' into NetHack-3.6.0 2016-01-14 19:07:48 -05:00
Alex Kompel
f83e09e4ab win32_gui: fix inventory window visibility when perm_invent is set in game 2016-01-14 08:15:56 -08:00
PatR
fa20ef382d status line update
Adding deafness to the status line spurred me on to something I've
wanted to do for a long time.  This adds 'Stone' and 'Strngl' as
new status conditions, and moves the five fatal ones: "Stone Slime
Strngl FoodPois TermIll" to the front of the status list since
information about them is more important than any of the others.
"Ill" has been renamed "TermIll"; "Df" has been renamed "Deaf";
"Lev", "Fly", and "Ride" are three additional new conditions, with
Lev and Fly being mutually exclusive.  After the fatal ones, the
order of the rest is now
<hunger> <encumbrance> Blind Deaf Stun Conf Hallu Lev Fly Ride

To handle the longer potential status line, the basic bot2() is now
smarter.  If the line is wider than the map, 'T:moves' is moved from
the middle to the end.  If the line without time is still wider than
the map, then experience (HD if polyd, Xp:M/nnnnnn is showexp is on,
or Exp:M) is moved in front of time at the end.  If the line without
experience and time is still wider than the map, dungeon level plus
gold is moved from the beginning to be in front of experience.  The
fields are just reordered, not truncated, so if the interface code
can display lines wider than the map they'll retain the extra info.
The gist is than health and associated fields (Hp, Pw, Ac) get first
priority, status conditions get second priority, then the rest.  In
the usual case where there aren't many conditions, status display is
the same as it has been in the past.

STATUS_VIA_WINDOWPORT has been updated too, and it builds for tty
and X11.  But the bot2() revision to reorder sections has not been
implemented for that.

win/win32/mswproc.c has been updated but not tested.

STATUS_VIA_WINDOWPORT without STATUS_HILITES had several compile
problems; now fixed for core and tty.  STATUS_VIA_WINDOWPORT with
STATUS_HILITES has not been tested.
2016-01-13 19:13:10 -08: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
9a5340a3bf windows: fix undefined reference in release build
Changes to be committed:
	modified:   win/win32/mswproc.c
2015-12-31 20:26:47 -05:00
PatR
c5e2604cca still more while-helpless 2015-12-18 07:42:23 -08: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
375a2c28f1 fixes updates for win32gui
Changes to be committed:
	modified:   doc/fixes36.0
	modified:   doc/fixes36.1
	modified:   win/win32/mhsplash.c
	modified:   win/win32/mswproc.c
2015-12-10 07:51:33 -05:00
nhmall
d267cb1b0f more windows DEBUG 2015-12-02 23:24:34 -05:00
nhmall
8bd70be165 windows build without DEBUG defined in global.h
Changes to be committed:
	modified:   include/global.h
	modified:   sys/share/pcmain.c
	modified:   win/win32/mswproc.c
2015-12-02 23:19:04 -05:00
Alex Kompel
403f6e3081 win32_gui: improve logDebug performance 2015-06-09 08:53:21 -07:00
Alex Kompel
afa0e95e66 win32_gui: implement background glyph rendering
try to use system TrasnparentBlt (or not)
2015-06-09 08:34:11 -07:00