From fcdae93cdc0700e2680e15aaecdaf1eefa8940cd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 17 Mar 2014 23:05:33 +0100 Subject: [PATCH] Render inscriptions on Chu-promoted pieces in red --- draw.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/draw.c b/draw.c index 080fd82..12b8b65 100644 --- a/draw.c +++ b/draw.c @@ -727,6 +727,7 @@ DrawText (char *string, int x, int y, int align) } cairo_move_to (cr, xx-1, yy); + if(align == -2) cairo_set_source_rgb (cr, 1.0, 0.0, 0.0); else if(align < 3) cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); else cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_show_text (cr, string); @@ -755,7 +756,7 @@ InscribeKanji (ChessSquare piece, int x, int y) strncpy(buf, p, 10); for(q=buf; (*++q & 0xC0) == 0x80;); *q = NULLCHAR; - DrawText(buf, x, y, -1); + DrawText(buf, x, y, n > WhiteLion ? -2 : -1); } void -- 1.7.0.4