From 7a6d7a879a119bb1050bc42fc13a83646ab0a002 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 5 Oct 2012 18:54:01 +0200 Subject: [PATCH] Implement variant-dependent png piece symbols --- xboard.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) 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; -- 1.7.0.4