Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2019-03-12 21:18:46 -04:00
13 changed files with 171 additions and 101 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# NetHack 3.6 nethack.sh $NHDT-Date: 1524689450 2018/04/25 20:50:50 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.19 $
# NetHack 3.6 nethack.sh $NHDT-Date: 1552425075 2019/03/12 21:11:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
# NetHack may be freely redistributed. See license for details.
@@ -17,7 +17,7 @@ esac
export XUSERFILESEARCHPATH
# Get font dir added, but only once (and only if there's an xset to be found).
test -n "$DISPLAY" -a -e $HACKDIR/fonts.dir && xset p >/dev/null 2>&1 && (
test -n "$DISPLAY" -a -f $HACKDIR/fonts.dir && xset p >/dev/null 2>&1 && (
xset fp- $HACKDIR >/dev/null 2>&1;
xset fp+ $HACKDIR
)

View File

@@ -4,13 +4,12 @@
#
#==============================================================================
#
# Win32 Compilers Tested:
# === TDM-GCC Compiler Suite for Windows ===
# --- GCC 4.6 & 4.7 Series ---
# *** Standard MinGW 32-bit Edition ***
# Win32 Compilers Tested with this Makefile.gcc:
# mingw-w64
# from:
# https://sourceforge.net/p/mingw-w64/wiki2/GeneralUsageInstructions/
# Toolchain for Windows 32-bit target
#
# If you don't have this compiler, you can get it at:
# http://tdm-gcc.tdragon.net/
#
#==============================================================================
# This is used for building two versions of NetHack:
@@ -92,7 +91,7 @@ TARGET_CPU=x86
# your machine.
#
ADD_CURSES=Y
PDCURSES_TOP=..\..\pdcurses
PDCURSES_TOP=../../pdcurses
#4b Qt
#
@@ -180,6 +179,7 @@ OBJ = o
RANDOM = $(OBJ)/random.o
#RANDOM =
BCRYPT=-lbcrypt
WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501
ifeq "$(WANT_WIN_QT4)" "Y"
@@ -288,7 +288,7 @@ VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o
VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o
VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o
VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o
VOBJ10 = $(O)mail.o $(O)makemon.o $(O)mapglyph.o
VOBJ10 = $(O)mail.o $(O)makemon.o $(O)mapglyph.o $(O)isaac64.o
VOBJ11 = $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o
VOBJ12 = $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o
VOBJ13 = $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o
@@ -321,8 +321,8 @@ else
CURSESOBJ=
endif
SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \
$(SOUND) $(O)pcmain.o $(O)nhlan.o
SOBJ = $(O)windmain.o $(O)winnt.o $(O)win10.o \
$(O)safeproc.o $(O)nhlan.o $(SOUND)
OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
$(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \
@@ -475,10 +475,10 @@ endif
#==========================================
#==========================================
cc = gcc
cc = i686-w64-mingw32-gcc.exe
cxx = g++
rc = windres
link = gcc
link = i686-w64-mingw32-gcc.exe
ifeq "$(WANT_WIN_QT4)" "Y"
link = g++
endif
@@ -497,7 +497,7 @@ CFLAGSBASE = -c $(cflags) $(WINPINC) $(cdebug) $(CURSESDEF)
#LFLAGSBASEC = $(linkdebug)
#LFLAGSBASEG = $(linkdebug) -mwindows
conlibs = -lgdi32 -lwinmm
conlibs = -lgdi32 -lwinmm $(BCRYPT)
guilibs = -lcomctl32 -lwinmm
ifeq "$(WANT_WIN_QT4)" "Y"
# Might be either Qt 4 or Qt 5
@@ -541,7 +541,7 @@ LFLAGSU = $(LFLAGSBASEC)
# - Game build
#==========================================
CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG) -DSAFEPROCS
lflags = $(LFLAGSBASEC) $(linkdebuf)
CXXFLAGS = $(CFLAGS)
@@ -750,10 +750,8 @@ endif
$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR))
$(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt)
$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt)
$(U)makedefs -c
$(subst /,\,if not exist $(GAMEDIR)/defaults.nh copy fixed_defaults.nh $(GAMEDIR)/defaults.nh)
$(subst /,\,if not exist $(GAMEDIR)/defaults.nh copy $(MSWSYS)/defaults.nh $(GAMEDIR)/defaults.nh)
$(subst /,\,-if not exist $(GAMEDIR)/record. goto>$(GAMEDIR)/record.)
$(subst /,\,-if not exist $(GAMEDIR)/record. echo.>$(GAMEDIR)/record.)
#
#
$(subst /,\,echo install done > $@)
@@ -1544,9 +1542,9 @@ $(O)topl.o: ../win/tty/topl.c $(HACK_H) $(INCL)/tcap.h
$(O)wintty.o: ../win/tty/wintty.c $(HACK_H) $(INCL)/dlb.h \
$(INCL)/date.h $(INCL)/patchlevel.h $(INCL)/tcap.h
$(cc) $(CFLAGS) -o$@ ../win/tty/wintty.c
$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
$(CONFIG_H)
$(cc) $(CFLAGS) -o$@ ../win/X11/Window.c
#$(O)Window.o: ../win/X11/Window.c $(INCL)/xwindowp.h $(INCL)/xwindow.h \
# $(CONFIG_H)
# $(cc) $(CFLAGS) -o$@ ../win/X11/Window.c
$(O)dialogs.o: ../win/X11/dialogs.c $(CONFIG_H)
$(cc) $(CFLAGS) -o$@ ../win/X11/dialogs.c
$(O)winX.o: ../win/X11/winX.c $(HACK_H) $(INCL)/winX.h $(INCL)/dlb.h \

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2018 by Bart House */
/* NetHack may be freely redistributed. See license for details. */
#ifdef _MSC_VER
#include "win10.h"
#include <process.h>
#include <VersionHelpers.h>
@@ -79,3 +80,4 @@ void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo)
monitorInfo->left = info.rcMonitor.left;
monitorInfo->top = info.rcMonitor.top;
}
#endif /* _MSC_VER */

View File

@@ -44,7 +44,7 @@ void NDECL(windows_nhbell);
int FDECL(windows_nh_poskey, (int *, int *, int *));
void FDECL(windows_raw_print, (const char *));
char FDECL(windows_yn_function, (const char *, const char *, CHAR_P));
void FDECL(windows_getlin, (const char *, char *));
static void FDECL(windows_getlin, (const char *, char *));
extern int NDECL(windows_console_custom_nhgetch);
void NDECL(safe_routines);