Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

This commit is contained in:
nhmall
2018-11-30 20:25:13 -05:00
19 changed files with 310 additions and 210 deletions
+8
View File
@@ -229,6 +229,11 @@ stinking cloud placed near water could kill underwater creatures
applying--rather than wielding--a cursed polearm or weapon-tool didn't report applying--rather than wielding--a cursed polearm or weapon-tool didn't report
that it had become welded to hero's hand(s) that it had become welded to hero's hand(s)
the message when riding a steed into a pit was composed but not shown the message when riding a steed into a pit was composed but not shown
dismount that kills steed because there is no room to put it on map blamed the
hero; change that to only blame hero if dismount was voluntary
to emphasize that it's not a light source, change description of wielded Sting
from "(glowing light blue)" to "(light blue aura)" when sighted and
from "(glowing)" to nothing (not warm enough to feel) when blind
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
@@ -328,6 +333,9 @@ X11: don't reuse perm_invent window for picking an object
X11: obey mouse_support and allow toggling it in game X11: obey mouse_support and allow toggling it in game
X11: obey menu movement keys X11: obey menu movement keys
X11: enable menu [cancel] button for PICK_NONE menus X11: enable menu [cancel] button for PICK_NONE menus
X11: text popups on OSX wouldn't accept keyboard input unless the 'autofocus'
resource was enabled; most noticeable when trying to dismiss 'things
that are here' while walking over object piles
General New Features General New Features
+9
View File
@@ -94,6 +94,15 @@ extern void FDECL(interject, (int));
*=============================================== *===============================================
*/ */
#ifdef __MINGW32__
#ifdef strncasecmp
#undef strncasecmp
#endif
#ifdef strcasecmp
#undef strcasecmp
#endif
#endif
#ifdef _MSC_VER #ifdef _MSC_VER
#if (_MSC_VER > 1000) #if (_MSC_VER > 1000)
/* Visual C 8 warning elimination */ /* Visual C 8 warning elimination */
+1
View File
@@ -165,6 +165,7 @@ struct menu_info_t {
boolean cancelled; /* Menu has been explicitly cancelled. */ boolean cancelled; /* Menu has been explicitly cancelled. */
boolean counting; /* true when menu_count has a valid value */ boolean counting; /* true when menu_count has a valid value */
boolean permi; boolean permi;
boolean disable_mcolors; /* disable menucolors */
int permi_x, permi_y; /* perm_invent window x,y */ int permi_x, permi_y; /* perm_invent window x,y */
int permi_w, permi_h; /* perm_invent window wid, hei */ int permi_w, permi_h; /* perm_invent window wid, hei */
+5 -10
View File
@@ -7,16 +7,11 @@
/* Global declarations for curses interface */ /* Global declarations for curses interface */
int term_rows, term_cols; /* size of underlying terminal */ extern int term_rows, term_cols; /* size of underlying terminal */
extern int orig_cursor; /* Preserve initial cursor state */
WINDOW *base_term; /* underlying terminal window */ extern WINDOW *base_term; /* underlying terminal window */
extern boolean counting; /* Count window is active */
WINDOW *mapwin, *statuswin, *messagewin; /* Main windows */ extern WINDOW *mapwin, *statuswin, *messagewin; /* Main windows */
int orig_cursor; /* Preserve initial cursor state */
boolean counting; /* Count window is active */
#define TEXTCOLOR /* Allow color */ #define TEXTCOLOR /* Allow color */
#define NHW_END 19 #define NHW_END 19
+5 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 mondata.c $NHDT-Date: 1539938825 2018/10/19 08:47:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */ /* NetHack 3.6 mondata.c $NHDT-Date: 1543545188 2018/11/30 02:33:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.69 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -739,6 +739,10 @@ const char *in_str;
/* Outdated names */ /* Outdated names */
{ "invisible stalker", PM_STALKER }, { "invisible stalker", PM_STALKER },
{ "high-elf", PM_ELVENKING }, /* PM_HIGH_ELF is obsolete */ { "high-elf", PM_ELVENKING }, /* PM_HIGH_ELF is obsolete */
/* other misspellings or incorrect words */
{ "wood-elf", PM_WOODLAND_ELF },
{ "wood elf", PM_WOODLAND_ELF },
{ "woodland nymph", PM_WOOD_NYMPH },
{ "halfling", PM_HOBBIT }, /* potential guess for polyself */ { "halfling", PM_HOBBIT }, /* potential guess for polyself */
{ "genie", PM_DJINNI }, /* potential guess for ^G/#wizgenesis */ { "genie", PM_DJINNI }, /* potential guess for ^G/#wizgenesis */
/* Hyphenated names -- it would be nice to handle these via /* Hyphenated names -- it would be nice to handle these via
+5 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1539938837 2018/10/19 08:47:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.214 $ */ /* NetHack 3.6 objnam.c $NHDT-Date: 1543544340 2018/11/30 02:19:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.226 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1154,11 +1154,11 @@ unsigned doname_flags;
(obj->otyp == AKLYS) ? "tethered " : "", hand_s); (obj->otyp == AKLYS) ? "tethered " : "", hand_s);
if (warn_obj_cnt && obj == uwep && (EWarn_of_mon & W_WEP) != 0L) { if (warn_obj_cnt && obj == uwep && (EWarn_of_mon & W_WEP) != 0L) {
/* presumably can be felt when blind */ /* this used to be "(glowing <color>)" when sighted or
Strcat(bp, " (glowing"); "(glowing)" when blind (via feeling warmth), but it
isn't a light source so describe something fainter */
if (!Blind) if (!Blind)
Sprintf(eos(bp), " %s", glow_color(obj->oartifact)); Sprintf(eos(bp), " (%s aura)", glow_color(obj->oartifact));
Strcat(bp, ")");
} }
} }
} }
+34 -14
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 steed.c $NHDT-Date: 1543522486 2018/11/29 20:14:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */ /* NetHack 3.6 steed.c $NHDT-Date: 1543543362 2018/11/30 02:02:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
/* Copyright (c) Kevin Hugo, 1998-1999. */ /* Copyright (c) Kevin Hugo, 1998-1999. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -563,8 +563,17 @@ int reason; /* Player was thrown off etc. */
* be hostile terrain. * be hostile terrain.
*/ */
steedcc.x = u.ux, steedcc.y = u.uy; steedcc.x = u.ux, steedcc.y = u.uy;
if (m_at(u.ux, u.uy)) if (m_at(u.ux, u.uy)) {
(void) enexto(&steedcc, u.ux, u.uy, mtmp->data); /* hero's spot has a monster in it; hero must have been plucked
from saddle as engulfer moved into his spot--other dismounts
shouldn't run into this situation; find nearest viable spot */
if (!enexto(&steedcc, u.ux, u.uy, mtmp->data)
/* no spot? must have been engulfed by a lurker-above over
water or lava; try requesting a location for a flyer */
&& !enexto(&steedcc, u.ux, u.uy, &mons[PM_BAT]))
/* still no spot; last resort is any spot within bounds */
(void) enexto(&steedcc, u.ux, u.uy, &mons[PM_GHOST]);
}
if (!m_at(steedcc.x, steedcc.y)) { if (!m_at(steedcc.x, steedcc.y)) {
if (mtmp->mhp < 1) if (mtmp->mhp < 1)
mtmp->mhp = 0; /* make sure it isn't negative */ mtmp->mhp = 0; /* make sure it isn't negative */
@@ -576,8 +585,8 @@ int reason; /* Player was thrown off etc. */
} }
if (!DEADMONSTER(mtmp)) { if (!DEADMONSTER(mtmp)) {
/* Set player and steed's position. Try moving the player first /* if for bones, there's no reason to place the hero;
unless we're in the midst of creating a bones file. */ we want to make room for potential ghost, so move steed */
if (reason == DISMOUNT_BONES) { if (reason == DISMOUNT_BONES) {
/* move the steed to an adjacent square */ /* move the steed to an adjacent square */
if (enexto(&cc, u.ux, u.uy, mtmp->data)) if (enexto(&cc, u.ux, u.uy, mtmp->data))
@@ -586,6 +595,8 @@ int reason; /* Player was thrown off etc. */
(void) rloc(mtmp, FALSE); (void) rloc(mtmp, FALSE);
return; return;
} }
/* Set hero's and/or steed's positions. Try moving the hero first. */
if (!u.uswallow && !u.ustuck && have_spot) { if (!u.uswallow && !u.ustuck && have_spot) {
struct permonst *mdat = mtmp->data; struct permonst *mdat = mtmp->data;
@@ -639,20 +650,29 @@ int reason; /* Player was thrown off etc. */
if (save_utrap) if (save_utrap)
(void) mintrap(mtmp); (void) mintrap(mtmp);
} }
/* Couldn't... try placing the steed */
/* Couldn't move hero... try moving the steed. */
} else if (enexto(&cc, u.ux, u.uy, mtmp->data)) { } else if (enexto(&cc, u.ux, u.uy, mtmp->data)) {
/* Keep player here, move the steed to cc */ /* Keep player here, move the steed to cc */
rloc_to(mtmp, cc.x, cc.y); rloc_to(mtmp, cc.x, cc.y);
/* Player stays put */ /* Player stays put */
/* Otherwise, kill the steed */
} else {
killed(mtmp);
adjalign(-1);
}
}
/* Return the player to the floor */ /* Otherwise, kill the steed. */
if (reason != DISMOUNT_ENGULFED) { } else {
if (reason == DISMOUNT_BYCHOICE) {
/* [un]#ride: hero gets credit/blame for killing steed */
killed(mtmp);
adjalign(-1);
} else {
/* other dismount: kill former steed with no penalty;
damage type is just "neither AD_DGST nor -AD_RBRE" */
monkilled(mtmp, "", -AD_PHYS);
}
}
} /* !DEADMONST(mtmp) */
/* usually return the hero to the surface */
if (reason != DISMOUNT_ENGULFED && reason != DISMOUNT_BONES) {
in_steed_dismounting = TRUE; in_steed_dismounting = TRUE;
(void) float_down(0L, W_SADDLE); (void) float_down(0L, W_SADDLE);
in_steed_dismounting = FALSE; in_steed_dismounting = FALSE;
+4 -2
View File
@@ -87,9 +87,12 @@ unsigned _stklen = STKSIZ;
* to help MinGW decide which entry point to choose. If both main and * to help MinGW decide which entry point to choose. If both main and
* WinMain exist, the resulting executable won't work correctly. * WinMain exist, the resulting executable won't work correctly.
*/ */
#ifndef __MINGW32__
int int
#ifndef __MINGW32__
main(argc, argv) main(argc, argv)
#else
mingw_main(argc, argv)
#endif
int argc; int argc;
char *argv[]; char *argv[];
{ {
@@ -115,7 +118,6 @@ char *argv[];
/*NOTREACHED*/ /*NOTREACHED*/
return 0; return 0;
} }
#endif
boolean boolean
pcmain(argc, argv) pcmain(argc, argv)
+7 -7
View File
@@ -1,5 +1,5 @@
# NetHack Makefile (VMS) - for building nethack itself. # NetHack Makefile (VMS) - for building nethack itself.
# NetHack 3.6 Makefile.src $NHDT-Date: 1542388601 2018/11/16 17:16:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.31 $ # NetHack 3.6 Makefile.src $NHDT-Date: 1543545915 2018/11/30 02:45:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.32 $
# Copyright (c) 2011 by Robert Patrick Rankin # Copyright (c) 2011 by Robert Patrick Rankin
# NetHack may be freely redistributed. See license for details. # NetHack may be freely redistributed. See license for details.
@@ -140,9 +140,9 @@ VERSOURCES = $(HACKCSRC) $(SYSSRC) $(WINSRC) $(RANDSRC) $(GENCSRC)
HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \
config.h config1.h context.h coord.h decl.h def_os2.h display.h \ config.h config1.h context.h coord.h decl.h def_os2.h display.h \
dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h global.h \ dlb.h dungeon.h engrave.h extern.h flag.h func_tab.h global.h \
hack.h lev.h macconf.h mextra.h mfndpos.h micro.h \ hack.h lev.h macconf.h mextra.h mfndpos.h micro.h mkroom.h \
mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h obj.h \ monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \
objclass.h os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h \ os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h \
region.h rm.h sp_lev.h spell.h sys.h system.h tcap.h timeout.h \ region.h rm.h sp_lev.h spell.h sys.h system.h tcap.h timeout.h \
tosconf.h tradstdc.h trampoli.h trap.h unixconf.h vision.h \ tosconf.h tradstdc.h trampoli.h trap.h unixconf.h vision.h \
vmsconf.h wintty.h winX.h winprocs.h wintype.h you.h youprop.h vmsconf.h wintty.h winX.h winprocs.h wintype.h you.h youprop.h
@@ -206,8 +206,8 @@ nethack.opt : $(MAKEFILE) # this file
@ write f f$edit("$(HOBJ5)","COLLAPSE") @ write f f$edit("$(HOBJ5)","COLLAPSE")
@ write f f$edit("$(HOBJ6)","COLLAPSE") @ write f f$edit("$(HOBJ6)","COLLAPSE")
@ write f "sys$library:starlet.olb/Include=(lib$initialize) @ write f "sys$library:starlet.olb/Include=(lib$initialize)
@ write f \ @ write f "! psect_attributes Usr, noPic, and Long removed"
"psect_attr=lib$initialize, Con,Usr,noPic,Rel,Gbl,noShr,noExe,Rd,noWrt,Long" @ write f "psect_attr=lib$initialize, Con,Rel,Gbl,noShr,noExe,Rd,noWrt"
@ write f "iosegment=128" @ write f "iosegment=128"
close f close f
@@ -378,7 +378,7 @@ attrib.obj : attrib.c $(HACK_H)
ball.obj : ball.c $(HACK_H) ball.obj : ball.c $(HACK_H)
bones.obj : bones.c $(HACK_H) $(INC)lev.h bones.obj : bones.c $(HACK_H) $(INC)lev.h
botl.obj : botl.c $(HACK_H) botl.obj : botl.c $(HACK_H)
cmd.obj : cmd.c $(HACK_H) $(INC)func_tab.h cmd.obj : cmd.c $(HACK_H) $(INC)lev.h $(INC)func_tab.h
dbridge.obj : dbridge.c $(HACK_H) dbridge.obj : dbridge.c $(HACK_H)
decl.obj : decl.c $(HACK_H) decl.obj : decl.c $(HACK_H)
detect.obj : detect.c $(HACK_H) $(INC)artifact.h detect.obj : detect.c $(HACK_H) $(INC)artifact.h
+90 -53
View File
@@ -91,8 +91,8 @@ TARGET_CPU=x86
# of your PDCurses C files which must already be resident on # of your PDCurses C files which must already be resident on
# your machine. # your machine.
# #
#ADD_CURSES=Y ADD_CURSES=Y
#PDCURSES_TOP=..\..\pdcurses PDCURSES_TOP=..\..\pdcurses
#4b Qt #4b Qt
# #
@@ -207,6 +207,7 @@ endif
#ZLIB = zlib.lib #ZLIB = zlib.lib
# Have windows path styles available for use in commands # Have windows path styles available for use in commands
W_OBJ =$(subst /,\, $(OBJ))
W_INCL =$(subst /,\, $(INCL)) W_INCL =$(subst /,\, $(INCL))
W_DAT =$(subst /,\, $(DAT)) W_DAT =$(subst /,\, $(DAT))
W_DOC =$(subst /,\, $(DOC)) W_DOC =$(subst /,\, $(DOC))
@@ -455,18 +456,16 @@ DATABASE = $(DAT)/data.base
#========================================== #==========================================
# #
ifeq "$(ADD_CURSES)" "Y" ifeq "$(ADD_CURSES)" "Y"
#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
else else
CURSDEF= CURSDEF=
CURSESLIB= CURSESLIB=
CURSESINCL=
endif endif
ifneq "$(ADD_CURSES)" "Y" ifneq "$(ADD_CURSES)" "Y"
INCLDIR=-I../include -I../sys/winnt INCLDIR=-I../include -I../sys/winnt
else else
INCLDIR=-I../include -I../sys/winnt -I$(CURSESINCL) INCLDIR=-I../include -I../sys/winnt
endif endif
#========================================== #==========================================
@@ -494,7 +493,7 @@ cdebug =
linkdebug = linkdebug =
endif endif
CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF)
#LFLAGSBASEC = $(linkdebug) #LFLAGSBASEC = $(linkdebug)
#LFLAGSBASEG = $(linkdebug) -mwindows #LFLAGSBASEG = $(linkdebug) -mwindows
@@ -600,8 +599,8 @@ $(OBJ)/%.o : $(UTIL)/%.c
$(OBJ)/%.o : $(WSHR)/%.c $(OBJ)/%.o : $(WSHR)/%.c
$(cc) $(CFLAGS) -o$@ $< $(cc) $(CFLAGS) -o$@ $<
$(INCL)/%.h : $(WSHR)/%.h #$(INCL)/%.h : $(WSHR)/%.h
@copy $< $@ # @copy $< $@
#{$(WSHR)}.txt{$(DAT)}.txt: #{$(WSHR)}.txt{$(DAT)}.txt:
# @copy $< $@ # @copy $< $@
@@ -625,7 +624,7 @@ $(OBJ)/%.o : $(MSWIN)/%.c
#========================================== #==========================================
$(OBJ)/%.o : $(WCURSES)/%.c $(OBJ)/%.o : $(WCURSES)/%.c
$(cc) $(CFLAGS) -o$@ $< $(cc) $(PDCINCL) $(CFLAGS) -o$@ $<
#========================================== #==========================================
# Rules for files in PDCurses # Rules for files in PDCurses
@@ -666,8 +665,6 @@ YACC=
#LEX = lex #LEX = lex
#LEX = flex #LEX = flex
LEX= LEX=
export YACC
export LEX
# #
# - Specify your flex skeleton file (if needed). # - Specify your flex skeleton file (if needed).
@@ -680,6 +677,12 @@ YTABC = y_tab.c
YTABH = y_tab.h YTABH = y_tab.h
LEXYYC = lexyy.c LEXYYC = lexyy.c
export YACC
export LEX
export FLEXSKEL
export YTABC
export YTABH
export LEXYYC
#========================================== #==========================================
# Rules for files in win/Qt4 # Rules for files in win/Qt4
@@ -810,18 +813,18 @@ $(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \
$(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \ $(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \
$(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \ $(MSWIN)/petmark.bmp $(MSWIN)/pilemark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \
$(MSWIN)/splash.bmp $(MSWIN)/splash.bmp
@$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc $(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc
$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico $(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
@$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc $(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
#========================================== #==========================================
# The game targets. # The game targets.
#========================================== #==========================================
gamedir.tag: gamedir.tag:
test -d $(GAMEDIR) || echo creating directory $(GAMEDIR) test -d $(GAMEDIR) || echo creating directory $(W_GAMEDIR)
test -d $(GAMEDIR) || mkdir $(GAMEDIR) test -d $(GAMEDIR) || mkdir $(W_GAMEDIR)
test -d $(GAMEDIR) && echo directory created > $@ test -d $(GAMEDIR) && echo directory created > $@
$(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \ $(GAMEDIR)/NetHack.exe : gamedir.tag $(PDCLIB) $(O)tile.o $(O)nttty.o $(O)guistub.o \
@@ -885,9 +888,9 @@ initialchk: objdir.tag
@echo ---- @echo ----
objdir.tag: objdir.tag:
test -d $(OBJ) || echo creating directory $(OBJ) @test -d $(OBJ) || echo creating directory $(OBJ)
test -d $(OBJ) || mkdir $(OBJ) @test -d $(OBJ) || mkdir $(OBJ)
test -d $(OBJ) && echo directory created > $@ @test -d $(OBJ) && echo directory created > $@
#========================================== #==========================================
#=========== SECONDARY TARGETS ============ #=========== SECONDARY TARGETS ============
@@ -898,7 +901,7 @@ objdir.tag:
#========================================== #==========================================
$(U)makedefs.exe: $(MAKEOBJS) $(U)makedefs.exe: $(MAKEOBJS)
@$(link) $(LFLAGSU) -o$@ $(MAKEOBJS) $(link) $(LFLAGSU) -o$@ $(MAKEOBJS)
$(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \ $(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \
$(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \ $(INCL)/objclass.h $(INCL)/monsym.h $(INCL)/qtext.h \
@@ -955,13 +958,13 @@ $(DAT)/dungeon: utility.tag $(DAT)/dungeon.def
#========================================== #==========================================
$(U)uudecode.exe: $(O)uudecode.o $(U)uudecode.exe: $(O)uudecode.o
@$(link) $(LFLAGSU) -o$@ $(O)uudecode.o $(link) $(LFLAGSU) -o$@ $(O)uudecode.o
$(O)uudecode.o: $(SSYS)/uudecode.c $(O)uudecode.o: $(SSYS)/uudecode.c
$(MSWSYS)/NetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu $(MSWSYS)/NetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu
$(subst /,\,$(U)uudecode.exe $(MSWSYS)/nhico.uu) $(subst /,\,$(U)uudecode.exe $(MSWSYS)/nhico.uu)
copy NetHack.ico $@ copy NetHack.ico $(W_MSWSYS)\NetHack.ico
del NetHack.ico del NetHack.ico
$(MSWIN)/NetHack.ico : $(MSWSYS)/NetHack.ico $(MSWIN)/NetHack.ico : $(MSWSYS)/NetHack.ico
@@ -1029,7 +1032,7 @@ $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
$(U)levcomp.exe: $(LEVCOMPOBJS) $(U)levcomp.exe: $(LEVCOMPOBJS)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS) $(link) $(LFLAGSU) -o$@ $(LEVCOMPOBJS)
#========================================== #==========================================
# Dungeon Compiler Stuff # Dungeon Compiler Stuff
@@ -1056,7 +1059,7 @@ $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
$(U)dgncomp.exe: $(DGNCOMPOBJS) $(U)dgncomp.exe: $(DGNCOMPOBJS)
@echo Linking $@... @echo Linking $@...
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS) $(link) $(LFLAGSU) -o$@ $(DGNCOMPOBJS)
#================================================= #=================================================
# For a couple of devteam utilities # For a couple of devteam utilities
@@ -1064,11 +1067,11 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS)
$(U)nhsizes.exe: $(O)nhsizes.o $(U)nhsizes.exe: $(O)nhsizes.o
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o$(U)nhsizes.exe: $(O)nhsizes.o $(link) $(LFLAGSU) -o$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o$(U)nhsizes.exe: $(O)nhsizes.o
$(U)nhsize2.exe: $(O)nhsizes2.o $(U)nhsize2.exe: $(O)nhsizes2.o
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o $(link) $(LFLAGSU) -o$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c $(O)nhsizes.o: $(CONFIG_H) nhsizes.c
$(cc) $(CFLAGSU) -o$@ nhsizes.c $(cc) $(CFLAGSU) -o$@ nhsizes.c
@@ -1086,7 +1089,7 @@ $(O)nhsizes2.o: $(CONFIG_H) nhsizes2.c
#========================================== #==========================================
$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
@$(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o $(link) $(LFLAGSU) -o$@ $(O)dlb_main.o $(O)dlb.o $(O)alloc.o $(O)panic.o
$(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h
@@ -1145,7 +1148,7 @@ $(SRC)/tile.c: $(U)tilemap.exe
@$(U)tilemap @$(U)tilemap
$(U)tilemap.exe: $(O)tilemap.o $(U)tilemap.exe: $(O)tilemap.o
@$(link) $(LFLAGSU) -o$@ $(O)tilemap.o $(link) $(LFLAGSU) -o$@ $(O)tilemap.o
$(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H) $(O)tilemap.o: $(WSHR)/tilemap.c $(HACK_H)
$(cc) $(CFLAGSU) -o$@ $(WSHR)/tilemap.c $(cc) $(CFLAGSU) -o$@ $(WSHR)/tilemap.c
@@ -1177,16 +1180,16 @@ $(O)tilete32.o: $(WSHR)/tiletext.c $(CONFIG_H) $(TILE_H)
$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO) $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO) $(link) $(LFLAGSU) -o$@ $(GIFREADERS) $(TEXT_IO)
$(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32) $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32) $(link) $(LFLAGSU) -o$@ $(GIFREADERS32) $(TEXT_IO32)
$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO) $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO) $(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES) $(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
@@ -1199,11 +1202,11 @@ $(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO) $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO) $(link) $(LFLAGSU) -o$@ $(O)tile2bmp.o $(TEXT_IO)
$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
@echo Linking $@... @echo Linking $@...
@$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32) $(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32)
$(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h $(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)/win32api.h
$(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c $(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c
@@ -1223,24 +1226,26 @@ $(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
#========================================== #==========================================
spotless: clean spotless: clean
if exist initialchk del initialchk if exist o\* del /Q o\*
ifneq "$(OBJ)" "" -test -d o && rd o
if exist $(W_OBJ)\* rmdir $(W_OBJ) /s /Q if exist objdir.tag del objdir.tag
if exist $(W_GAMEDIR))\nhdefkey.dll del $(W_GAMEDIR))\nhdefkey.dll if exist gamedir.tag del gamedir.tag
if exist $(W_GAMEDIR))\nh340key.dll del $(W_GAMEDIR))\nh340key.dll ifneq "$(W_GAMEDIR)" ""
if exist $(W_GAMEDIR))\nhraykey.dll del $(W_GAMEDIR))\nhraykey.dll if exist $(W_GAMEDIR)\NetHack.exe del $(W_GAMEDIR)\NetHack.exe
if exist $(W_GAMEDIR))\NetHack.exe del $(W_GAMEDIR))\NetHack.exe if exist $(W_GAMEDIR)\nhdefkey.dll del $(W_GAMEDIR)\nhdefkey.dll
if exist $(W_GAMEDIR))\NetHack.pdb del $(W_GAMEDIR))\NetHack.pdb if exist $(W_GAMEDIR)\nh340key.dll del $(W_GAMEDIR)\nh340key.dll
if exist $(W_GAMEDIR))\nhdat del $(W_GAMEDIR))\nhdat if exist $(W_GAMEDIR)\nhraykey.dll del $(W_GAMEDIR)\nhraykey.dll
if exist $(W_GAMEDIR)\NetHack.exe del $(W_GAMEDIR)\NetHack.exe
if exist $(W_GAMEDIR)\NetHack.pdb del $(W_GAMEDIR)\NetHack.pdb
if exist $(W_GAMEDIR)\nhdat del $(W_GAMEDIR)\nhdat
endif endif
if exist $(W_INCL)\date.h del $(W_INCL)\date.h ifneq "$(W_SRC)" ""
if exist $(W_INCL)\onames.h del $(W_INCL)\onames.h
if exist $(W_INCL)\pm.h del $(W_INCL)\pm.h
if exist $(W_INCL)\vis_tab.h del $(W_INCL)\vis_tab.h
if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c
if exist $(W_SRC)\tile.c del $(W_SRC)\tile.c if exist $(W_SRC)\tile.c del $(W_SRC)\tile.c
if exist $(W_UTIL)\*.lnk del $(W_UTIL)\*.lnk if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c
if exist $(W_UTIL)\*.map del $(W_UTIL)\*.map if exist nhdat. del nhdat.
endif
ifneq "$(W_DAT)" ""
if exist $(W_DAT)\data del $(W_DAT)\data if exist $(W_DAT)\data del $(W_DAT)\data
if exist $(W_DAT)\rumors del $(W_DAT)\rumors if exist $(W_DAT)\rumors del $(W_DAT)\rumors
if exist $(W_DAT)\engrave del $(W_DAT)\engrave if exist $(W_DAT)\engrave del $(W_DAT)\engrave
@@ -1282,13 +1287,15 @@ endif
if exist $(W_DAT)\wizard?.lev del $(W_DAT)\wizard?.lev if exist $(W_DAT)\wizard?.lev del $(W_DAT)\wizard?.lev
if exist $(W_DAT)\dlb.lst del $(W_DAT)\dlb.lst if exist $(W_DAT)\dlb.lst del $(W_DAT)\dlb.lst
if exist $(W_DAT)\porthelp del $(W_DAT)\porthelp if exist $(W_DAT)\porthelp del $(W_DAT)\porthelp
endif
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag
if exist $(W_SRC)\vis_tab.c del $(W_SRC)\vis_tab.c
if exist nhdat. del nhdat.
if exist $(W_OBJ)\obj.tag del $(W_OBJ)\obj.tag if exist $(W_OBJ)\obj.tag del $(W_OBJ)\obj.tag
if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag if exist $(W_OBJ)\gamedir.tag del $(W_OBJ)\gamedir.tag
if exist $(W_OBJ)\nh*key.lib del $(W_OBJ)\nh*key.lib if exist $(W_OBJ)\nh*key.lib del $(W_OBJ)\nh*key.lib
if exist $(W_OBJ)\nh*key.exp del $(W_OBJ)\nh*key.exp if exist $(W_OBJ)\nh*key.exp del $(W_OBJ)\nh*key.exp
endif
ifneq "$(W_MSWIN)" ""
if exist $(W_MSWIN)\mnsel.bmp del $(W_MSWIN)\mnsel.bmp if exist $(W_MSWIN)\mnsel.bmp del $(W_MSWIN)\mnsel.bmp
if exist $(W_MSWIN)\mnselcnt.bmp del $(W_MSWIN)\mnselcnt.bmp if exist $(W_MSWIN)\mnselcnt.bmp del $(W_MSWIN)\mnselcnt.bmp
if exist $(W_MSWIN)\mnunsel.bmp del $(W_MSWIN)\mnunsel.bmp if exist $(W_MSWIN)\mnunsel.bmp del $(W_MSWIN)\mnunsel.bmp
@@ -1297,23 +1304,52 @@ endif
if exist $(W_MSWIN)\rip.bmp del $(W_MSWIN)\rip.bmp if exist $(W_MSWIN)\rip.bmp del $(W_MSWIN)\rip.bmp
if exist $(W_MSWIN)\splash.bmp del $(W_MSWIN)\splash.bmp if exist $(W_MSWIN)\splash.bmp del $(W_MSWIN)\splash.bmp
if exist $(W_MSWIN)\nethack.ico del $(W_MSWIN)\nethack.ico if exist $(W_MSWIN)\nethack.ico del $(W_MSWIN)\nethack.ico
endif
ifneq "$(W_MSWSYS)" ""
if exist $(W_MSWSYS)\nethack.ico del $(W_MSWSYS)\nethack.ico if exist $(W_MSWSYS)\nethack.ico del $(W_MSWSYS)\nethack.ico
endif
ifneq "$(W_UTIL)" ""
if exist $(W_UTIL)\*.lnk del $(W_UTIL)\*.lnk
if exist $(W_UTIL)\*.map del $(W_UTIL)\*.map
if exist $(W_UTIL)\recover.exe del $(W_UTIL)\recover.exe if exist $(W_UTIL)\recover.exe del $(W_UTIL)\recover.exe
if exist $(W_UTIL)\tile2bmp.exe del $(W_UTIL)\tile2bmp.exe if exist $(W_UTIL)\tile2bmp.exe del $(W_UTIL)\tile2bmp.exe
if exist $(W_UTIL)\tilemap.exe del $(W_UTIL)\tilemap.exe if exist $(W_UTIL)\tilemap.exe del $(W_UTIL)\tilemap.exe
if exist $(W_UTIL)\uudecode.exe del $(W_UTIL)\uudecode.exe if exist $(W_UTIL)\uudecode.exe del $(W_UTIL)\uudecode.exe
if exist $(W_UTIL)\dlb_main.exe del $(W_UTIL)\dlb_main.exe if exist $(W_UTIL)\dlb_main.exe del $(W_UTIL)\dlb_main.exe
endif
ifneq "$(W_INCL)" ""
if exist $(W_INCL)\date.h del $(W_INCL)\date.h
if exist $(W_INCL)\onames.h del $(W_INCL)\onames.h
if exist $(W_INCL)\pm.h del $(W_INCL)\pm.h
if exist $(W_INCL)\vis_tab.h del $(W_INCL)\vis_tab.h
endif
ifeq "$(ADD_CURSES)" "Y" ifeq "$(ADD_CURSES)" "Y"
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\pdcurses.lib del $(W_OBJ)\pdcurses.lib if exist $(W_OBJ)\pdcurses.lib del $(W_OBJ)\pdcurses.lib
endif endif
endif
if exist $(W_GAMEDIR)\license. del $(W_GAMEDIR)\license.
if exist $(W_GAMEDIR)\nh340key.dll del $(W_GAMEDIR)\nh340key.dll
if exist $(W_GAMEDIR)\nhdefkey.dll del $(W_GAMEDIR)\nhdefkey.dll
if exist $(W_GAMEDIR)\nhraykey.dll del $(W_GAMEDIR)\nhraykey.dll
-test -d ..\binary && rd ..\binary
clean: clean:
if exist $(W_OBJ)\*.o del $(W_OBJ)\*.o if exist initialchk del initialchk
if exist $(W_OBJ)\utility.tag del $(W_OBJ)\utility.tag if exist install.tag del install.tag
if exist utility.tag del utility.tag
ifneq "$(W_UTIL)" ""
if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe if exist $(W_UTIL)\makedefs.exe del $(W_UTIL)\makedefs.exe
if exist $(W_UTIL)\levcomp.exe del $(W_UTIL)\levcomp.exe if exist $(W_UTIL)\levcomp.exe del $(W_UTIL)\levcomp.exe
if exist $(W_UTIL)\dgncomp.exe del $(W_UTIL)\dgncomp.exe if exist $(W_UTIL)\dgncomp.exe del $(W_UTIL)\dgncomp.exe
endif
ifneq "$(W_SRC)" ""
if exist $(W_SRC)\*.lnk del $(W_SRC)\*.lnk if exist $(W_SRC)\*.lnk del $(W_SRC)\*.lnk
if exist $(W_SRC)\*.map del $(W_SRC)\*.map if exist $(W_SRC)\*.map del $(W_SRC)\*.map
endif
ifneq "$(W_OBJ)" ""
if exist $(W_OBJ)\*.o del $(W_OBJ)\*.o
if exist $(W_OBJ)\utility.tag del $(W_OBJ)\utility.tag
if exist $(W_OBJ)\install.tag del $(W_OBJ)\install.tag if exist $(W_OBJ)\install.tag del $(W_OBJ)\install.tag
if exist $(W_OBJ)\console.res del $(W_OBJ)\console.res if exist $(W_OBJ)\console.res del $(W_OBJ)\console.res
if exist $(W_OBJ)\dgncomp.MAP del $(W_OBJ)\dgncomp.MAP if exist $(W_OBJ)\dgncomp.MAP del $(W_OBJ)\dgncomp.MAP
@@ -1346,6 +1382,7 @@ clean:
if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag if exist $(W_OBJ)\sp_lev.tag del $(W_OBJ)\sp_lev.tag
if exist $(W_OBJ)\uudecode.MAP del $(W_OBJ)\uudecode.MAP if exist $(W_OBJ)\uudecode.MAP del $(W_OBJ)\uudecode.MAP
if exist $(W_OBJ)\uudecode.PDB del $(W_OBJ)\uudecode.PDB if exist $(W_OBJ)\uudecode.PDB del $(W_OBJ)\uudecode.PDB
endif
rem rem
rem defer to the steps in ../win/win32/levstuff-mingw32.mak rem defer to the steps in ../win/win32/levstuff-mingw32.mak
rem rem
@@ -1386,13 +1423,13 @@ $(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.c
#include the following stub for proper linkage. #include the following stub for proper linkage.
$(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c $(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c
@$(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c $(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
#if you aren't linking in the full tty then #if you aren't linking in the full tty then
#include the following stub for proper linkage. #include the following stub for proper linkage.
$(O)ttystub.o: $(HACK_H) $(MSWSYS)/stubs.c $(O)ttystub.o: $(HACK_H) $(MSWSYS)/stubs.c
@$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c $(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
$(O)tile.o: $(SRC)/tile.c $(HACK_H) $(O)tile.o: $(SRC)/tile.c $(HACK_H)
+103 -102
View File
@@ -73,8 +73,8 @@ DEBUGINFO = Y
# PDCurses header (.h) files and PDCURSES_C to the location # PDCurses header (.h) files and PDCURSES_C to the location
# of your PDCurses C files. # of your PDCurses C files.
# #
#ADD_CURSES=Y ADD_CURSES=Y
#PDCURSES_TOP=..\..\pdcurses PDCURSES_TOP=..\..\pdcurses
# #
#============================================================================== #==============================================================================
# This marks the end of the BUILD DECISIONS section. # This marks the end of the BUILD DECISIONS section.
@@ -118,10 +118,6 @@ WSHR = ..\win\share # Tile support files
OBJ = o OBJ = o
cc=cl
link=link
rc=Rc
# #
#========================================== #==========================================
# Exe File Info. # Exe File Info.
@@ -159,93 +155,6 @@ DLBFLG =
#ZLIB = zlib.lib #ZLIB = zlib.lib
#==========================================
#==========================================
# Setting up the compiler and linker
#==========================================
#==========================================
# Before we get started, this section is used to determine the version of
# Visual Studio we are using. We set VSVER to 0000 to flag any version that
# is too old or untested.
#
#NMAKE version 1414264330 is distributed with VS 15.7.5
#!MESSAGE $(MAKEFLAGS)
#!MESSAGE $(MAKEDIR)
#!MESSAGE $(MAKE)
MAKEVERSION=$(_NMAKE_VER:.= )
MAKEVERSION=$(MAKEVERSION: =)
#!MESSAGE $(_NMAKE_VER)
#!MESSAGE $(MAKEVERSION)
VSNEWEST=2017
!IF ($(MAKEVERSION) < 1000000000)
VSVER=0000 #untested ancient version
!ELSEIF ($(MAKEVERSION) > 1000000000) && ($(MAKEVERSION) < 1100000000)
VSVER=2010
!ELSEIF ($(MAKEVERSION) > 1100000000) && ($(MAKEVERSION) < 1200000000)
VSVER=2012
!ELSEIF ($(MAKEVERSION) > 1200000000) && ($(MAKEVERSION) < 1400000000)
VSVER=2013
!ELSEIF ($(MAKEVERSION) > 1400000000) && ($(MAKEVERSION) < 1411000000)
VSVER=2015
!ELSEIF ($(MAKEVERSION) > 1411000000) && ($(MAKEVERSION) < 1414264331)
VSVER=$(VSNEWEST)
!ELSEIF ($(MAKEVERSION) > 1414264330)
VSVER=2999 #untested future version
!ENDIF
!IF ($(VSVER) >= 2012)
!MESSAGE Autodetected Visual Studio $(VSVER)
!ELSEIF ($(VSVER) == 2999
!MESSAGE The version of Visual Studio is newer than the most recent at
!MESSAGE the time this Makefile was crafted (Visual Studio $(VSNEWEST)).
!MESSAGE Because it is newer we'll proceed expecting that the
!MESSAGE VS$(VSNEWEST) processing will still work.
!ELSEIF ($(VSVER) == 0000)
!MESSAGE The version of Visual Studio appears to be quite old, older
!MESSAGE than VS2010 which is the oldest supported version by this
!MESSAGE Makefile, so we'll stop now.
!ERROR Untested old Visual Studio version with NMAKE $(_NMAKE_VER).
!ENDIF
!IF ($(VSVER) == 2010)
# For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process
# DO NOT DELETE THE FOLLOWING LINE
!include <win32.mak>
! ENDIF
#These will be in the environment variables with one of the VS2017
#developer command prompts.
#VSCMD_ARG_HOST_ARCH=x64
#VSCMD_ARG_TGT_ARCH=x86
!IFDEF VSCMD_ARG_HOST_ARCH
!MESSAGE Host architecture is $(VSCMD_ARG_HOST_ARCH)
!MESSAGE Target architecture is $(VSCMD_ARG_TGT_ARCH)
! IFNDEF TARGET_CPU
! IF "$(VSCMD_ARG_TGT_ARCH)"=="x64"
TARGET_CPU=x64
! ELSE
TARGET_CPU=x86
! ENDIF
! ENDIF
!ENDIF
!IF "$(TARGET_CPU)" == ""
TARGET_CPU=x86
!ENDIF
!IF ($(VSVER) == 2010)
CL_RECENT=
!ELSE
! IF ($(VSVER) > 2010)
CL_RECENT=-sdl
! ENDIF
!ENDIF
#========================================== #==========================================
#================ MACROS ================== #================ MACROS ==================
@@ -399,7 +308,7 @@ PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o
PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \ PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
$(O)pdcsetsc.o $(O)pdcutil.o $(O)pdcsetsc.o $(O)pdcutil.o
PDCLIB = $(O)\pdcurses.lib PDCLIB = $(O)pdcurses.lib
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON) PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
@@ -444,18 +353,107 @@ TILE_H = ..\win\share\tile.h
DATABASE = $(DAT)\data.base DATABASE = $(DAT)\data.base
#==========================================
#==========================================
# Setting up the compiler and linker
#==========================================
#==========================================
cc=cl
link=link
rc=Rc
# Before we get started, this section is used to determine the version of
# Visual Studio we are using. We set VSVER to 0000 to flag any version that
# is too old or untested.
#
#NMAKE version 1414264330 is distributed with VS 15.7.5
#!MESSAGE $(MAKEFLAGS)
#!MESSAGE $(MAKEDIR)
#!MESSAGE $(MAKE)
MAKEVERSION=$(_NMAKE_VER:.= )
MAKEVERSION=$(MAKEVERSION: =)
#!MESSAGE $(_NMAKE_VER)
#!MESSAGE $(MAKEVERSION)
VSNEWEST=2017
!IF ($(MAKEVERSION) < 1000000000)
VSVER=0000 #untested ancient version
!ELSEIF ($(MAKEVERSION) > 1000000000) && ($(MAKEVERSION) < 1100000000)
VSVER=2010
!ELSEIF ($(MAKEVERSION) > 1100000000) && ($(MAKEVERSION) < 1200000000)
VSVER=2012
!ELSEIF ($(MAKEVERSION) > 1200000000) && ($(MAKEVERSION) < 1400000000)
VSVER=2013
!ELSEIF ($(MAKEVERSION) > 1400000000) && ($(MAKEVERSION) < 1411000000)
VSVER=2015
!ELSEIF ($(MAKEVERSION) > 1411000000) && ($(MAKEVERSION) < 1414264331)
VSVER=$(VSNEWEST)
!ELSEIF ($(MAKEVERSION) > 1414264330)
VSVER=2999 #untested future version
!ENDIF
!IF ($(VSVER) >= 2012)
!MESSAGE Autodetected Visual Studio $(VSVER)
!ELSEIF ($(VSVER) == 2999
!MESSAGE The version of Visual Studio is newer than the most recent at
!MESSAGE the time this Makefile was crafted (Visual Studio $(VSNEWEST)).
!MESSAGE Because it is newer we'll proceed expecting that the
!MESSAGE VS$(VSNEWEST) processing will still work.
!ELSEIF ($(VSVER) == 0000)
!MESSAGE The version of Visual Studio appears to be quite old, older
!MESSAGE than VS2010 which is the oldest supported version by this
!MESSAGE Makefile, so we'll stop now.
!ERROR Untested old Visual Studio version with NMAKE $(_NMAKE_VER).
!ENDIF
!IF ($(VSVER) == 2010)
# For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process
# DO NOT DELETE THE FOLLOWING LINE
!include <win32.mak>
! ENDIF
#These will be in the environment variables with one of the VS2017
#developer command prompts.
#VSCMD_ARG_HOST_ARCH=x64
#VSCMD_ARG_TGT_ARCH=x86
!IFDEF VSCMD_ARG_HOST_ARCH
!MESSAGE Host architecture is $(VSCMD_ARG_HOST_ARCH)
!MESSAGE Target architecture is $(VSCMD_ARG_TGT_ARCH)
! IFNDEF TARGET_CPU
! IF "$(VSCMD_ARG_TGT_ARCH)"=="x64"
TARGET_CPU=x64
! ELSE
TARGET_CPU=x86
! ENDIF
! ENDIF
!ENDIF
!IF "$(TARGET_CPU)" == ""
TARGET_CPU=x86
!ENDIF
!IF ($(VSVER) == 2010)
CL_RECENT=
!ELSE
! IF ($(VSVER) > 2010)
CL_RECENT=-sdl
! ENDIF
!ENDIF
#========================================== #==========================================
# More compiler setup post-macros # More compiler setup post-macros
#========================================== #==========================================
#---------------------------------------------------------------- #----------------------------------------------------------------
!IF "$(ADD_CURSES)" == "Y" !IF "$(ADD_CURSES)" == "Y"
#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE" CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
!ELSE !ELSE
CURSDEF= CURSDEF=
CURSESLIB= CURSESLIB=
CURSESINCL=
!ENDIF !ENDIF
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \ ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
@@ -530,7 +528,7 @@ guilibs = $(winlibs)
!IFNDEF ADD_CURSES !IFNDEF ADD_CURSES
INCLDIR= /I..\include /I..\sys\winnt INCLDIR= /I..\include /I..\sys\winnt
!ELSE !ELSE
INCLDIR= /I..\include /I..\sys\winnt /I$(CURSESINCL) INCLDIR= /I..\include /I..\sys\winnt
!ENDIF !ENDIF
#========================================== #==========================================
@@ -1257,16 +1255,19 @@ $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
$(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h $(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
@$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
#========================================== #===============================================================================
# PDCurses # PDCurses
#========================================== #===============================================================================
$(O)\pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS) $(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS) lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
#========================================== $(O)pdcscrn.o : $(PDCURSES_HEADERS) $(PDCWINCON)\pdcscrn.c $(MSWSYS)\stub-pdcscrn.c
$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $(MSWSYS)\stub-pdcscrn.c
#===============================================================================
# Housekeeping # Housekeeping
#========================================== #===============================================================================
spotless: clean spotless: clean
! IF ("$(OBJ)"!="") ! IF ("$(OBJ)"!="")
+1 -1
View File
@@ -1889,7 +1889,7 @@ void nethack_enter_nttty()
error("Unable to load nhraykey.dll"); error("Unable to load nhraykey.dll");
} }
} }
#endif TTY_GRAPHICS #endif /* TTY_GRAPHICS */
/* this is used as a printf() replacement when the window /* this is used as a printf() replacement when the window
* system isn't initialized yet * system isn't initialized yet
+15
View File
@@ -0,0 +1,15 @@
/*
* Use this stub to insert a needed pragma prior
* to compiling $(PDCWINCON)\pdcscrn.c in the
* PDCurses distribution.
*
* We don't want to ask NetHack builders to
* modify the PDCurses distribution in any way,
* we only ask that they have the original intact
* PDCurses source tree available during the build.
*
*/
#pragma warning(disable : 4996)
#include "pdcscrn.c"
+3 -5
View File
@@ -7,7 +7,7 @@
#ifdef GUISTUB #ifdef GUISTUB
#ifdef TTYSTUB #ifdef TTYSTUB
#error You can't compile this with both GUISTUB and TTYSTUB defined. #error You cannot compile this with both GUISTUB and TTYSTUB defined.
#endif #endif
int GUILaunched; int GUILaunched;
@@ -29,6 +29,7 @@ mswin_destroy_reg()
*/ */
#ifdef __MINGW32__ #ifdef __MINGW32__
extern char default_window_sys[]; extern char default_window_sys[];
extern int mingw_main(int argc, char **argv);
int int
main(argc, argv) main(argc, argv)
@@ -37,10 +38,7 @@ char *argv[];
{ {
boolean resuming; boolean resuming;
sys_early_init(); resuming = mingw_main(argc, argv);
Strcpy(default_window_sys, "tty");
resuming = pcmain(argc, argv);
moveloop(resuming);
nethack_exit(EXIT_SUCCESS); nethack_exit(EXIT_SUCCESS);
/*NOTREACHED*/ /*NOTREACHED*/
return 0; return 0;
+1
View File
@@ -1962,6 +1962,7 @@ boolean complain;
wp->title = dupstr(str); wp->title = dupstr(str);
wp->menu_information->permi = FALSE; wp->menu_information->permi = FALSE;
wp->menu_information->disable_mcolors = TRUE;
(void) X11_select_menu(newwin, PICK_NONE, &menu_list); (void) X11_select_menu(newwin, PICK_NONE, &menu_list);
X11_destroy_nhwindow(newwin); X11_destroy_nhwindow(newwin);
} }
+1 -1
View File
@@ -1162,7 +1162,7 @@ struct menu *curr_menu;
XtSetArg(args[num_args], nhStr(XtNborderWidth), 0); num_args++; XtSetArg(args[num_args], nhStr(XtNborderWidth), 0); num_args++;
XtSetArg(args[num_args], nhStr(XtNvertDistance), 0); num_args++; XtSetArg(args[num_args], nhStr(XtNvertDistance), 0); num_args++;
if (!iflags.use_menu_color if (!iflags.use_menu_color || wp->menu_information->disable_mcolors
|| !get_menu_coloring(curr->str, &color, &attr)) || !get_menu_coloring(curr->str, &color, &attr))
attr = curr->attr; attr = curr->attr;
+6 -7
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 wintext.c $NHDT-Date: 1450453309 2015/12/18 15:41:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $ */ /* NetHack 3.6 wintext.c $NHDT-Date: 1543622533 2018/12/01 00:02:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.16 $ */
/* Copyright (c) Dean Luick, 1992 */ /* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -281,11 +281,9 @@ struct xwindow *wp;
#endif #endif
num_args = 0; num_args = 0;
XtSetArg(args[num_args], XtNallowShellResize, True); XtSetArg(args[num_args], XtNallowShellResize, True), num_args++;
num_args++;
XtSetArg(args[num_args], XtNtranslations, XtSetArg(args[num_args], XtNtranslations,
XtParseTranslationTable(text_translations)); XtParseTranslationTable(text_translations)), num_args++;
num_args++;
#ifdef TRANSIENT_TEXT #ifdef TRANSIENT_TEXT
wp->popup = XtCreatePopupShell("text", transientShellWidgetClass, wp->popup = XtCreatePopupShell("text", transientShellWidgetClass,
@@ -299,8 +297,9 @@ struct xwindow *wp;
XtParseTranslationTable("<Message>WM_PROTOCOLS: delete_text()")); XtParseTranslationTable("<Message>WM_PROTOCOLS: delete_text()"));
num_args = 0; num_args = 0;
XtSetArg(args[num_args], XtNallowShellResize, True); XtSetArg(args[num_args], XtNallowShellResize, True), num_args++;
num_args++; XtSetArg(args[num_args], XtNtranslations,
XtParseTranslationTable(text_translations)), num_args++;
form = XtCreateManagedWidget("form", formWidgetClass, wp->popup, args, form = XtCreateManagedWidget("form", formWidgetClass, wp->popup, args,
num_args); num_args);
+10
View File
@@ -80,6 +80,16 @@ struct window_procs curses_procs = {
genl_can_suspend_yes, genl_can_suspend_yes,
}; };
/*
* Global variables for curses interface
*/
int term_rows, term_cols; /* size of underlying terminal */
int orig_cursor; /* Preserve initial cursor state */
WINDOW *base_term; /* underlying terminal window */
boolean counting; /* Count window is active */
WINDOW *mapwin, *statuswin, *messagewin; /* Main windows */
/* Track if we're performing an update to the permanent window. /* Track if we're performing an update to the permanent window.
Needed since we aren't using the normal menu functions to handle Needed since we aren't using the normal menu functions to handle
the inventory window. */ the inventory window. */
+2 -2
View File
@@ -371,12 +371,12 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
char *tmpstr; /* for free() */ char *tmpstr; /* for free() */
int maxy, maxx; /* linewrap / scroll */ int maxy, maxx; /* linewrap / scroll */
int ch; int ch;
WINDOW *win = curses_get_nhwin(MESSAGE_WIN); WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
int border_space = 0; int border_space = 0;
int len = 0; /* of answer string */ int len = 0; /* of answer string */
boolean border = curses_window_has_border(MESSAGE_WIN); boolean border = curses_window_has_border(MESSAGE_WIN);
int orig_cursor = curs_set(0);
orig_cursor = curs_set(0);
curses_get_window_size(MESSAGE_WIN, &height, &width); curses_get_window_size(MESSAGE_WIN, &height, &width);
if (border) { if (border) {