Merge branch 'master' into derek-farming
Reverse merge before final reintegration. * master: (40 commits) Fix magic mapped dark room symbols Disclose extinct species alongside genocided ones ... Conflicts: doc/fixes35.0 src/do.c src/files.c src/invent.c src/objnam.c sys/share/pcmain.c
This commit is contained in:
+282
-225
File diff suppressed because it is too large
Load Diff
+13
-2
@@ -1,4 +1,4 @@
|
||||
/* 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 $NHDT-Date: 1428394244 2015/04/07 08:10:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.84 $ */
|
||||
/* 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. */
|
||||
@@ -1462,6 +1462,8 @@ struct WinDesc *cw;
|
||||
for (page_lines = 0, curr = page_start;
|
||||
curr != page_end;
|
||||
page_lines++, curr = curr->next) {
|
||||
int color = NO_COLOR, attr = ATR_NONE;
|
||||
boolean menucolr = FALSE;
|
||||
if (curr->selector)
|
||||
*rp++ = curr->selector;
|
||||
|
||||
@@ -1477,6 +1479,11 @@ struct WinDesc *cw;
|
||||
* actually output the character. We're faster doing
|
||||
* this.
|
||||
*/
|
||||
if (iflags.use_menu_color &&
|
||||
(menucolr = get_menu_coloring(curr->str, &color,&attr))) {
|
||||
term_start_attr(attr);
|
||||
if (color != NO_COLOR) term_start_color(color);
|
||||
} else
|
||||
term_start_attr(curr->attr);
|
||||
for (n = 0, cp = curr->str;
|
||||
#ifndef WIN32CON
|
||||
@@ -1494,6 +1501,10 @@ struct WinDesc *cw;
|
||||
(void) putchar('#'); /* count selected */
|
||||
} else
|
||||
(void) putchar(*cp);
|
||||
if (iflags.use_menu_color && menucolr) {
|
||||
if (color != NO_COLOR) term_end_color();
|
||||
term_end_attr(attr);
|
||||
} else
|
||||
term_end_attr(curr->attr);
|
||||
}
|
||||
} else {
|
||||
@@ -1759,7 +1770,7 @@ struct WinDesc *cw;
|
||||
if (i == cw->maxrow) {
|
||||
#ifdef H2344_BROKEN
|
||||
if(cw->type == NHW_TEXT){
|
||||
tty_curs(BASE_WINDOW, 0, (int)ttyDisplay->cury+1);
|
||||
tty_curs(BASE_WINDOW, 1, (int)ttyDisplay->cury+1);
|
||||
cl_eos();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -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