Allow skipping to secondary series in -inscriptions string
authorH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 21 Apr 2016 11:51:08 +0000 (13:51 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 21 Apr 2016 11:51:08 +0000 (13:51 +0200)
A slash in the UTF8 string of the -inscriptions option now will start
the inscriptions of the pieces from the secondary series. This allows
writing -incription values that will remain valid wehen new pieces would
be added to the end of the primary series.

draw.c

diff --git a/draw.c b/draw.c
index 1604a23..874fcd8 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -903,6 +903,7 @@ InscribeKanji (cairo_surface_t *canvas, ChessSquare piece, int x, int y)
     p = appData.inscriptions;
     n = piece;
     while(piece > WhitePawn) {
+      if(*p == '/') p++, piece = n - WhitePBishop; // secondary series
       if(*p++ == NULLCHAR) {
         if(n != WhiteKing) return;
         p = q;