From: H.G.Muller Date: Mon, 11 Jan 2016 10:35:22 +0000 (+0100) Subject: Correct backup pieces for addition of minor Lion X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d4ebe9b5f28a3669819eecf0888ac5095aba0669;p=xboard.git Correct backup pieces for addition of minor Lion The added piece type was not put in the list of backup pieces, so that the pieces beyond it got out of phase, and no backup for the Prince would be found, leading to an error popup about missing default pieces. The error message on this has now been improved to mention the piece casing the trouble. --- diff --git a/draw.c b/draw.c index 81f5392..b88d53d 100644 --- a/draw.c +++ b/draw.c @@ -298,7 +298,7 @@ char *pngPieceNames[] = // must be in same order as internal piece encoding }; char *backupPiece[] = { "Princess", NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "King", "Queen", "Lion" }; // pieces that map on other when not kanji RsvgHandle * @@ -373,7 +373,7 @@ ScaleOnePiece (int color, int piece) if(!(svgPieces[color][piece] = LoadSVG(svgDir, color, piece, 0)) // try to fall back on installed svg && !warned && strcmp(pngPieceNames[piece], "Tile")) { // but do not complain about missing 'Tile' char *msg = _("No default pieces installed!\nSelect your own using '-pieceImageDirectory'."); - printf("%s\n", msg); // give up + printf("%s (%s)\n", msg, pngPieceNames[piece]); // give up DisplayError(msg, 0); warned = 1; // prevent error message being repeated for each piece type }