Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor
This commit is contained in:
@@ -164,6 +164,7 @@ curses_character_input_dialog(const char *prompt, const char *choices,
|
||||
CHAR_P def)
|
||||
{
|
||||
WINDOW *askwin = NULL;
|
||||
WINDOW *message_window;
|
||||
int answer, count, maxwidth, map_height, map_width;
|
||||
char *linestr;
|
||||
char askstr[BUFSZ + QBUFSZ];
|
||||
@@ -180,6 +181,9 @@ curses_character_input_dialog(const char *prompt, const char *choices,
|
||||
map_width = term_cols;
|
||||
}
|
||||
|
||||
#ifdef PDCURSES
|
||||
message_window = curses_get_nhwin(MESSAGE_WIN);
|
||||
#endif
|
||||
maxwidth = map_width - 2;
|
||||
|
||||
if (choices != NULL) {
|
||||
@@ -241,8 +245,11 @@ curses_character_input_dialog(const char *prompt, const char *choices,
|
||||
/*curses_stupid_hack = 0; */
|
||||
|
||||
while (1) {
|
||||
#ifdef PDCURSES
|
||||
answer = wgetch(message_window);
|
||||
#else
|
||||
answer = getch();
|
||||
|
||||
#endif
|
||||
if (answer == ERR) {
|
||||
answer = def;
|
||||
break;
|
||||
|
||||
@@ -619,7 +619,13 @@ raw_print(str) -- Print directly to a screen, or otherwise guarantee that
|
||||
void
|
||||
curses_raw_print(const char *str)
|
||||
{
|
||||
#ifdef PDCURSES
|
||||
WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
|
||||
|
||||
curses_message_win_puts(str, FALSE);
|
||||
#else
|
||||
puts(str);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -143,7 +143,7 @@ curses_block(boolean noscroll)
|
||||
{
|
||||
int height, width, ret = 0;
|
||||
WINDOW *win = curses_get_nhwin(MESSAGE_WIN);
|
||||
char *resp = " \n\033"; /* space, enter, esc */
|
||||
char *resp = " \r\n\033"; /* space, enter, esc */
|
||||
|
||||
|
||||
curses_get_window_size(MESSAGE_WIN, &height, &width);
|
||||
@@ -429,7 +429,11 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
|
||||
wmove(win, my, mx);
|
||||
curs_set(1);
|
||||
wrefresh(win);
|
||||
#ifdef PDCURSES
|
||||
ch = wgetch(win);
|
||||
#else
|
||||
ch = getch();
|
||||
#endif
|
||||
curs_set(0);
|
||||
switch(ch) {
|
||||
case '\033': /* DOESCAPE */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1526909614 2018/05/21 13:33:34 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.167 $ */
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1544842261 2018/12/15 02:51:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.188 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -3512,31 +3512,30 @@ static struct tty_status_fields
|
||||
static int hpbar_percent, hpbar_color;
|
||||
static struct condition_t {
|
||||
long mask;
|
||||
const char *text[3]; /* 3: potential display values, progressively
|
||||
* smaller */
|
||||
const char *text[3]; /* 3: potential display vals, progressively shorter */
|
||||
} conditions[] = {
|
||||
/* The sequence order of these matters */
|
||||
{ BL_MASK_STONE, {"Stone", "Ston", "Sto"}},
|
||||
{ BL_MASK_SLIME, {"Slime", "Slim", "Slm"}},
|
||||
{ BL_MASK_STRNGL, {"Strngl", "Stngl", "Str"}},
|
||||
{ BL_MASK_FOODPOIS, {"FoodPois", "Fpois", "Poi"}},
|
||||
{ BL_MASK_TERMILL, {"TermIll" , "Ill", "Ill"}},
|
||||
{ BL_MASK_BLIND, {"Blind", "Blnd", "Bl"}},
|
||||
{ BL_MASK_DEAF, {"Deaf", "Def", "Df"}},
|
||||
{ BL_MASK_STUN, {"Stun", "Stun", "St"}},
|
||||
{ BL_MASK_CONF, {"Conf", "Cnf", "Cn"}},
|
||||
{ BL_MASK_HALLU, {"Hallu", "Hal", "Ha"}},
|
||||
{ BL_MASK_LEV, {"Lev", "Lev", "Lv"}},
|
||||
{ BL_MASK_FLY, {"Fly", "Fly", "Fl"}},
|
||||
{ BL_MASK_RIDE, {"Ride", "Rid", "Ri"}},
|
||||
{ BL_MASK_STONE, { "Stone", "Ston", "Sto" } },
|
||||
{ BL_MASK_SLIME, { "Slime", "Slim", "Slm" } },
|
||||
{ BL_MASK_STRNGL, { "Strngl", "Stngl", "Str" } },
|
||||
{ BL_MASK_FOODPOIS, { "FoodPois", "Fpois", "Poi" } },
|
||||
{ BL_MASK_TERMILL, { "TermIll" , "Ill", "Ill" } },
|
||||
{ BL_MASK_BLIND, { "Blind", "Blnd", "Bl" } },
|
||||
{ BL_MASK_DEAF, { "Deaf", "Def", "Df" } },
|
||||
{ BL_MASK_STUN, { "Stun", "Stun", "St" } },
|
||||
{ BL_MASK_CONF, { "Conf", "Cnf", "Cf" } },
|
||||
{ BL_MASK_HALLU, { "Hallu", "Hal", "Hl" } },
|
||||
{ BL_MASK_LEV, { "Lev", "Lev", "Lv" } },
|
||||
{ BL_MASK_FLY, { "Fly", "Fly", "Fl" } },
|
||||
{ BL_MASK_RIDE, { "Ride", "Rid", "Rd" } },
|
||||
};
|
||||
static const char *encvals[3][6] = {
|
||||
{ "", "Burdened", "Stressed", "Strained", "Overtaxed", "Overloaded"},
|
||||
{ "", "Burden", "Stress", "Strain", "Overtax", "Overload" },
|
||||
{ "", "Brd", "Strs", "Strn", "Ovtx", "Ovld" }
|
||||
{ "", "Burdened", "Stressed", "Strained", "Overtaxed", "Overloaded" },
|
||||
{ "", "Burden", "Stress", "Strain", "Overtax", "Overload" },
|
||||
{ "", "Brd", "Strs", "Strn", "Ovtx", "Ovld" }
|
||||
};
|
||||
#define MAX_PER_ROW 15
|
||||
static enum statusfields fieldorder[2][MAX_PER_ROW] = { /* 2: two status lines */
|
||||
static enum statusfields fieldorder[2][MAX_PER_ROW] = { /* 2: 2 status lines */
|
||||
{ BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, BL_ALIGN,
|
||||
BL_SCORE, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH, BL_FLUSH,
|
||||
BL_FLUSH },
|
||||
|
||||
@@ -152,7 +152,6 @@
|
||||
<ClCompile Include="$(SysShareDir)cppregex.cpp" />
|
||||
<ClCompile Include="$(SysShareDir)nhlan.c" />
|
||||
<ClCompile Include="$(SysShareDir)pcsys.c" />
|
||||
<ClCompile Include="$(SysShareDir)pcunix.c" />
|
||||
<ClCompile Include="$(SysShareDir)random.c" />
|
||||
<ClCompile Include="$(SysWinntDir)ntsound.c" />
|
||||
<ClCompile Include="$(SysWinntDir)nttty.c" />
|
||||
|
||||
@@ -147,7 +147,6 @@
|
||||
<ClCompile Include="$(SysShareDir)cppregex.cpp" />
|
||||
<ClCompile Include="$(SysShareDir)nhlan.c" />
|
||||
<ClCompile Include="$(SysShareDir)pcsys.c" />
|
||||
<ClCompile Include="$(SysShareDir)pcunix.c" />
|
||||
<ClCompile Include="$(SysShareDir)random.c" />
|
||||
<ClCompile Include="$(SysWinntDir)ntsound.c" />
|
||||
<ClCompile Include="$(SysWinntDir)stubs.c">
|
||||
|
||||
Reference in New Issue
Block a user