Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2019-04-09 17:29:28 -04:00
6 changed files with 80 additions and 56 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.299 $ $NHDT-Date: 1554580624 2019/04/06 19:57:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.300 $ $NHDT-Date: 1554841009 2019/04/09 20:16:49 $
This fixes36.2 file is here to capture information about updates in the 3.6.x This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however, lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -574,6 +574,7 @@ tty: if eight_bit_tty option is set and current symbol set specifies
DECgraphics handling, render line-drawing characters (in nethack's DECgraphics handling, render line-drawing characters (in nethack's
scheme, the 4th quarter of ASCII--mostly lower case letters--with scheme, the 4th quarter of ASCII--mostly lower case letters--with
8th-bit forced on) instead of treating that subset as 8-bit characters 8th-bit forced on) instead of treating that subset as 8-bit characters
tty: enable blink attribute for status highlights (TERMLIB + !NO_TERMS config)
unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make' unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make'
extension when using $(VERBOSEMAKE) to reduce build-time feedback; extension when using $(VERBOSEMAKE) to reduce build-time feedback;
replace with $(QUIETCC) which operates the same but defaults to replace with $(QUIETCC) which operates the same but defaults to
+12 -3
View File
@@ -1,11 +1,11 @@
Copyright (c) NetHack Development Team 1990-2018 Copyright (c) NetHack Development Team 1990-2019
NetHack may be freely redistributed. See license for details. NetHack may be freely redistributed. See license for details.
============================================================== ==============================================================
Instructions for compiling and installing Instructions for compiling and installing
NetHack 3.6 on a Windows system NetHack 3.6 on a Windows system
(Windows 7/8.x/10 or later only. XP may work but is untested) (Windows 7/8.x/10 or later only. XP may work but is untested)
============================================================== ==============================================================
Last revision: $NHDT-Date: 1542545993 2018/11/18 12:59:53 $ Last revision: $NHDT-Date: 1554784481 2019/04/09 04:34:41 $
Credit for the porting of NetHack to the Win32 Console Subsystem goes to Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison. the NT Porting Team started by Michael Allison.
@@ -21,7 +21,8 @@ of the tty and graphical windows versions of NetHack 3.6.2.
You can build a TTY version of NetHack and a Windows Graphical You can build a TTY version of NetHack and a Windows Graphical
version. You can use one of the following build environments: version. You can use one of the following build environments:
o A copy of Microsoft Visual Studio 2017 Community Edition o A copy of Microsoft Visual Studio 2017 Community Edition or
a copy of Microsoft Visual Studio 2019 Community Edition
OR OR
@@ -65,6 +66,14 @@ of NetHack you wish to run.
The Visual Studio 2017 NetHack solution file can be found here: The Visual Studio 2017 NetHack solution file can be found here:
win\win32\vs2017\NetHack.sln win\win32\vs2017\NetHack.sln
You can use that same win\win32\vs2017\NetHack.sln with Visual Studio 2019,
but you may have to retarget the projects:
Windows SDK Version: 10.0.17763.0 [ There have been some reports of
difficulties if you instead choose
"10.0 (latest installed version)" ]
Platform Toolset: Upgrade to v142
Before executing the steps to build listed in the next paragraph, Before executing the steps to build listed in the next paragraph,
decide if you want to include optional curses window-port. See decide if you want to include optional curses window-port. See
the note just below entitled "Optional curses window-port support." the note just below entitled "Optional curses window-port support."
+4 -5
View File
@@ -1,4 +1,4 @@
# NetHack 3.6 Makefile.msc $NHDT-Date: 1550344504 2019/02/16 19:15:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.152 $ */ # NetHack 3.6 Makefile.msc $NHDT-Date: 1554784482 2019/04/09 04:34:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.153 $ */
# Copyright (c) NetHack PC Development Team 1993-2019 # Copyright (c) NetHack PC Development Team 1993-2019
# #
#============================================================================== #==============================================================================
@@ -7,9 +7,8 @@
# NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler # NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler
# #
# Visual Studio Compilers Tested: # Visual Studio Compilers Tested:
# - Microsoft Visual Studio 2010 Express, with the Platform SDK
# - Microsoft Visual Studio 2013 Express
# - Microsoft Visual Studio 2017 Community Edition # - Microsoft Visual Studio 2017 Community Edition
# - Microsoft Visual Studio 2019 Community Edition
# #
#============================================================================== #==============================================================================
# This is used for building two versions of NetHack: # This is used for building two versions of NetHack:
@@ -464,8 +463,8 @@ ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO
-DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) \ -DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) \
-EHsc -fp:precise -Gd -GF -GS -Gy \ -EHsc -fp:precise -Gd -GF -GS -Gy \
$(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi $(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi
cdebug= -analyze- -D"_DEBUG" -Gm -MTd -RTC1 -Od cdebug= -analyze- -D"_DEBUG" -MTd -RTC1 -Od
crelease= -analyze- -D"_MBCS" -errorReport:prompt -Gm- -MT -O2 -Ot -Ox -Oy crelease= -analyze- -D"_MBCS" -errorReport:prompt -MT -O2 -Ot -Ox -Oy
lcommon= /NOLOGO /INCREMENTAL:NO lcommon= /NOLOGO /INCREMENTAL:NO
+16 -5
View File
@@ -1,5 +1,5 @@
@REM NetHack 3.6 nhsetup.bat $NHDT-Date: 1432512794 2015/05/25 00:13:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.33 $ */ @REM NetHack 3.6 nhsetup.bat $NHDT-Date: 1554784485 2019/04/09 04:34:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.37 $ */
@REM Copyright (c) NetHack PC Development Team 1993-2017 @REM Copyright (c) NetHack PC Development Team 1993-2019
@REM NetHack may be freely redistributed. See license for details. @REM NetHack may be freely redistributed. See license for details.
@REM Win32 setup batch file, see Install.nt for details @REM Win32 setup batch file, see Install.nt for details
@REM @REM
@@ -58,15 +58,26 @@ echo MinGW Makefile copied ok.
echo Done copying files. echo Done copying files.
echo Checking version of VC++ installed...
:vscheck2019
SET REGTREE=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio
@REM i can see your house from here... or at least your VC++ folder
set VCDir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\"
if not defined VCDir goto :vscheck2017
if not exist %VCDir% goto :vscheck2017
if not "%VSCMD_VER%"=="16.0.0" goto :vscheck2017
set MSVCVERSION=2019
set MSVCPROJ=2017
goto :fallback
:vscheck2017 :vscheck2017
SET REGTREE=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7 SET REGTREE=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7
@REM i can see your house from here... or at least your VC++ folder @REM i can see your house from here... or at least your VC++ folder
echo Checking version of VC++ installed...
echo Checking for VC2017 Community Edition...
for /f "usebackq skip=2 tokens=1-2*" %%a IN (`reg query %REGTREE% /v 15.0`) do @set VCDir="%%c" for /f "usebackq skip=2 tokens=1-2*" %%a IN (`reg query %REGTREE% /v 15.0`) do @set VCDir="%%c"
if not defined VCDir goto :vscheck2015 if not defined VCDir goto :vscheck2015
if not exist %VCDir% goto :vscheck2015 if not exist %VCDir% goto :vscheck2015
set MSVCVERSION=2017 set MSVCVERSION=2017
set MSVCPROJ=2017
goto :fallback goto :fallback
:vscheck2015 :vscheck2015
@@ -86,7 +97,7 @@ SET MSVCVERSION=2015
:fallback :fallback
echo Using VS%MSVCVERSION%. echo Using VS%MSVCVERSION%.
set SRCPATH=%WIN32PATH%\vs%MSVCVERSION% set SRCPATH=%WIN32PATH%\vs%MSVCPROJ%
echo NetHack VS%MSVCVERSION% project files are in %SRCPATH% echo NetHack VS%MSVCVERSION% project files are in %SRCPATH%
goto :done goto :done
+1 -1
View File
@@ -680,7 +680,7 @@ boolean border;
int i, fld, cap_and_hunger, time_and_score, cond_count; int i, fld, cap_and_hunger, time_and_score, cond_count;
char *text; char *text;
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
char *p, savedch = '\0'; char *p = 0, savedch = '\0';
int coloridx = NO_COLOR, attrmask = 0; int coloridx = NO_COLOR, attrmask = 0;
#endif /* STATUS_HILITES */ #endif /* STATUS_HILITES */
int height_needed, height, width, x = 0, y = 0; int height_needed, height, width, x = 0, y = 0;
+45 -41
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 termcap.c $NHDT-Date: 1553858473 2019/03/29 11:21:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.29 $ */ /* NetHack 3.6 termcap.c $NHDT-Date: 1554841008 2019/04/09 20:16:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */ /*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -36,18 +36,10 @@ struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0, 0, 0, 0, FALSE };
STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE; STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE;
STATIC_VAR char *VS, *VE; STATIC_VAR char *VS, *VE;
STATIC_VAR char *ME; STATIC_VAR char *ME, *MR, *MB, *MH, *MD;
STATIC_VAR char *MR;
#if 0
STATIC_VAR char *MB, *MH;
STATIC_VAR char *MD; /* may already be in use below */
#endif
#ifdef TERMLIB #ifdef TERMLIB
boolean dynamic_HIHE = FALSE; boolean dynamic_HIHE = FALSE;
#ifdef TEXTCOLOR
STATIC_VAR char *MD;
#endif
STATIC_VAR int SG; STATIC_VAR int SG;
STATIC_OVL char PC = '\0'; STATIC_OVL char PC = '\0';
STATIC_VAR char tbuf[512]; STATIC_VAR char tbuf[512];
@@ -177,7 +169,7 @@ int *wid, *hgt;
Sprintf(hilites[i], "\033[0;3%dm", i); Sprintf(hilites[i], "\033[0;3%dm", i);
} }
} }
#endif #endif /* TEXTCOLOR */
*wid = CO; *wid = CO;
*hgt = LI; *hgt = LI;
CL = "\033[2J"; /* last thing set */ CL = "\033[2J"; /* last thing set */
@@ -284,14 +276,12 @@ int *wid, *hgt;
KS = Tgetstr("ks"); /* keypad start (special mode) */ KS = Tgetstr("ks"); /* keypad start (special mode) */
KE = Tgetstr("ke"); /* keypad end (ordinary mode [ie, digits]) */ KE = Tgetstr("ke"); /* keypad end (ordinary mode [ie, digits]) */
MR = Tgetstr("mr"); /* reverse */ MR = Tgetstr("mr"); /* reverse */
#if 0
MB = Tgetstr("mb"); /* blink */ MB = Tgetstr("mb"); /* blink */
MD = Tgetstr("md"); /* boldface */ MD = Tgetstr("md"); /* boldface */
MH = Tgetstr("mh"); /* dim */ MH = Tgetstr("mh"); /* dim */
#endif
ME = Tgetstr("me"); /* turn off all attributes */ ME = Tgetstr("me"); /* turn off all attributes */
if (!ME || (SE == nullstr)) if (!ME)
ME = SE; /* default to SE value */ ME = SE ? SE : nullstr; /* default to SE value */
/* Get rid of padding numbers for nh_HI and nh_HE. Hope they /* Get rid of padding numbers for nh_HI and nh_HE. Hope they
* aren't really needed!!! nh_HI and nh_HE are outputted to the * aren't really needed!!! nh_HI and nh_HE are outputted to the
@@ -309,9 +299,6 @@ int *wid, *hgt;
AS = Tgetstr("as"); AS = Tgetstr("as");
AE = Tgetstr("ae"); AE = Tgetstr("ae");
nh_CD = Tgetstr("cd"); nh_CD = Tgetstr("cd");
#ifdef TEXTCOLOR
MD = Tgetstr("md");
#endif
#ifdef TEXTCOLOR #ifdef TEXTCOLOR
#if defined(TOS) && defined(__GNUC__) #if defined(TOS) && defined(__GNUC__)
if (!strcmp(term, "builtin") || !strcmp(term, "tw52") if (!strcmp(term, "builtin") || !strcmp(term, "tw52")
@@ -849,8 +836,7 @@ cl_eos() /* free after Robert Viduya */
#undef delay_output #undef delay_output
#undef TRUE #undef TRUE
#undef FALSE #undef FALSE
#define m_move curses_m_move /* Some curses.h decl m_move(), not used here \ #define m_move curses_m_move /* Some curses.h decl m_move(), not used here */
*/
#include <curses.h> #include <curses.h>
@@ -932,6 +918,7 @@ init_hilite()
c = 6; c = 6;
while (c--) { while (c--) {
char *work; char *work;
scratch = tparm(setf, ti_map[c].ti_color); scratch = tparm(setf, ti_map[c].ti_color);
work = (char *) alloc(strlen(scratch) + md_len + 1); work = (char *) alloc(strlen(scratch) + md_len + 1);
Strcpy(work, MD); Strcpy(work, MD);
@@ -1171,19 +1158,30 @@ s_atr2str(n)
int n; int n;
{ {
switch (n) { switch (n) {
case ATR_BLINK:
case ATR_ULINE: case ATR_ULINE:
if (nh_US) if (n == ATR_BLINK) {
return nh_US; if (MB && *MB)
return MB;
} else { /* Underline */
if (nh_US && *nh_US)
return nh_US;
}
/*FALLTHRU*/ /*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: if (MD && *MD)
#if defined(TERMLIB) && defined(TEXTCOLOR)
if (MD)
return MD; return MD;
#endif if (nh_HI && *nh_HI)
return nh_HI; return nh_HI;
break;
case ATR_INVERSE: case ATR_INVERSE:
return MR; if (MR && *MR)
return MR;
break;
case ATR_DIM:
if (MH && *MH)
return MH;
break;
} }
return nulstr; return nulstr;
} }
@@ -1194,14 +1192,19 @@ int n;
{ {
switch (n) { switch (n) {
case ATR_ULINE: case ATR_ULINE:
if (nh_UE) if (nh_UE && *nh_UE)
return nh_UE; return nh_UE;
/*FALLTHRU*/ /*FALLTHRU*/
case ATR_BOLD: case ATR_BOLD:
case ATR_BLINK: case ATR_BLINK:
return nh_HE; if (nh_HE && *nh_HE)
return nh_HE;
/*FALLTHRU*/
case ATR_DIM:
case ATR_INVERSE: case ATR_INVERSE:
return ME; if (ME && *ME)
return ME;
break;
} }
return nulstr; return nulstr;
} }
@@ -1213,18 +1216,19 @@ term_attr_fixup(msk)
int msk; int msk;
{ {
/* underline is converted to bold if its start sequence isn't available */ /* underline is converted to bold if its start sequence isn't available */
if ((msk & (1 << ATR_ULINE)) && !nh_US) { if ((msk & (1 << ATR_ULINE)) && (!nh_US || !*nh_US)) {
msk |= (1 << ATR_BOLD); msk |= (1 << ATR_BOLD);
msk &= ~(1 << ATR_ULINE); msk &= ~(1 << ATR_ULINE);
} }
/* blink is converted to bold unconditionally [why?] */ /* blink used to be converted to bold unconditionally; now depends on MB */
if (msk & (1 << ATR_BLINK)) { if (msk & (1 << ATR_BLINK) && (!MB || !*MB)) {
msk |= (1 << ATR_BOLD); msk |= (1 << ATR_BOLD);
msk &= ~(1 << ATR_BLINK); msk &= ~(1 << ATR_BLINK);
} }
/* dim is ignored */ /* dim is ignored if its start sequence isn't available */
if (msk & (1 << ATR_DIM)) if (msk & (1 << ATR_DIM) && (!MH || !*MH)) {
msk &= ~(1 << ATR_DIM); msk &= ~(1 << ATR_DIM);
}
return msk; return msk;
} }
@@ -1235,8 +1239,8 @@ int attr;
if (attr) { if (attr) {
const char *astr = s_atr2str(attr); const char *astr = s_atr2str(attr);
if (*astr) if (astr && *astr)
xputs(s_atr2str(attr)); xputs(astr);
} }
} }
@@ -1247,8 +1251,8 @@ int attr;
if (attr) { if (attr) {
const char *astr = e_atr2str(attr); const char *astr = e_atr2str(attr);
if (*astr) if (astr && *astr)
xputs(e_atr2str(attr)); xputs(astr);
} }
} }
@@ -1317,6 +1321,6 @@ int color;
#endif /* TEXTCOLOR */ #endif /* TEXTCOLOR */
#endif /* TTY_GRAPHICS */ #endif /* TTY_GRAPHICS && !NO_TERMS */
/*termcap.c*/ /*termcap.c*/