Merge branch 'master' into win32-x64-working
* master: (354 commits) Add missing protos a warning bout lc_error Add S_poisoncloud to Guidebooks ... Conflicts: .gitattributes dat/.gitattributes doc/.gitattributes doc/Guidebook.mn include/config.h include/decl.h include/extern.h include/flag.h include/hack.h include/ntconf.h include/sys.h include/wceconf.h src/apply.c src/attrib.c src/bones.c src/botl.c src/dbridge.c src/dig.c src/do.c src/do_name.c src/dog.c src/dungeon.c src/eat.c src/end.c src/files.c src/fountain.c src/hack.c src/invent.c src/light.c src/makemon.c src/mhitu.c src/mklev.c src/mkmaze.c src/mkobj.c src/mkroom.c src/mon.c src/objnam.c src/options.c src/pager.c src/pickup.c src/potion.c src/pray.c src/questpgr.c src/read.c src/restore.c src/rnd.c src/role.c src/rumors.c src/save.c src/shk.c src/sit.c src/sp_lev.c src/sys.c src/teleport.c src/trap.c src/u_init.c src/uhitm.c src/wield.c src/worn.c src/zap.c sys/amiga/.gitattributes sys/mac/.gitattributes sys/msdos/.gitattributes sys/msdos/pctiles.c sys/msdos/vidvga.c sys/os2/.gitattributes sys/share/.gitattributes sys/share/pcmain.c sys/unix/.gitattributes sys/unix/hints/.gitattributes sys/unix/sysconf sys/unix/unixmain.c sys/vms/.gitattributes sys/wince/.gitattributes sys/wince/mhstatus.c sys/winnt/.gitattributes sys/winnt/Makefile.msc sys/winnt/nhsetup.bat util/lev_comp.l util/makedefs.c win/X11/winmenu.c win/X11/winstat.c win/gnome/gnstatus.c win/share/tilemap.c win/tty/termcap.c win/tty/topl.c win/tty/wintty.c
This commit is contained in:
+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) $@
|
||||
|
||||
@@ -45,7 +45,6 @@ static void nhcoord2display(PNHMapWindow data, int x, int y, LPRECT lpOut);
|
||||
#if (VERSION_MAJOR < 4) && (VERSION_MINOR < 4) && (PATCHLEVEL < 2)
|
||||
static void nhglyph2charcolor(short glyph, uchar* ch, int* color);
|
||||
#endif
|
||||
static COLORREF nhcolor_to_RGB(int c);
|
||||
|
||||
HWND mswin_init_map_window () {
|
||||
static int run_once = 0;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "global.h"
|
||||
|
||||
|
||||
COLORREF nhcolor_to_RGB (int c);
|
||||
HWND mswin_init_map_window (void);
|
||||
void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw);
|
||||
int mswin_map_mode(HWND hWnd, int mode);
|
||||
|
||||
@@ -917,6 +917,9 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
int column;
|
||||
int spacing = 0;
|
||||
|
||||
int color = NO_COLOR, attr;
|
||||
boolean menucolr = FALSE;
|
||||
|
||||
lpdis = (LPDRAWITEMSTRUCT) lParam;
|
||||
|
||||
/* If there are no list box items, skip this message. */
|
||||
@@ -967,6 +970,13 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
buf[0] = item->accelerator;
|
||||
buf[1] = '\x0';
|
||||
|
||||
if (iflags.use_menu_color &&
|
||||
(menucolr = get_menu_coloring(item->str, &color,&attr))) {
|
||||
/* TODO: use attr too */
|
||||
if (color != NO_COLOR)
|
||||
SetTextColor(lpdis->hDC, nhcolor_to_RGB(color));
|
||||
}
|
||||
|
||||
SetRect( &drawRect, x, lpdis->rcItem.top, lpdis->rcItem.right, lpdis->rcItem.bottom );
|
||||
DrawText(lpdis->hDC, NH_A2W(buf, wbuf, 2), 1, &drawRect, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user