From: cohrs Date: Thu, 31 Jan 2002 03:21:39 +0000 (+0000) Subject: tty pet hiliting may turn off on color changes X-Git-Tag: MOVE2GIT~3307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc6392f77ff3eb7470356e85a8b0708cd3023561;p=nethack tty pet hiliting may turn off on color changes check to turn on hilite must come after check to change color, since changing color uses term_end_color which may turn off inverse video too --- diff --git a/win/tty/wintty.c b/win/tty/wintty.c index b281e9822..31d8516e1 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -2399,12 +2399,6 @@ tty_print_glyph(window, x, y, glyph) } #endif - if (((special & MG_PET) && iflags.hilite_pet) || - ((special & MG_DETECT) && iflags.use_inverse)) { - term_start_attr(ATR_INVERSE); - reverse_on = TRUE; - } - #ifdef TEXTCOLOR if (color != ttyDisplay->color) { if(ttyDisplay->color != NO_COLOR) @@ -2415,6 +2409,13 @@ tty_print_glyph(window, x, y, glyph) } #endif /* TEXTCOLOR */ + /* must be after color check; term_end_color may turn off inverse too */ + if (((special & MG_PET) && iflags.hilite_pet) || + ((special & MG_DETECT) && iflags.use_inverse)) { + term_start_attr(ATR_INVERSE); + reverse_on = TRUE; + } + #if defined(USE_TILES) && defined(MSDOS) if (iflags.grmode && iflags.tile_view) xputg(glyph,ch,special);