Merge branch 'master' into NetHack-3.7

This commit is contained in:
nhmall
2019-07-02 14:07:57 -04:00
5 changed files with 304 additions and 181 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.80 $ $NHDT-Date: 1561920590 2019/06/30 18:49:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.81 $ $NHDT-Date: 1562056615 2019/07/02 08:36:55 $
This fixes36.3 file is here to capture information about updates in the 3.6.x This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however, lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -184,6 +184,7 @@ curses+EDIT_GETLIN: when a prompt's answer was preloaded, using ESC to discard
curses+EDIT_GETLIN: the preceding fix handled an answer which spanned more curses+EDIT_GETLIN: the preceding fix handled an answer which spanned more
than one line but didn't remove the answer properly if the prompt than one line but didn't remove the answer properly if the prompt
portion of prompt+answer spanned more than one line portion of prompt+answer spanned more than one line
msdos: code fixes to allow a build with curses and PDCurses
tty: re-do one optimization used when status conditions have all been removed tty: re-do one optimization used when status conditions have all been removed
and remove another that tried to check whether condition text to be and remove another that tried to check whether condition text to be
displayed next was the same as the existing value; sometimes new displayed next was the same as the existing value; sometimes new
@@ -191,6 +192,8 @@ tty: re-do one optimization used when status conditions have all been removed
tty: take two, if/when autodecribe feedback wraps past top line, clear tty: take two, if/when autodecribe feedback wraps past top line, clear
continuation lines and redraw map if needed when top line is cleared continuation lines and redraw map if needed when top line is cleared
['exposed by git' section has an entry for reversal of 'take one'] ['exposed by git' section has an entry for reversal of 'take one']
tty: video attributes (bold, inverse, &c) for status highlighting sometimes
were scrambled
Windows: some startup error messages were not being delivered successfully Windows: some startup error messages were not being delivered successfully

View File

