diff --git a/doc/window.doc b/doc/window.doc index a7141d448..04a74d7af 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -774,8 +774,23 @@ to support: | wraptext | WC2_WRAPTEXT | wc2_wraptext |boolean | | selectsaved | WC2_SELECTSAVED | wc2_selectsaved |boolean | | hitpointbar | WC2_HITPOINTBAR | wc2_hitpointbar |boolean | + | hitpointbar | WC2_HITPOINTBAR | wc2_hitpointbar |boolean | +--------------------+--------------------+--------------------+--------+ + more wincap2 for STATUS_HILITES support and control + +--------------------------------- +---------------------------+ + | To inform the game engine | | + | that the window port is equipped | bit to set in wincap mask | + | to receive the following in its | | + | x_status_update() routine | | + |----------------------------------+---------------------------+ + | BL_FLUSH to render buffered | WC2_FLUSH_STATUS | + | field changes now | | + |----------------------------------+---------------------------+ + | BL_RESET to indicate that all | WC2_RESET_STATUS | + | fields should be redone | | + +----------------------------------+---------------------------+ + align_message -- where to place message window (top, bottom, left, right) align_status -- where to place status display (top, bottom, left, right). ascii_map -- port should display an ascii map if it can. diff --git a/include/winprocs.h b/include/winprocs.h index 3c19d4f03..a0c490f11 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -214,7 +214,9 @@ extern #define WC2_HITPOINTBAR 0x0040L /* 07 show bar representing hit points */ #define WC2_FLUSH_STATUS 0x0080L /* 08 call status_update(BL_FLUSH) after updating status window fields */ - /* 24 free bits */ +#define WC2_RESET_STATUS 0x0100L /* 09 call status_update(BL_RESET) to indicate + draw everything */ + /* 23 free bits */ #define ALIGN_LEFT 1 #define ALIGN_RIGHT 2 diff --git a/src/botl.c b/src/botl.c index 8ffe73c5e..721ad2316 100644 --- a/src/botl.c +++ b/src/botl.c @@ -810,7 +810,8 @@ boolean *valsetlist; * the display, call status_update() with BL_FLUSH. * */ - if (context.botlx) + if (context.botlx && + (windowprocs.wincap2 & WC2_RESET_STATUS) != 0L) status_update(BL_RESET, (genericptr_t) 0, 0, 0, NO_COLOR, &cond_hilites[0]); else if ((windowprocs.wincap2 & WC2_FLUSH_STATUS) != 0L) diff --git a/win/X11/winX.c b/win/X11/winX.c index 5c1de3c12..891a76fa3 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -100,7 +100,11 @@ struct window_procs X11_procs = { "X11", (WC_COLOR | WC_HILITE_PET | WC_ASCII_MAP | WC_TILED_MAP | WC_PLAYER_SELECTION | WC_PERM_INVENT | WC_MOUSE_SUPPORT), - 0L, /* WC2 flag mask */ + (0 +#if defined(STATUS_HILITES) + | WC2_FLUSH_STATUS | WC2_RESET_STATUS +#endif + ), X11_init_nhwindows, X11_player_selection, X11_askname, X11_get_nh_event, X11_exit_nhwindows, X11_suspend_nhwindows, X11_resume_nhwindows, X11_create_nhwindow, diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 5c98c0299..7657b1186 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -67,6 +67,7 @@ struct window_procs tty_procs = { #endif #if defined(STATUS_HILITES) | WC2_HILITE_STATUS | WC2_HITPOINTBAR | WC2_FLUSH_STATUS + | WC2_RESET_STATUS #endif | WC2_DARKGRAY), tty_init_nhwindows, tty_player_selection, tty_askname, tty_get_nh_event, diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 77432f751..fea75b177 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -88,7 +88,7 @@ struct window_procs mswin_procs = { | WC_VARY_MSGCOUNT | WC_WINDOWCOLORS | WC_PLAYER_SELECTION | WC_SPLASH_SCREEN | WC_POPUP_DIALOG | WC_MOUSE_SUPPORT, #ifdef STATUS_HILITES - WC2_HITPOINTBAR | WC2_FLUSH_STATUS | WC2_HILITE_STATUS | + WC2_HITPOINTBAR | WC2_FLUSH_STATUS | WC2_RESET_STATUS | WC2_HILITE_STATUS | #endif 0L, mswin_init_nhwindows, mswin_player_selection, mswin_askname, mswin_get_nh_event, mswin_exit_nhwindows, mswin_suspend_nhwindows,