From: H.G. Muller Date: Fri, 5 Oct 2012 16:54:01 +0000 (+0200) Subject: Implement variant-dependent png piece symbols X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7a6d7a879a119bb1050bc42fc13a83646ab0a002;p=xboard.git Implement variant-dependent png piece symbols --- diff --git a/xboard.c b/xboard.c index 5dc557c..4d12241 100644 --- a/xboard.c +++ b/xboard.c @@ -1057,6 +1057,20 @@ InitDrawingSizes (BoardSize boardSize, int flags) int p; for(p=0; p<=(int)WhiteKing; p++) pngPieceBitmaps[i][p] = pngPieceBitmaps2[i][p]; // defaults + if(gameInfo.variant == VariantShogi) { + pngPieceBitmaps[i][(int)WhiteCannon] = pngPieceBitmaps2[i][(int)WhiteKing+1]; + pngPieceBitmaps[i][(int)WhiteNightrider] = pngPieceBitmaps2[i][(int)WhiteKing+2]; + pngPieceBitmaps[i][(int)WhiteSilver] = pngPieceBitmaps2[i][(int)WhiteKing+3]; + pngPieceBitmaps[i][(int)WhiteGrasshopper] = pngPieceBitmaps2[i][(int)WhiteKing+4]; + pngPieceBitmaps[i][(int)WhiteQueen] = pngPieceBitmaps2[i][(int)WhiteLance]; + } + if(gameInfo.variant == VariantGothic) { + pngPieceBitmaps[i][(int)WhiteMarshall] = pngPieceBitmaps2[i][(int)WhiteSilver]; + } + if(gameInfo.variant == VariantSChess) { + pngPieceBitmaps[i][(int)WhiteAngel] = pngPieceBitmaps2[i][(int)WhiteFalcon]; + pngPieceBitmaps[i][(int)WhiteMarshall] = pngPieceBitmaps2[i][(int)WhiteAlfil]; + } } oldMono = -10; // kludge to force recreation of animation masks oldVariant = gameInfo.variant;