diff --git a/README b/README index f1284da2b..70545da1c 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of NetHack 3.4 as there was no NetHack 3.5 release. -NetHack 3.6.1 contains several hundred bug fixes to NetHack 3.6.0. The +NetHack 3.6.1 contains over 470 bug fixes to NetHack 3.6.0. The file doc/fixes36.1 in the source distribution has a full list of them. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index 5ff6f0075..c95b18bd9 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -126,7 +126,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -192,7 +192,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -258,7 +258,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -324,7 +324,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -390,7 +390,7 @@ friendly creatures. The lower this number is, the more - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -456,7 +456,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -522,7 +522,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -588,7 +588,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -654,7 +654,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -720,7 +720,7 @@ mouse support, the command is also invoked when a mouse- - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -786,7 +786,7 @@ scrolls, and so on), shop status (`u' for unpaid, in other - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -852,7 +852,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -918,7 +918,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -984,7 +984,7 @@ cept an item of armor and attempt to wear it.) - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1050,7 +1050,7 @@ (R)UNIX is a registered trademark of The Open Group. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1116,7 +1116,7 @@ enter a count prior to its letter. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1182,7 +1182,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1248,7 +1248,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1314,7 +1314,7 @@ and 'M-N'. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1380,7 +1380,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1446,7 +1446,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1512,7 +1512,7 @@ Throw something. Default key is 't'. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1578,7 +1578,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1644,7 +1644,7 @@ Show locations of special levels. Autocompletes. Wizard-mode - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1710,7 +1710,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1776,7 +1776,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1842,7 +1842,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1908,7 +1908,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -1974,7 +1974,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2040,7 +2040,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2106,7 +2106,7 @@ of that object to your load. The amount that you can carry - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2172,7 +2172,7 @@ as uncursed. They could just as easily have been described as - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2238,7 +2238,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2304,7 +2304,7 @@ and still hit a target is not an easy task. Rangers are among - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2370,7 +2370,7 @@ you feel more confident in your skills. At that point you can - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2436,7 +2436,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2502,7 +2502,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2568,7 +2568,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2634,7 +2634,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2700,7 +2700,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2766,7 +2766,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2832,7 +2832,7 @@ fungi (`F') are also considered to be vegetable matter. Certain - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2898,7 +2898,7 @@ of item; or fight with your hands and feet. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -2964,7 +2964,7 @@ ux, and Mac OS X it is ``.nethackrc'' in the user's home - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3030,7 +3030,7 @@ Defaults to HACKDIR, must be writeable. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3096,7 +3096,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3162,7 +3162,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3228,7 +3228,7 @@ (fire) command with an empty quiver (or quiver sack or have - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3294,7 +3294,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3360,7 +3360,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3426,7 +3426,7 @@ aren't interrupted with the ``More info?'' prompt, but it also - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3492,7 +3492,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3558,7 +3558,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3624,7 +3624,7 @@ Set your character's name (defaults to your user name). You - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3690,7 +3690,7 @@ instead of accepting any non-yes response as no - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3756,7 +3756,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3822,7 +3822,7 @@ screen on the rogue level. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3888,7 +3888,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -3954,7 +3954,7 @@ Put the ending display in a NetHack window instead of on stdout - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4020,7 +4020,7 @@ target. (default off) - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4086,7 +4086,7 @@ map window. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4152,7 +4152,7 @@ If NetHack can, it should pop up dialog boxes for input. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4218,7 +4218,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4284,7 +4284,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4350,7 +4350,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4416,7 +4416,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4482,7 +4482,7 @@ When asked for a location, the key to go to previous closest - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4548,7 +4548,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4614,7 +4614,7 @@ Prefix key to run towards a direction without picking up items - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4680,7 +4680,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4746,7 +4746,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4812,7 +4812,7 @@ tion flags: stone, slime, strngl, foodpois, termill, blind, - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4878,7 +4878,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -4944,7 +4944,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5010,7 +5010,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5076,7 +5076,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5142,7 +5142,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5208,7 +5208,7 @@ Load a symbol set for the rogue level that is appropriate for - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5274,7 +5274,7 @@ a game in wizard mode. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5340,7 +5340,7 @@ %D - current time, YYYYMMDDhhmmss format - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5406,7 +5406,7 @@ playmode:debug option. - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5472,7 +5472,7 @@ code for PC NetHack 3.0. Johnny Lee ported NetHack 3.0 to the - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5538,7 +5538,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5604,7 +5604,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5670,7 +5670,7 @@ Walz, and Paul Winner. In early 2015, ahead of the release of - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5693,13 +5693,13 @@ beloved community patches. Many bugs were fixed and some code was restructured. - In 2018, several hundred bug fixes for 3.6.0 and some new - features were assembled and released as NetHack 3.6.1. The devel- - opment team at the time of release of 3.6.1 consisted of Warwick - Allison,Michael Allison, Ken Arromdee, David Cohrs, Jessie Col- - let, Pasi Kallinen, Ken Lorber, Dean Luick, Patric Mueller, Pat - Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, Janet Walz, - and Paul Winner. + In late April 2018, several hundred bug fixes for 3.6.0 and + some new features were assembled and released as NetHack 3.6.1. + The development team at the time of release of 3.6.1 consisted of + Warwick Allison, Michael Allison, Ken Arromdee, David Cohrs, + Jessie Collet, Pasi Kallinen, Ken Lorber, Dean Luick, Patric + Mueller, Pat Rankin, Derek S. Ray, Alex Smith, Mike Stephenson, + Janet Walz, and Paul Winner. The development team, as well as Steve VanDevender and Kevin Smolkowski, ensured that NetHack 3.6 continued to operate on var- @@ -5736,7 +5736,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 @@ -5802,7 +5802,7 @@ - NetHack 3.6 April 23, 2018 + NetHack 3.6 April 27, 2018 diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 7c89019d0..0d8bf47b5 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.446 $ $NHDT-Date: 1524689549 2018/04/25 20:52:29 $ +$NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.448 $ $NHDT-Date: 1524780380 2018/04/26 22:06:20 $ General Fixes and Modified Features ----------------------------------- @@ -542,6 +542,9 @@ at the prompt for entering a level annotation, responding with reorder the #droptype menu and add some separator lines moving from a pit to an adjacent pit with uncleared debris shouldn't be a fall open drawbridge spanning ice would vanish if the ice melted +if a warned-of mon moved onto a spot containing a 'remembered, unseen mon' + then moved off, the unseen marker was redisplayed even though the + hero should now know that the remembered monster isn't there anymore Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/include/patchlevel.h b/include/patchlevel.h index 97013eb3f..6037e019a 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -37,8 +37,7 @@ /* Version 3.6.x */ /* Patch 1, April 27, 2018 - * Over five hundred bug fixes. - * Some improvements. + * Over four hundred and seventy bug fixes and improvements. */ /* diff --git a/src/display.c b/src/display.c index d946ec965..5c98c8a99 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1496101037 2017/05/29 23:37:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.87 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1524780381 2018/04/26 22:06:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.90 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -496,6 +496,13 @@ register struct monst *mon; impossible("display_warning did not match warning type?"); return; } + /* warning glyph is drawn on the monster layer; unseen + monster glyph is drawn on the object/trap/floor layer; + if we see a 'warning' move onto 'remembered, unseen' we + need to explicitly remove that in order for it to not + reappear when the warned-of monster moves off that spot */ + if (glyph_is_invisible(levl[x][y].glyph)) + unmap_object(x, y); show_glyph(x, y, glyph); } diff --git a/src/files.c b/src/files.c index c79ba7803..e73b27699 100644 --- a/src/files.c +++ b/src/files.c @@ -665,13 +665,17 @@ int lev, oflag; void really_close() { - int fd = lftrack.fd; + int fd; + + if (lftrack.init) { + fd = lftrack.fd; - lftrack.nethack_thinks_it_is_open = FALSE; - lftrack.fd = -1; - lftrack.oflag = 0; - if (fd != -1) - (void) close(fd); + lftrack.nethack_thinks_it_is_open = FALSE; + lftrack.fd = -1; + lftrack.oflag = 0; + if (fd != -1) + (void) close(fd); + } return; } diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 9e1c84969..50b087e3c 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -1,5 +1,4 @@ -# NetHack Datafiles Makefile. -HDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ +# NetHack Datafiles Makefile.dat $NHDT-Date: 1447844574 2018/04/25 19:25:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ # Copyright (c) 2018 by Pasi Kallinen # NetHack may be freely redistributed. See license for details. diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index e3190df4c..3551e4376 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -56,30 +56,16 @@ The Visual Studio 2017 NetHack solution file can be found here: So the steps are: 1. Launch the IDE. 2. Open the appropriate solution file. - 3. If you have a newer version of Visual Studio than what was used to build - the solution and project files distributed with the NetHack sources, you - can easily retarget the solution before the next step. Refer to the - "Note about the Windows SDK version" a couple of paragraphs below. - 4. Select the build configuration you wish to use (Release, Debug, etc.). - 5. From the build menu, select build solution. - 6. Type F5 to start debugging. + 3. Select the build configuration you wish to use (Release, Debug, etc.). + 4. From the build menu, select build solution. + 5. Type F5 to start debugging. You can also build all the projects for all platforms and configurations using a "build.bat" batch file found in the same directory as the solution. -Change to the appropriate directory (i.e. win\win32\vs2015 for VS2015 builds, -win\win32\vs2017 for VS2017 builds) and run "build.bat". - ------------------------------------ -Note about the Windows SDK Version: ------------------------------------ - The Visual Studio project files distributed for NetHack 3.6.1 are configured for the - Windows SDK version 10.0.15063.0. At the time of writing, the Windows SDK version that - is distributed with VS2017 Community Edition is a newer 10.0.16299.0. If you have a build - error MSB8036, you will simply need to change the expected SDK version as follows: - - o Open the solution in the IDE and in the project property pages, right-click the - solution and select "Retarget solution". +Open a developer command prompt for the version of Visual Studio you are +using. Change to the appropriate directory (i.e. win\win32\vs2015 for +VS2015 builds, win\win32\vs2017 for VS2017 builds) and run "build.bat". /-----------------------------------\ | Building Using Make | diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 22b0fdd9f..febe88143 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -41,6 +41,8 @@ typedef struct mswin_nethack_message_window { int yMax; /* maximum vertical scrolling position */ int xPage; /* page size of horizontal scroll bar */ } NHMessageWindow, *PNHMessageWindow; +#define LINE_PADDING_LEFT(data) (data->xChar * (2 - data->xPos)) +#define LINE_PADDING_RIGHT(data) (0) static TCHAR szMessageWindowClass[] = TEXT("MSNHMessageWndClass"); LRESULT CALLBACK NHMessageWndProc(HWND, UINT, WPARAM, LPARAM); @@ -599,7 +601,7 @@ onPaint(HWND hWnd) PNHMessageWindow data; RECT client_rt, draw_rt; int FirstLine, LastLine; - int i, x, y; + int i, y; HGDIOBJ oldFont; TCHAR wbuf[MAXWINDOWTEXT + 2]; size_t wlen; @@ -627,10 +629,9 @@ onPaint(HWND hWnd) y = min(ps.rcPaint.bottom, client_rt.bottom); for (i = LastLine; i >= FirstLine; i--) { char tmptext[MAXWINDOWTEXT + 1]; - x = data->xChar * (2 - data->xPos); - draw_rt.left = x; - draw_rt.right = client_rt.right; + draw_rt.left = LINE_PADDING_LEFT(data); + draw_rt.right = client_rt.right - LINE_PADDING_RIGHT(data); draw_rt.top = y - data->yChar; draw_rt.bottom = y; @@ -817,6 +818,8 @@ can_append_text(HWND hWnd, int attr, const char *text) mswin_get_font(NHW_MESSAGE, data->window_text[MSG_LINES - 1].attr, hdc, FALSE)); GetClientRect(hWnd, &draw_rt); + draw_rt.left += LINE_PADDING_LEFT(data); + draw_rt.right -= LINE_PADDING_RIGHT(data); draw_rt.bottom = draw_rt.top; /* we only need width for the DrawText */ DrawText(hdc, tmptext, strlen(tmptext), &draw_rt, DT_NOPREFIX | DT_WORDBREAK | DT_CALCRECT); @@ -861,8 +864,9 @@ more_prompt_check(HWND hWnd) SelectObject(hdc, mswin_get_font(NHW_MESSAGE, ATR_NONE, hdc, FALSE)); for (i = 0; i < data->lines_not_seen; i++) { /* we only need width for the DrawText */ - SetRect(&draw_rt, client_rt.left, client_rt.top, client_rt.right, - client_rt.top); + SetRect(&draw_rt, + client_rt.left + LINE_PADDING_LEFT(data), client_rt.top, + client_rt.right - LINE_PADDING_RIGHT(data), client_rt.top); SelectObject(hdc, mswin_get_font(NHW_MESSAGE, data->window_text[MSG_LINES - i - 1].attr, diff --git a/win/win32/vs2017/config.props b/win/win32/vs2017/config.props index 2533b76c9..3d435b54b 100644 --- a/win/win32/vs2017/config.props +++ b/win/win32/vs2017/config.props @@ -20,6 +20,9 @@ 15.0 - 10.0.15063.0 + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + $(LatestTargetPlatformVersion)