Merge branch 'master' into derek-farming
* master: (160 commits) Add doors correctly bug fixes for nhsub Generate oracle monsters after subroom Generate minetown guards after subrooms ... Conflicts: src/do.c src/files.c src/hack.c src/mon.c src/vision.c
This commit is contained in:
+11
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmenu.c $NHDT-Date: 1427881480 2015/04/01 09:44:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */
|
||||
/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:55:53 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
@@ -206,6 +206,7 @@ menu_key(w, event, params, num_params)
|
||||
struct xwindow *wp;
|
||||
char ch;
|
||||
int count;
|
||||
boolean selected_something;
|
||||
|
||||
wp = find_widget(w);
|
||||
menu_info = wp->menu_information;
|
||||
@@ -218,6 +219,13 @@ menu_key(w, event, params, num_params)
|
||||
}
|
||||
|
||||
if (menu_info->is_active) { /* waiting for input */
|
||||
/* first check for an explicit selector match, so that it won't be
|
||||
overridden if it happens to duplicate a mapped menu command (':'
|
||||
to look inside a container vs ':' to select via search string) */
|
||||
for (curr = menu_info->curr_menu.base; curr; curr = curr->next)
|
||||
if (curr->identifier.a_void != 0 && curr->selector == ch)
|
||||
goto make_selection;
|
||||
|
||||
ch = map_menu_cmd(ch);
|
||||
if (ch == '\033') { /* quit */
|
||||
if (menu_info->counting) {
|
||||
@@ -294,7 +302,8 @@ menu_key(w, event, params, num_params)
|
||||
X11_nhbell();
|
||||
return;
|
||||
} else {
|
||||
boolean selected_something = FALSE;
|
||||
make_selection:
|
||||
selected_something = FALSE;
|
||||
for (count = 0, curr = menu_info->curr_menu.base; curr;
|
||||
curr = curr->next, count++)
|
||||
if (curr->identifier.a_void != 0 && curr->selector == ch) break;
|
||||
|
||||
+8
-7
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 termcap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 termcap.c $NHDT-Date: 1427756993 2015/03/30 23:09:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
|
||||
/* NetHack 3.5 termcap.c $Date: 2009/05/06 10:59:19 $ $Revision: 1.13 $ */
|
||||
/* SCCS Id: @(#)termcap.c 3.5 2007/12/12 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -844,6 +844,7 @@ const struct {int ti_color, nh_color, nh_bright_color;} ti_map[6] =
|
||||
{COLOR_CYAN,CLR_CYAN,CLR_BRIGHT_CYAN}
|
||||
};
|
||||
|
||||
static char nilstring[] = "";
|
||||
|
||||
static void
|
||||
init_hilite()
|
||||
@@ -868,8 +869,8 @@ init_hilite()
|
||||
hilites[CLR_BLUE] = nh_HI;
|
||||
hilites[CLR_MAGENTA] = nh_HI;
|
||||
hilites[CLR_CYAN] = nh_HI;
|
||||
hilites[CLR_GRAY] = "";
|
||||
hilites[NO_COLOR] = "";
|
||||
hilites[CLR_GRAY] = nilstring;
|
||||
hilites[NO_COLOR] = nilstring;
|
||||
hilites[CLR_ORANGE] = nh_HI;
|
||||
hilites[CLR_BRIGHT_GREEN] = nh_HI;
|
||||
hilites[CLR_YELLOW] = nh_HI;
|
||||
@@ -899,8 +900,8 @@ init_hilite()
|
||||
Strcpy(hilites[CLR_WHITE],MD);
|
||||
Strcat(hilites[CLR_WHITE],scratch);
|
||||
|
||||
hilites[CLR_GRAY] = "";
|
||||
hilites[NO_COLOR] = "";
|
||||
hilites[CLR_GRAY] = nilstring;
|
||||
hilites[NO_COLOR] = nilstring;
|
||||
|
||||
if (iflags.wc2_darkgray) {
|
||||
/* On many terminals, esp. those using classic PC CGA/EGA/VGA
|
||||
@@ -937,8 +938,8 @@ kill_hilite()
|
||||
/* CLR_RED overlaps CLR_ORANGE, do not free */
|
||||
/* CLR_MAGENTA overlaps CLR_BRIGHT_MAGENTA, do not free */
|
||||
/* CLR_BROWN overlaps CLR_YELLOW, do not free */
|
||||
/* CLR_GRAY is a constant "", do not free */
|
||||
/* NO_COLOR is a constant "", do not free */
|
||||
/* CLR_GRAY is static 'nilstring', do not free */
|
||||
/* NO_COLOR is static 'nilstring', do not free */
|
||||
free(hilites[CLR_BRIGHT_BLUE]);
|
||||
free(hilites[CLR_BRIGHT_GREEN]);
|
||||
free(hilites[CLR_BRIGHT_CYAN]);
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date: 1427505884 2015/03/28 01:24:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.73 $ */
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date: 1427667623 2015/03/29 22:20:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.75 $ */
|
||||
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1657,7 +1657,7 @@ struct WinDesc *cw;
|
||||
boolean on_curr_page = FALSE;
|
||||
int lineno = 0;
|
||||
tty_getlin("Search for:", tmpbuf);
|
||||
if (!tmpbuf || tmpbuf[0] == '\033') break;
|
||||
if (!tmpbuf[0] || tmpbuf[0] == '\033') break;
|
||||
Sprintf(searchbuf, "*%s*", tmpbuf);
|
||||
for (curr = cw->mlist; curr; curr = curr->next) {
|
||||
if (on_curr_page) lineno++;
|
||||
|
||||
+22
-3
@@ -17,10 +17,14 @@
|
||||
@echo LEXYYC set to $(LEXYYC)
|
||||
!ENDIF
|
||||
|
||||
# these won't have an impact unless YACC/LEX are defined
|
||||
YTABC = y.tab.c
|
||||
YTABH = y.tab.h
|
||||
LEXYYC = lex.yy.c
|
||||
|
||||
default: all
|
||||
|
||||
all: ..\util\lev_yacc.c ..\util\lev_lex.c
|
||||
all: tools ..\util\lev_yacc.c ..\util\lev_lex.c
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
@@ -29,15 +33,29 @@ clean:
|
||||
-del ..\util\lev_yacc.c
|
||||
-del ..\include\lev_comp.h
|
||||
|
||||
tools:
|
||||
!IFDEF YACC
|
||||
@echo Yacc-alike set to $(YACC)
|
||||
@echo YTABC set to $(YTABC)
|
||||
@echo YTABH set to $(YTABH)
|
||||
!ENDIF
|
||||
|
||||
!IFDEF LEX
|
||||
@echo Lex-alike set to $(LEX)
|
||||
@echo LEXYYC set to $(LEXYYC)
|
||||
!ENDIF
|
||||
|
||||
#==========================================
|
||||
# Level Compiler Stuff
|
||||
#==========================================
|
||||
|
||||
..\util\lev_yacc.c ..\include\lev_comp.h: ..\util\lev_comp.y
|
||||
!IF "$(YACC)"==""
|
||||
!IFNDEF YACC
|
||||
@echo Using pre-built lev_yacc.c and lev_comp.h
|
||||
@copy ..\sys\share\lev_yacc.c ..\util\lev_yacc.c
|
||||
@copy ..\sys\share\lev_comp.h ..\include\lev_comp.h
|
||||
!ELSE
|
||||
@echo Generating lev_yacc.c and lev_comp.h
|
||||
chdir ..\util
|
||||
$(YACC) -d lev_comp.y
|
||||
copy $(YTABC) $@
|
||||
@@ -48,10 +66,11 @@ clean:
|
||||
!ENDIF
|
||||
|
||||
..\util\lev_lex.c: ..\util\lev_comp.l
|
||||
!IF "$(LEX)"==""
|
||||
!IFNDEF LEX
|
||||
@echo Using pre-built lev_lex.c
|
||||
@copy ..\sys\share\lev_lex.c $@
|
||||
!ELSE
|
||||
@echo Generating lev_lex.c
|
||||
chdir ..\util
|
||||
$(LEX) lev_comp.l
|
||||
copy $(LEXYYC) $@
|
||||
|
||||
Reference in New Issue
Block a user