#649, #656 hilite_pet bug (from Yitzhak)

#649
<email deleted> on Friday, March 22, 2002 at 13:27:03
software: os: w2k workstation
nh: stock tty nethack.exe
comments: When you move onto a space and your pet moves onto the space
next to you on your left, your @ is displayed w/ normal attributes
instead of bright.
hilite_pet option is enabled
IBMGraphics option is disabled


#656
<email deleted> on Friday, March 22, 2002 at 16:59:37
nhfrom: 3.4.0 Official binary release for Windows 95/98/NT/2000/Me/XP
software: Windows 98 SE playing the ASCII version
comments: Sometimes when I'm standing next to my pet the @ turns grey, it goes
back to white after I move.
This commit is contained in:
nethack.allison
2002-03-24 03:57:22 +00:00
parent 67604538c6
commit 299fc5ff29

View File

@@ -72,6 +72,7 @@ static char nullstr[] = "";
char erase_char,kill_char;
static char currentcolor = FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE;
static char noninvertedcurrentcolor = FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE;
static char currenthilite = 0;
static char currentbackground = 0;
static boolean colorchange = TRUE;
@@ -759,6 +760,7 @@ term_start_attr(int attr)
switch(attr){
case ATR_INVERSE:
if (iflags.wc_inverse) {
noninvertedcurrentcolor = currentcolor;
/* Suggestion by Lee Berger */
if ((currentcolor & (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED)) ==
(FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED))
@@ -791,13 +793,14 @@ term_end_attr(int attr)
switch(attr){
case ATR_INVERSE:
if (iflags.wc_inverse) {
if (currentcolor == 0)
currentcolor = FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED;
currentbackground = 0;
colorchange = TRUE;
break;
} /* else */
if (iflags.wc_inverse) {
if (currentcolor == 0 && noninvertedcurrentcolor != 0)
currentcolor = noninvertedcurrentcolor;
noninvertedcurrentcolor = 0;
currentbackground = 0;
colorchange = TRUE;
break;
} /* else */
/*FALLTHRU*/
case ATR_ULINE:
case ATR_BOLD: