Commit Graph
205 Commits
Author SHA1 Message Date
nhmall 2da95e4dc0 eliminate the uses of the manually maintained BL_MASK_BITS
Use CONDITION_SIZE which does not require manual updating.

Also attempts to adjust win32 graphics window port for
the new fields.

That port has its own field names and should be adjusted
to using the following which are declared extern in
include/botl.h.

   struct conditions[CONDITION_COUNT];
   int cond_idx[CONDITION_COUNT];

The former contains the fields that were port-specifically
added to the win32 graphical port and more, plus it is
centrally maintained and currently utilized by tty and curses.

The cond_idx[] array contains the ranked ordering of the
condition fields from highest ranking to lowest. Instead
of indexing like this:
	int i;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ...conditons[i].enabled;
 	    ...condtions[i].text[0];
	}

you can use the ranked ordering like this:
	int i, ci;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ci = cond_idx[i];
	    ...conditons[ci].enabled;
 	    ...condtions[ci].text[0];
	}
2020-02-08 20:40:38 -05:00
nhmall 82bfec24f9 update some version bits 2020-01-28 19:09:40 -05:00
nhmall d5174323eb Merge 'NetHack-3.6' updates into NetHack-3.7-Jan2020 2020-01-14 22:09:29 -05:00
nhmall a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall 308943aea4 groundwork for window port interface change to add_menu
groundwork only - window port interface change

This changes the last parameter for add_menu() from a boolean
to an unsigned int, to allow additional itemflags in future
beyond just the "preselected" that the original boolean offered.

There shouldn't be any functionality changes with this groundwork-only
change, and if there are it is unintentional and should be reported.
2019-12-22 18:28:24 -05:00
nhmall 17feb01d8f Merge branch 'NetHack-3.6' 2019-12-17 14:39:15 -05:00
nhmall 74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall a9c946a05f Merge branch 'NetHack-3.6' 2019-12-01 19:30:09 -05:00
nhmall d2d40289e6 update and/or clarify some version references 2019-12-01 19:07:28 -05:00
nhmall 3a84bff7f3 Merge branch 'NetHack-3.6' 2019-11-30 15:41:52 -05:00
nhmall e8ef02d597 one more win_proc 2019-11-30 15:27:04 -05:00
nhmall 5f3398347c Merge branch 'NetHack-3.6' 2019-11-16 23:14:34 -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
nhmall 2eab66617d Merge branch 'NetHack-3.6' 2019-10-30 13:21:20 -04:00
Bart House 43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -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
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 05ec7f36a8 Merge branch 'NetHack-3.6.2' 2019-01-29 22:34:07 -05:00
PatR 37e5a9cad2 randrole() fix
Give all the calls to randrole() its new argument.
2019-01-29 17:14:55 -08:00
nhmall 58f2218c4e Merge branch 'NetHack-3.6.2' 2019-01-09 07:24:18 -05:00
nhmall 7974533eab Merge branch 'NetHack-3.7' into win-wip3.7 2018-12-25 16:35:45 -05:00
Bart House b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House 0763046c38 zeroX, tc_gbl_data and fqn_prefix moved to instance globals. 2018-12-25 08:09:37 -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 74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -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