@@ -1,5 +1,5 @@
# NetHack 3.6 Makefile.GCC $NHDT-Date: 1519600525 2018/02/25 23:15:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $ # NetHack 3.6 Makefile.GCC $NHDT-Date: 1519600525 2018/02/25 23:15:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $
# Copyright (c) NetHack PC Development Team 1996-2006. # Copyright (c) NetHack PC Development Team 1996-2019.
# PC NetHack 3.6 Makefile for djgpp V2 # PC NetHack 3.6 Makefile for djgpp V2
# #
# Gnu gcc compiler for msdos (djgpp) # Gnu gcc compiler for msdos (djgpp)
@@ -25,6 +25,23 @@ GAME = nethack
# The GNU Make has a problem if you include a drive spec below (unfortunately). # The GNU Make has a problem if you include a drive spec below (unfortunately).
GAMEDIR =../binary GAMEDIR =../binary
# Optional PDCurses support
# Uncomment these and set them appropriately if you want to
# include curses port support alongside TTY support in your
# NetHack.exe binary.
#
# You'll have to set PDCURSES_H to the correct location of the
# PDCurses header (.h) files and PDCURSES_C to the location
# of your PDCurses C files which must already be resident on
# your machine.
#
ADD_CURSES=Y
PDCURSES_TOP=../../pdcurses
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
#==============================================================================
# #
# Directories, gcc likes unix style directory specs # Directories, gcc likes unix style directory specs
# #
@@ -38,6 +55,7 @@ SRC = ../src
SSHR = ../sys/share SSHR = ../sys/share
UTIL = ../util UTIL = ../util
WIN = ../win/tty WIN = ../win/tty
WCURSES = ../win/curses
WSHR = ../win/share WSHR = ../win/share
# #
@@ -67,7 +85,8 @@ LIBRARIES = $(LIBS) $(TERMLIB)
# If you have yacc/lex or a work-alike set YACC_LEX to Y # If you have yacc/lex or a work-alike set YACC_LEX to Y
# #
YACC_LEX = N YACC_LEX = N
ifeq ($(YACC_LEX),Y)
ifeq "$(YACC_LEX)" "Y"
DO_YACC = YACC_ACT DO_YACC = YACC_ACT
DO_LEX = LEX_ACT DO_LEX = LEX_ACT
endif endif
@@ -138,97 +157,39 @@ SUPPRESS_GRAPHICS =
GAMEFILE = $(GAMEDIR)/$(GAME).exe GAMEFILE = $(GAMEDIR)/$(GAME).exe
# Changing this conditional block is not recommended # Changing this conditional block is not recommended
ifeq ($(USE_DLB),Y) ifeq "$(USE_DLB)" "Y"
DLBFLG = -DDLB DLBFLG = -DDLB
else else
DLBFLG = DLBFLG =
endif endif
#
# Flags.
#
ifeq ($(SUPPRESS_GRAPHICS),Y)
TERMLIB = TERMLIB =
# Build NetHack suitable for blind players # Build NetHack suitable for blind players
# Debugging
#cflags = -pg -c -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS
#LFLAGS = -pg
cflags = -c -O -I../include $(DLBFLG) -DSUPPRESS_GRAPHICS
LFLAGS =
else
# Debugging
#cflags = -g -c -I../include $(DLBFLG) -DUSE_TILES
#LFLAGS = -g
# Normal
cflags = -c -O -I../include $(DLBFLG) -DUSE_TILES
LFLAGS =
endif
#==========================================
#================ RULES ==================
#==========================================
.SUFFIXES: .exe .o .til .uu .c .y .l
#==========================================
# Rules for files in src
#==========================================
$(OBJ)/%.o : /%.c
$(CC) $(cflags) -o$@ $<
$(OBJ)/%.o : $(SRC)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in sys/share
#==========================================
$(OBJ)/%.o : $(SSHR)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in sys/msdos
#==========================================
$(OBJ)/%.o : $(MSYS)/%.c
$(CC) $(cflags) -I../sys/msdos -o$@ $<
#==========================================
# Rules for files in util
#==========================================
$(OBJ)/%.o : $(UTIL)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in win/share
#==========================================
$(OBJ)/%.o : $(WSHR)/%.c
$(CC) $(cflags) -I../win/share -o$@ $<
#{$(WSHR)}.txt{$(DAT)}.txt:
# copy $< $@
#==========================================
# Rules for files in win/tty
#==========================================
$(OBJ)/%.o : $(TTY)/%.c
$(CC) $(cflags) -o$@ $<
#========================================== #==========================================
#================ MACROS ================== #================ MACROS ==================
#========================================== #==========================================
# This section creates shorthand macros for many objects # This section creates shorthand macros for many objects
# referenced later on in the Makefile. # referenced later on in the Makefile.
# #
# Have windows path styles available for use in commands
#
W_OBJ =$(subst /,\, $(OBJ))
W_INCL =$(subst /,\, $(INCL))
W_DAT =$(subst /,\, $(DAT))
W_DOC =$(subst /,\, $(DOC))
W_UTIL =$(subst /,\, $(UTIL))
W_SRC =$(subst /,\, $(SRC))
W_SSYS =$(subst /,\, $(SSYS))
W_MSWSYS =$(subst /,\, $(MSWSYS))
W_TTY =$(subst /,\, $(TTY))
W_MSWIN =$(subst /,\, $(MSWIN))
ifeq "$(ADD_CURSES)" "Y"
W_WCURSES =$(subst /,\, $(WCURSES))
endif
W_WSHR =$(subst /,\, $(WSHR))
W_GAMEDIR =$(subst /,\, $(GAMEDIR))
# #
# Shorten up the location for some files # Shorten up the location for some files
# #
@@ -249,7 +210,7 @@ SPLEVSRC = lev_yacc.c lev_$(LEX).c lev_main.c panic.c
DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c DGNCOMPSRC = dgn_yacc.c dgn_$(LEX).c dgn_main.c
MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o MAKEDEFSOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \ SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o $(O)alloc.o \
$(O)monst.o $(O)objects.o $(O)panic.o \ $(O)monst.o $(O)objects.o $(O)panic.o \
@@ -339,21 +300,59 @@ VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o
VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o
VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o
VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o
VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) VOBJ23 = $(O)region.o $(O)sys.o $(REGEX) $(O)isaac64.o
SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \ SOBJ = $(O)msdos.o $(O)pcsys.o $(O)tty.o $(O)unix.o \
$(O)video.o $(O)vidtxt.o $(O)pckeys.o $(O)video.o $(O)vidtxt.o $(O)pckeys.o
VVOBJ = $(O)version.o VVOBJ = $(O)version.o
ifeq "$(ADD_CURSES)" "Y"
CURSESOBJ= $(O)cursdial.o $(O)cursinit.o $(O)cursinvt.o $(O)cursmain.o \
$(O)cursmesg.o $(O)cursmisc.o $(O)cursstat.o $(O)curswins.o
else
CURSESOBJ=
endif
VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ VOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
$(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
$(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \
$(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ21) $(VOBJ22) $(VOBJ23) \
$(CURSESOBJ)
ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ) ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
ifeq "$(ADD_CURSES)" "Y"
#==========================================
# PDCurses build macros
#==========================================
PDCURSES_CURSES_H = $(PDCURSES_TOP)/curses.h
PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)/curspriv.h
PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)
PDCSRC = $(PDCURSES_TOP)/pdcurses
PDCDOS = $(PDCURSES_TOP)/dos
PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \
$(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \
$(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \
$(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \
$(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \
$(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \
$(O)slk.o $(O)termattr.o $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o
PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o \
$(O)pdcscrn.o $(O)pdcsetsc.o $(O)pdcutil.o
#PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
# $(O)pdcsetsc.o $(O)pdcutil.o
PDCLIB = $(O)pdcurses.a
PDCINCL = -I$(PDCURSES_TOP) -I$(PDCSRC) -I$(PDCDOS)
else
PDCLIB =
endif
#========================================== #==========================================
# Header file macros # Header file macros
#========================================== #==========================================
@@ -410,6 +409,108 @@ DJ1 = $(dir $(DJGPP))
CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.* CWSDPMI = $(subst /,\,$(DJ1))bin\CWSDPMI.*
endif endif
#==========================================
# More compiler setup macros
#==========================================
#
ifeq "$(ADD_CURSES)" "Y"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
else
CURSESDEF=
CURSESLIB=
endif
INCLDIR=-I../include -I../sys/msdos
# Debugging
#cflags = -pg -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS
#LFLAGS = -pg
cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DSUPPRESS_GRAPHICS
LFLAGS =
# Debugging
#cflags = -g -c $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES
#LFLAGS = -g
# Normal
cflags = -c -O $(INCLDIR) $(DLBFLG) $(CURSESDEF) -DUSE_TILES
LFLAGS =
#==========================================
#================ RULES ==================
#==========================================
.SUFFIXES: .exe .o .til .uu .c .y .l
#==========================================
# Rules for files in src
#==========================================
$(OBJ)/%.o : /%.c
$(CC) $(cflags) -o$@ $<
$(OBJ)/%.o : $(SRC)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in sys/share
#==========================================
$(OBJ)/%.o : $(SSHR)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in sys/msdos
#==========================================
$(OBJ)/%.o : $(MSYS)/%.c
$(CC) $(cflags) -I../sys/msdos -o$@ $<
#==========================================
# Rules for files in util
#==========================================
$(OBJ)/%.o : $(UTIL)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in win/share
#==========================================
$(OBJ)/%.o : $(WSHR)/%.c
$(CC) $(cflags) -I../win/share -o$@ $<
#{$(WSHR)}.txt{$(DAT)}.txt:
# copy $< $@
#==========================================
# Rules for files in win/tty
#==========================================
$(OBJ)/%.o : $(TTY)/%.c
$(CC) $(cflags) -o$@ $<
#==========================================
# Rules for files in win/curses
#==========================================
$(OBJ)/%.o : $(WCURSES)/%.c
$(CC) -DPDC_NCMOUSE $(PDCINCL) $(cflags) -o$@ $<
#==========================================
# Rules for files in PDCurses
#==========================================
$(OBJ)/%.o : $(PDCURSES_TOP)/%.c
$(CC) $(PDCINCL) $(cflags) -o$@ $<
$(OBJ)/%.o : $(PDCSRC)/%.c
$(CC) $(PDCINCL) $(cflags) -o$@ $<
$(OBJ)/%.o : $(PDCDOS)/%.c
$(CC) $(PDCINCL) $(cflags) -o$@ $<
#========================================== #==========================================
# Primary Targets. # Primary Targets.
#========================================== #==========================================
@@ -425,9 +526,11 @@ default: $(GAMEFILE)
util: $(O)utility.tag util: $(O)utility.tag
$(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \ LEVCOMPEXE = $(U)lev_comp.exe
$(INCL)/pm.h monstr.c vis_tab.c \
$(U)lev_comp.exe $(U)dgn_comp.exe $(TILEUTIL) $(O)utility.tag: $(INCL)/date.h $(INCL)/trap.h $(INCL)/onames.h \
$(INCL)/pm.h monstr.c vis_tab.c $(LEVCOMPEXE) \
$(U)dgn_comp.exe $(TILEUTIL)
$(subst /,\,echo utilities made > $@) $(subst /,\,echo utilities made > $@)
tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe tileutil: $(U)gif2txt.exe $(U)txt2ppm.exe
@@ -455,7 +558,7 @@ endif
@$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)) @$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR))
@$(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh) @$(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh)
-@$(subst /,\,touch $(GAMEDIR)/record) -@$(subst /,\,touch $(GAMEDIR)/record)
@$(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR)) @$(subst /,\,copy $(DOC)/guideb*.txt $(GAMEDIR))
@$(subst /,\,copy ../sys/winnt/sysconf $(GAMEDIR)) @$(subst /,\,copy ../sys/winnt/sysconf $(GAMEDIR))
@$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)) @$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR))
ifdef CWSDPMI ifdef CWSDPMI
@@ -469,7 +572,8 @@ endif
# The main target. # The main target.
#========================================== #==========================================
$(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk $(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(PDCLIB) \
$(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk
@if exist temp.a del temp.a @if exist temp.a del temp.a
@ar ru temp.a $(VOBJ01) @ar ru temp.a $(VOBJ01)
@ar ru temp.a $(VOBJ02) @ar ru temp.a $(VOBJ02)
@@ -494,11 +598,17 @@ $(GAMEFILE): $(O)obj.tag $(PATCHLEV_H) $(O)utility.tag $(ALLOBJ) $(O)$(GAME).lnk
@ar ru temp.a $(VOBJ21) @ar ru temp.a $(VOBJ21)
@ar ru temp.a $(VOBJ22) @ar ru temp.a $(VOBJ22)
@ar ru temp.a $(VOBJ23) @ar ru temp.a $(VOBJ23)
@ar ru temp.a $(VOBJ24)
@ar ru temp.a $(VOBJ25)
@ar ru temp.a $(SOBJ) @ar ru temp.a $(SOBJ)
@ar ru temp.a $(TILOBJ) @ar ru temp.a $(TILOBJ)
@ar ru temp.a $(TILOBJ2) @ar ru temp.a $(TILOBJ2)
@ar ru temp.a $(VVOBJ) @ar ru temp.a $(VVOBJ)
$(LINK) $(LFLAGS) -o$(GAME).exe temp.a $(LIBRARIES) $(ZLIB) ifeq "$(ADD_CURSES)" "Y"
@ar ru temp.a $(CURSESOBJ)
endif
$(LINK) $(LFLAGS) -o$(GAME).exe temp.a \
$(PDCLIB) $(LIBRARIES) $(ZLIB)
@$(subst /,\,stubedit $(GAME).exe minstack=2048K) @$(subst /,\,stubedit $(GAME).exe minstack=2048K)
@$(subst /,\,copy $(GAME).exe $(GAMEFILE)) @$(subst /,\,copy $(GAME).exe $(GAMEFILE))
@$(subst /,\,del $(GAME).exe) @$(subst /,\,del $(GAME).exe)
@@ -527,86 +637,15 @@ $(O)$(GAME).lnk: $(ALLOBJ)
echo $(VOBJ21) >> $(subst /,\,$@) echo $(VOBJ21) >> $(subst /,\,$@)
echo $(VOBJ22) >> $(subst /,\,$@) echo $(VOBJ22) >> $(subst /,\,$@)
echo $(VOBJ23) >> $(subst /,\,$@) echo $(VOBJ23) >> $(subst /,\,$@)
echo $(VOBJ24) >> $(subst /,\,$@)
echo $(VOBJ25) >> $(subst /,\,$@)
echo $(SOBJ) >> $(subst /,\,$@) echo $(SOBJ) >> $(subst /,\,$@)
echo $(TILOBJ) >> $(subst /,\,$@) echo $(TILOBJ) >> $(subst /,\,$@)
echo $(TILOBJ2) >> $(subst /,\,$@) echo $(TILOBJ2) >> $(subst /,\,$@)
echo $(VVOBJ) >> $(subst /,\,$@) echo $(VVOBJ) >> $(subst /,\,$@)
ifeq "$(ADD_CURSES)" "Y"
echo $(CURSESOBJ) >> $(subst /,\,$@)
#========================================== endif
# Housekeeping.
#==========================================
clean:
$(subst /,\,if exist $(O)*.o del $(O)*.o)
$(subst /,\,if exist $(O)dat.tag del $(O)dat.tag)
$(subst /,\,if exist $(O)install.tag del $(O)install.tag)
$(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk)
$(subst /,\,if exist $(O)obj.tag del $(O)obj.tag)
$(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag)
$(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag)
$(subst /,\,if exist $(O)utility.tag del $(O)utility.tag)
$(subst /,\,if exist temp.a del temp.a)
spotless: clean
$(subst /,\,if exist $(U)lev_flex.c del $(U)lev_flex.c)
$(subst /,\,if exist $(U)lev_lex.c del $(U)lev_lex.c)
$(subst /,\,if exist $(U)lev_yacc.c del $(U)lev_yacc.c)
$(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c)
$(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c)
$(subst /,\,if exist $(U)dgn_yacc.c del $(U)lev_yacc.c)
$(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe)
$(subst /,\,if exist $(U)lev_comp.exe del $(U)lev_comp.exe)
$(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe)
$(subst /,\,if exist $(U)recover.exe del $(U)recover.exe)
$(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe)
$(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe)
$(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe)
$(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe)
$(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe)
$(subst /,\,if exist $(U)dlb_main.exe del $(U)dlb_main.exe)
$(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h)
$(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h)
$(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h)
$(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h)
$(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h)
$(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h)
$(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c)
$(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
$(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c)
$(subst /,\,if exist $(DAT)/options del $(DAT)/options)
$(subst /,\,if exist $(DAT)/data del $(DAT)/data)
$(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
$(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf)
$(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon)
$(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
$(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
$(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon)
$(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave)
$(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph)
$(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat)
$(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev)
$(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP))
$(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt)
$(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt)
$(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt)
#==========================================
# Create directory for holding object files
#==========================================
$(O)obj.tag:
-$(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ))
@$(subst /,\,@echo directory created > $@)
#===========================================
# Work around some djgpp long file name woes
#===========================================
$(PATCHLEV_H):
@$(subst /,\,if not exist $@ copy $(INCL)/patchlevel.h $(INCL)/patchlev.h)
#========================================== #==========================================
#=========== SECONDARY TARGETS ============ #=========== SECONDARY TARGETS ============
@@ -640,8 +679,8 @@ vis_tab.c: $(U)makedefs.exe
# Makedefs Stuff # Makedefs Stuff
#========================================== #==========================================
$(U)makedefs.exe: $(MAKEOBJS) $(U)makedefs.exe: $(MAKEDEFSOBJS)
$(LINK) $(LFLAGS) -o$@ $(MAKEOBJS) $(LINK) $(LFLAGS) -o$@ $(MAKEDEFSOBJS)
$(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \ $(O)makedefs.o: $(CONFIG_H) $(PERMONST_H) $(INCL)/objclass.h \
$(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c $(INCL)/monsym.h $(INCL)/qtext.h $(U)makedefs.c
@@ -900,6 +939,13 @@ $(O)viewtib.o: $(MSYS)/viewtib.c
endif endif
#==========================================
# PDCurses Library
#==========================================
$(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
ar rcs $@ $(PDCLIBOBJS) $(PDCOBJS)
#========================================== #==========================================
# Other Util Dependencies. # Other Util Dependencies.
#========================================== #==========================================
@@ -954,7 +1000,8 @@ $(DAT)/engrave: $(O)utility.tag $(DAT)/engrave.txt
$(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt $(DAT)/epitaph: $(O)utility.tag $(DAT)/epitaph.txt
@$(subst /,\,$(U)makedefs.exe -s) @$(subst /,\,$(U)makedefs.exe -s)
$(O)sp_lev.tag: $(O)utility.tag $(DAT)/bigroom.des $(DAT)/castle.des \ $(O)sp_lev.tag: $(O)utility.tag \
$(DAT)/bigroom.des $(DAT)/castle.des \
$(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \ $(DAT)/endgame.des $(DAT)/gehennom.des $(DAT)/knox.des \
$(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \ $(DAT)/medusa.des $(DAT)/oracle.des $(DAT)/tower.des \
$(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \ $(DAT)/yendor.des $(DAT)/arch.des $(DAT)/barb.des \
@@ -1021,6 +1068,76 @@ $(U)dlb_main.exe: $(DLBOBJS)
$(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H) $(O)dlb_main.o: $(U)dlb_main.c $(INCL)/config.h $(DLB_H)
$(CC) $(cflags) -o$@ $(U)dlb_main.c $(CC) $(cflags) -o$@ $(U)dlb_main.c
#==========================================
# Housekeeping.
#==========================================
clean:
$(subst /,\,if exist $(O)*.o del $(O)*.o)
$(subst /,\,if exist $(O)dat.tag del $(O)dat.tag)
$(subst /,\,if exist $(O)install.tag del $(O)install.tag)
$(subst /,\,if exist $(O)$(GAME).lnk del $(O)$(GAME).lnk)
$(subst /,\,if exist $(O)obj.tag del $(O)obj.tag)
$(subst /,\,if exist $(O)sp_lev.tag del $(O)sp_lev.tag)
$(subst /,\,if exist $(O)thintile.tag del $(O)thintile.tag)
$(subst /,\,if exist $(O)utility.tag del $(O)utility.tag)
$(subst /,\,if exist temp.a del temp.a)
spotless: clean
$(subst /,\,if exist $(U)dgn_flex.c del $(U)dgn_flex.c)
$(subst /,\,if exist $(U)dgn_lex.c del $(U)dgn_lex.c)
$(subst /,\,if exist $(U)makedefs.exe del $(U)makedefs.exe)
$(subst /,\,if exist $(U)dgn_comp.exe del $(U)dgn_comp.exe)
$(subst /,\,if exist $(U)recover.exe del $(U)recover.exe)
$(subst /,\,if exist $(U)tilemap.exe del $(U)tilemap.exe)
$(subst /,\,if exist $(U)tile2bmp.exe del $(U)tile2bmp.exe)
$(subst /,\,if exist $(U)tile2bin.exe del $(U)tile2bin.exe)
$(subst /,\,if exist $(U)til2bin2.exe del $(U)til2bin2.exe)
$(subst /,\,if exist $(U)thintile.exe del $(U)thintile.exe)
$(subst /,\,if exist $(U)dlb_main.exe del $(U)dlb_main.exe)
$(subst /,\,if exist $(INCL)/vis_tab.h del $(INCL)/vis_tab.h)
$(subst /,\,if exist $(INCL)/onames.h del $(INCL)/onames.h)
$(subst /,\,if exist $(INCL)/pm.h del $(INCL)/pm.h)
$(subst /,\,if exist $(INCL)/date.h del $(INCL)/date.h)
$(subst /,\,if exist $(INCL)/dgn_comp.h del $(INCL)/dgn_comp.h)
$(subst /,\,if exist $(INCL)/lev_comp.h del $(INCL)/lev_comp.h)
$(subst /,\,if exist $(SRC)/monstr.c del $(SRC)/monstr.c)
$(subst /,\,if exist $(SRC)/vis_tab.c del $(SRC)/vis_tab.c)
$(subst /,\,if exist $(SRC)/tile.c del $(SRC)/tile.c)
$(subst /,\,if exist $(DAT)/options del $(DAT)/options)
$(subst /,\,if exist $(DAT)/data del $(DAT)/data)
$(subst /,\,if exist $(DAT)/rumors del $(DAT)/rumors)
$(subst /,\,if exist $(DAT)/dungeon.pdf del $(DAT)/dungeon.pdf)
$(subst /,\,if exist $(DAT)/dungeon del $(DAT)/dungeon)
$(subst /,\,if exist $(DAT)/oracles del $(DAT)/oracles)
$(subst /,\,if exist $(DAT)/quest.dat del $(DAT)/quest.dat)
$(subst /,\,if exist $(DAT)/bogusmon del $(DAT)/bogusmon)
$(subst /,\,if exist $(DAT)/engrave del $(DAT)/engrave)
$(subst /,\,if exist $(DAT)/epitaph del $(DAT)/epitaph)
$(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst)
$(subst /,\,if exist $(DAT)/nhdat del $(DAT)/nhdat)
$(subst /,\,if exist $(DAT)/*.lev del $(DAT)/*.lev)
$(subst /,\,if exist $(TILE_BMP) del $(TILE_BMP))
$(subst /,\,if exist $(WSHR)/monthin.txt del $(WSHR)/monthin.txt)
$(subst /,\,if exist $(WSHR)/objthin.txt del $(WSHR)/objthin.txt)
$(subst /,\,if exist $(WSHR)/oththin.txt del $(WSHR)/oththin.txt)
#==========================================
# Create directory for holding object files
#==========================================
$(O)obj.tag:
-$(subst /,\,@if not exist $(OBJ)/*.* mkdir $(OBJ))
@$(subst /,\,@echo directory created > $@)
#===========================================
# Work around some djgpp long file name woes
#===========================================
$(PATCHLEV_H):
@$(subst /,\,if not exist $@ copy $(INCL)/patchlevel.h $(INCL)/patchlev.h)
#========================================== #==========================================
# Game Dependencies # Game Dependencies
#========================================== #==========================================

View File

@@ -1,10 +1,10 @@
@echo off @echo off
REM NetHack 3.6 setup.bat $NHDT-Date: 1432512792 2015/05/25 00:13:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ REM NetHack 3.6 setup.bat $NHDT-Date: 1432512792 2015/05/25 00:13:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $
REM Copyright (c) NetHack PC Development Team 1990 - 2018 REM Copyright (c) NetHack PC Development Team 1990 - 2019
REM NetHack may be freely redistributed. See license for details. REM NetHack may be freely redistributed. See license for details.
echo. echo.
echo Copyright (c) NetHack PC Development Team 1990 - 2018 echo Copyright (c) NetHack PC Development Team 1990 - 2019
echo NetHack may be freely redistributed. See license for details. echo NetHack may be freely redistributed. See license for details.
echo. echo.
REM setup batch file for msdos, see Install.dos for details. REM setup batch file for msdos, see Install.dos for details.
@@ -19,7 +19,6 @@ if not exist ..\..\src\hack.c goto err_dir
if not exist ..\..\dat\wizard.des goto err_dir if not exist ..\..\dat\wizard.des goto err_dir
if not exist ..\..\util\makedefs.c goto err_dir if not exist ..\..\util\makedefs.c goto err_dir
if not exist ..\..\win\tty\wintty.c goto err_dir if not exist ..\..\win\tty\wintty.c goto err_dir
if not exist ..\share\lev_yacc.c goto err_dir
echo Directories OK. echo Directories OK.
if not exist ..\..\binary\* mkdir ..\..\binary if not exist ..\..\binary\* mkdir ..\..\binary
@@ -81,7 +80,7 @@ ren ..\..\sys\share\posixregex.c posixreg.c
goto long4ok goto long4ok
:long4b :long4b
echo "Renaming ..\..\sys\share\posixr~1.c -> ..\..\sys\share\posixreg.c" echo "Renaming ..\..\sys\share\posixr~1.c -> ..\..\sys\share\posixreg.c"
ren ..\..\sys\share\posixr~1.h posixreg.c ren ..\..\sys\share\posixr~1.c posixreg.c
:long4ok :long4ok
if "%1"=="GCC" goto ok_gcc if "%1"=="GCC" goto ok_gcc

View File

@@ -5,7 +5,11 @@
#include "curses.h" #include "curses.h"
#include "hack.h" #include "hack.h"
#ifdef SHORT_FILENAMES
#include "patchlev.h"
#else
#include "patchlevel.h" #include "patchlevel.h"
#endif
#include "color.h" #include "color.h"
#include "wincurs.h" #include "wincurs.h"

View File

@@ -1,4 +1,4 @@
/* 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 $ */ /* NetHack 3.6 termcap.c $NHDT-Date: 1562056615 2019/07/02 08:36:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.31 $ */
/* 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. */
@@ -1216,18 +1216,18 @@ 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 || !*nh_US)) { if ((msk & HL_ULINE) && (!nh_US || !*nh_US)) {
msk |= (1 << ATR_BOLD); msk |= HL_BOLD;
msk &= ~(1 << ATR_ULINE); msk &= ~HL_ULINE;
} }
/* blink used to be converted to bold unconditionally; now depends on MB */ /* blink used to be converted to bold unconditionally; now depends on MB */
if (msk & (1 << ATR_BLINK) && (!MB || !*MB)) { if ((msk & HL_BLINK) && (!MB || !*MB)) {
msk |= (1 << ATR_BOLD); msk |= HL_BOLD;
msk &= ~(1 << ATR_BLINK); msk &= ~HL_BLINK;
} }
/* dim is ignored if its start sequence isn't available */ /* dim is ignored if its start sequence isn't available */
if (msk & (1 << ATR_DIM) && (!MH || !*MH)) { if ((msk & HL_DIM) && (!MH || !*MH)) {
msk &= ~(1 << ATR_DIM); msk &= ~HL_DIM;
} }
return msk; return msk;
} }