Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -1962,6 +1962,7 @@ boolean complain;
|
||||
wp->title = dupstr(str);
|
||||
|
||||
wp->menu_information->permi = FALSE;
|
||||
wp->menu_information->disable_mcolors = TRUE;
|
||||
(void) X11_select_menu(newwin, PICK_NONE, &menu_list);
|
||||
X11_destroy_nhwindow(newwin);
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ struct menu *curr_menu;
|
||||
XtSetArg(args[num_args], nhStr(XtNborderWidth), 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))
|
||||
attr = curr->attr;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -281,11 +281,9 @@ struct xwindow *wp;
|
||||
#endif
|
||||
|
||||
num_args = 0;
|
||||
XtSetArg(args[num_args], XtNallowShellResize, True);
|
||||
num_args++;
|
||||
XtSetArg(args[num_args], XtNallowShellResize, True), num_args++;
|
||||
XtSetArg(args[num_args], XtNtranslations,
|
||||
XtParseTranslationTable(text_translations));
|
||||
num_args++;
|
||||
XtParseTranslationTable(text_translations)), num_args++;
|
||||
|
||||
#ifdef TRANSIENT_TEXT
|
||||
wp->popup = XtCreatePopupShell("text", transientShellWidgetClass,
|
||||
@@ -299,8 +297,9 @@ struct xwindow *wp;
|
||||
XtParseTranslationTable("<Message>WM_PROTOCOLS: delete_text()"));
|
||||
|
||||
num_args = 0;
|
||||
XtSetArg(args[num_args], XtNallowShellResize, True);
|
||||
num_args++;
|
||||
XtSetArg(args[num_args], XtNallowShellResize, True), num_args++;
|
||||
XtSetArg(args[num_args], XtNtranslations,
|
||||
XtParseTranslationTable(text_translations)), num_args++;
|
||||
form = XtCreateManagedWidget("form", formWidgetClass, wp->popup, args,
|
||||
num_args);
|
||||
|
||||
|
||||
@@ -80,6 +80,16 @@ struct window_procs curses_procs = {
|
||||
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.
|
||||
Needed since we aren't using the normal menu functions to handle
|
||||
the inventory window. */
|
||||
|
||||
@@ -371,12 +371,12 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
|
||||
char *tmpstr; /* for free() */
|
||||
int maxy, maxx; /* linewrap / scroll */
|
||||
int ch;
|
||||
|
||||
WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
|
||||
int border_space = 0;
|
||||
int len = 0; /* of answer string */
|
||||
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);
|
||||
if (border) {
|
||||
|
||||
93
win/win32/dgnstuff-mingw32.mak
Normal file
93
win/win32/dgnstuff-mingw32.mak
Normal file
@@ -0,0 +1,93 @@
|
||||
# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $
|
||||
# Copyright (c) 2018 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# Set all of these or none of them.
|
||||
#
|
||||
# bison and flex are the ones found in GnuWin32, which
|
||||
# is probably the easiest set of these tools to find
|
||||
# on Windows.
|
||||
#
|
||||
#YACC = bison.exe -y
|
||||
#LEX = flex.exe
|
||||
#YTABC = y.tab.c
|
||||
#YTABH = y.tab.h
|
||||
#LEXYYC = lex.yy.c
|
||||
SHELL=cmd.exe
|
||||
|
||||
default: all
|
||||
|
||||
all: tools ../util/dgn_yacc.c ../util/dgn_lex.c
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
clean:
|
||||
-del ..\util\dgn_lex.c
|
||||
-del ..\util\dgn_yacc.c
|
||||
-del ..\include\dgn_comp.h
|
||||
|
||||
tools:
|
||||
ifneq "$(YACC)" ""
|
||||
@echo Yacc-alike set to $(YACC)
|
||||
@echo YTABC set to $(YTABC)
|
||||
@echo YTABH set to $(YTABH)
|
||||
endif
|
||||
|
||||
ifneq "$(LEX)" ""
|
||||
@echo Lex-alike set to $(LEX)
|
||||
@echo LEXYYC set to $(LEXYYC)
|
||||
endif
|
||||
|
||||
#==========================================
|
||||
# Dungeon Compiler Stuff
|
||||
#==========================================
|
||||
|
||||
../include/dgn_comp.h : ../util/dgn_comp.y
|
||||
ifeq "$(YACC)" ""
|
||||
@echo Using pre-built dgn_comp.h
|
||||
chdir ..\include
|
||||
copy /y ..\sys\share\dgn_comp.h
|
||||
copy /b dgn_comp.h+,,
|
||||
chdir ..\src
|
||||
else
|
||||
chdir ..\util
|
||||
$(YACC) -d dgn_comp.y
|
||||
copy $(YTABC) $@
|
||||
copy $(YTABH) ..\include\dgn_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir ..\build
|
||||
endif
|
||||
|
||||
../util/dgn_yacc.c : ../util/dgn_comp.y
|
||||
ifeq "$(YACC)" ""
|
||||
@echo Using pre-built dgn_yacc.c
|
||||
chdir ..\util
|
||||
copy /y ..\sys\share\dgn_yacc.c
|
||||
copy /b dgn_yacc.c+,,
|
||||
chdir ..\src
|
||||
else
|
||||
chdir ..\util
|
||||
$(YACC) -d dgn_comp.y
|
||||
copy $(YTABC) $@
|
||||
copy $(YTABH) ..\include\dgn_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir ..\build
|
||||
endif
|
||||
|
||||
../util/dgn_lex.c: ../util/dgn_comp.l
|
||||
ifeq "$(LEX)" ""
|
||||
@echo Using pre-built dgn_lex.c
|
||||
chdir ..\util
|
||||
copy /y ..\sys\share\dgn_lex.c
|
||||
copy /b dgn_lex.c+,,
|
||||
chdir ..\src
|
||||
else
|
||||
chdir ..\util
|
||||
$(LEX) dgn_comp.l
|
||||
copy $(LEXYYC) $@
|
||||
@del $(LEXYYC)
|
||||
chdir ..\build
|
||||
endif
|
||||
|
||||
100
win/win32/levstuff-mingw32.mak
Normal file
100
win/win32/levstuff-mingw32.mak
Normal file
@@ -0,0 +1,100 @@
|
||||
# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $
|
||||
# Copyright (c) 2018 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
# Set all of these or none of them.
|
||||
#
|
||||
# bison and flex are the ones found in GnuWin32, which
|
||||
# is probably the easiest set of these tools to find
|
||||
# on Windows.
|
||||
#
|
||||
#YACC = bison.exe -y
|
||||
#LEX = flex.exe
|
||||
#YTABC = y.tab.c
|
||||
#YTABH = y.tab.h
|
||||
#LEXYYC = lex.yy.c
|
||||
SHELL = cmd.exe
|
||||
|
||||
default: all
|
||||
|
||||
all: tools ../util/lev_yacc.c ../util/lev_lex.c
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
clean:
|
||||
-del ..\util\lev_lex.c
|
||||
-del ..\util\lev_yacc.c
|
||||
-del ..\include\lev_comp.h
|
||||
|
||||
tools:
|
||||
ifneq "$(YACC)" ""
|
||||
@echo Yacc-alike set to "$(YACC)"
|
||||
@echo YTABC set to $(YTABC)
|
||||
@echo YTABH set to $(YTABH)
|
||||
endif
|
||||
|
||||
ifneq "$(LEX)" ""
|
||||
@echo Lex-alike set to "$(LEX)"
|
||||
@echo LEXYYC set to $(LEXYYC)
|
||||
endif
|
||||
|
||||
#==========================================
|
||||
# Level Compiler Stuff
|
||||
#==========================================
|
||||
|
||||
../include/lev_comp.h: ../util/lev_comp.y
|
||||
@echo Yacc-alike set to "$(YACC)"
|
||||
ifeq "$(YACC)" ""
|
||||
@echo Using pre-built lev_comp.h
|
||||
chdir ..\include
|
||||
copy /y ..\sys\share\lev_comp.h
|
||||
copy /b lev_comp.h+,,
|
||||
chdir ..\src
|
||||
else
|
||||
@echo Generating lev_yacc.c and lev_comp.h
|
||||
chdir ..\util
|
||||
$(YACC) -d lev_comp.y
|
||||
copy $(YTABC) $@
|
||||
copy $(YTABH) ..\include\lev_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir ..\src
|
||||
endif
|
||||
|
||||
../util/lev_yacc.c: ../util/lev_comp.y
|
||||
@echo Yacc-alike set to "$(YACC)"
|
||||
ifeq "$(YACC)" ""
|
||||
@echo Using pre-built lev_yacc.c
|
||||
chdir ..\util
|
||||
copy /y ..\sys\share\lev_yacc.c
|
||||
copy /b lev_yacc.c+,,
|
||||
chdir ..\src
|
||||
else
|
||||
@echo Generating lev_yacc.c and lev_comp.h
|
||||
chdir ..\util
|
||||
$(YACC) -d lev_comp.y
|
||||
copy $(YTABC) $@
|
||||
copy $(YTABH) ..\include\lev_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir ..\src
|
||||
endif
|
||||
|
||||
../util/lev_lex.c: ../util/lev_comp.l
|
||||
@echo Lex-alike set to "$(LEX)"
|
||||
ifeq "$(LEX)" ""
|
||||
@echo Using pre-built lev_lex.c
|
||||
chdir ..\util
|
||||
copy /y ..\sys\share\lev_lex.c
|
||||
copy /b lev_lex.c+,,
|
||||
chdir ..\src
|
||||
else
|
||||
@echo Generating lev_lex.c
|
||||
chdir ..\util
|
||||
$(LEX) lev_comp.l
|
||||
copy $(LEXYYC) $@
|
||||
@del $(LEXYYC)
|
||||
chdir ..\src
|
||||
endif
|
||||
|
||||
|
||||
27
win/win32/tiles-mingw32.mak
Normal file
27
win/win32/tiles-mingw32.mak
Normal file
@@ -0,0 +1,27 @@
|
||||
#$NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.4 $
|
||||
# Copyright (c) 2002 by Michael Allison
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
SHELL=cmd.exe
|
||||
|
||||
default: all
|
||||
|
||||
all: ../win/win32/tiles.bmp
|
||||
|
||||
clean:
|
||||
-del ..\src\win\win32\tiles.bmp
|
||||
-del ..\win\win32\tiles.bmp
|
||||
|
||||
#==========================================
|
||||
# Building the tiles file tile.bmp
|
||||
#==========================================
|
||||
|
||||
../src/tiles.bmp : ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
../win/share/other.txt
|
||||
chdir ..\src
|
||||
..\util\tile2bmp.exe tiles.bmp
|
||||
chdir ..\build
|
||||
|
||||
..\win\win32\tiles.bmp: ..\src\tiles.bmp
|
||||
@copy ..\src\tiles.bmp ..\win\win32\tiles.bmp
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<AdditionalDependencies>comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>NethackW.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
<AdditionalManifestFiles>$(WinWin32Dir)NethackW.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@@ -184,4 +184,4 @@
|
||||
<Target Name="AfterRebuild">
|
||||
<MSBuild Projects="afternethack.proj" Targets="Build" Properties="Configuration=$(Configuration)" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user