reduce flashing w/options simple menu iterations
This commit is contained in:
@@ -1039,6 +1039,7 @@ enum docrt_flags_bits {
|
||||
docrtRefresh = 1, /* redraw_map(), draw what we think the map shows */
|
||||
docrtMapOnly = 2, /* ORed with Recalc or Refresh; draw the map but not
|
||||
* status or perminv */
|
||||
docrtNocls = 4,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -1614,7 +1614,8 @@ docrt_flags(int refresh_flags)
|
||||
coordxy x, y;
|
||||
register struct rm *lev;
|
||||
boolean maponly = (refresh_flags & docrtMapOnly) != 0,
|
||||
redrawonly = (refresh_flags & docrtRefresh) != 0;
|
||||
redrawonly = (refresh_flags & docrtRefresh) != 0,
|
||||
nocls = (refresh_flags & docrtNocls) != 0;
|
||||
|
||||
if (!u.ux || gp.program_state.in_docrt)
|
||||
return; /* display isn't ready yet */
|
||||
@@ -1646,7 +1647,8 @@ docrt_flags(int refresh_flags)
|
||||
* + fills the physical screen with the symbol for rock
|
||||
* + clears the glyph buffer
|
||||
*/
|
||||
cls();
|
||||
if (!nocls)
|
||||
cls();
|
||||
|
||||
/* display memory */
|
||||
for (x = 1; x < COLNO; x++) {
|
||||
|
||||
@@ -8666,7 +8666,8 @@ doset_simple_menu(void)
|
||||
int
|
||||
doset_simple(void)
|
||||
{
|
||||
int pickedone = 0;
|
||||
int pickedone = 0,
|
||||
opt_crt_flags = docrtNocls;
|
||||
|
||||
if (iflags.menu_requested) {
|
||||
/* doset() checks for 'm' and calls doset_simple(); clear the
|
||||
@@ -8690,14 +8691,18 @@ doset_simple(void)
|
||||
if (go.opt_need_redraw) {
|
||||
check_gold_symbol();
|
||||
reglyph_darkroom();
|
||||
docrt();
|
||||
docrt_flags(opt_crt_flags);
|
||||
flush_screen(1);
|
||||
}
|
||||
if (go.opt_need_promptstyle)
|
||||
adjust_menu_promptstyle(WIN_INVEN, &iflags.menu_headings);
|
||||
/*
|
||||
* I don't think the status window requires updating between
|
||||
* simplemenu iterations.
|
||||
if (gc.context.botl || gc.context.botlx) {
|
||||
bot();
|
||||
}
|
||||
*/
|
||||
} while (pickedone > 0);
|
||||
give_opt_msg = TRUE;
|
||||
return ECMD_OK;
|
||||
|
||||
Reference in New Issue
Block a user