From 6bbf4d56d24a89e6b734b2befeeb3a6d71d497a2 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Mon, 24 Oct 2011 17:00:13 +0000 Subject: [PATCH] - [+] make godsay take an argument to say whether or not to print "xxx's voice booms out" - [+] still a wrapprint bug - when doing makedesc_skill, all rows after the first are bolded. - [+] happens after showing the yellow line. bold isn't turned off. - [+] was a bug in setcol - needs to UNset bold if not required. --- io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/io.c b/io.c index 5fa7762..7c8abde 100644 --- a/io.c +++ b/io.c @@ -5468,7 +5468,8 @@ char *makedesc_skill(enum SKILL skid, char *retbuf, enum SKILLLEVEL levhilite) { if ((levhilite != PR_INEPT) && (slev == levhilite)) { hilitethis = B_TRUE; } - snprintf(buf, BUFLEN, "%sAt %s level%s: %s\n",hilitethis ? "^8" : "", + snprintf(buf, BUFLEN, "%sAt %s level%s: %s\n", + hilitethis ? "^w" : "", getskilllevelname(sk->skilldesclev[i]), hilitethis ? "^n" : "", sk->skilldesctext[i]); @@ -8578,6 +8579,8 @@ int screenglyphmatches(int x, int y, glyph_t *g) { void setcol(WINDOW *win, enum COLOUR col) { if (needsbold(col)) { wattron(win, A_BOLD); + } else { + wattroff(win, A_BOLD); } wattron(win, COLOR_PAIR(col)); } @@ -10723,7 +10726,7 @@ void textwithcol_real(WINDOW *win, char *buf, int resetcolatend) { col = chartocol(*p); p++; } - setcol(win, col); + if (col != C_NONE) setcol(win, col); if (!(*p)) { done = B_TRUE; break; @@ -10897,7 +10900,7 @@ void wrapprint(WINDOW *win, int *y, int *x, char *format, ... ) { } // return colour to normal now - wattroff(win, A_BOLD); + //wattroff(win, A_BOLD); setcol(win, C_GREY); getyx(win, *y, *x); }