From 61351b21b01eacc91533169be0bc04d4a2dbf4a2 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 13 Nov 2010 22:55:32 +0100 Subject: [PATCH] Use Falcon and Alfil as built-ins for Seirawan chess Where available (size 49 and 72) we use Falcon for Archbishop and Alfil for Chancelor, to better conform to the Seirawan names Hawk and Elephant. --- winboard/winboard.c | 16 +++++++++++++--- xboard.c | 12 ++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index fcadd27..525fa41 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -2486,14 +2486,24 @@ InitDrawingSizes(BoardSize boardSize, int flags) pieceBitmap[1][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "o"); pieceBitmap[2][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "w"); } else { // Smirf-like - pieceBitmap[0][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "s"); - pieceBitmap[1][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "o"); - pieceBitmap[2][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "w"); + if(gameInfo.variant == VariantSChess) { + pieceBitmap[0][WhiteAngel] = DoLoadBitmap(hInst, "v", squareSize, "s"); + pieceBitmap[1][WhiteAngel] = DoLoadBitmap(hInst, "v", squareSize, "o"); + pieceBitmap[2][WhiteAngel] = DoLoadBitmap(hInst, "v", squareSize, "w"); + } else { + pieceBitmap[0][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "s"); + pieceBitmap[1][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "o"); + pieceBitmap[2][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "w"); + } } if(gameInfo.variant == VariantGothic) { // Vortex-like pieceBitmap[0][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "s"); pieceBitmap[1][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "o"); pieceBitmap[2][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "w"); + } else if(gameInfo.variant == VariantSChess && (squareSize == 49 || squareSize == 72)) { + pieceBitmap[0][WhiteMarshall] = DoLoadBitmap(hInst, "e", squareSize, "s"); + pieceBitmap[1][WhiteMarshall] = DoLoadBitmap(hInst, "e", squareSize, "o"); + pieceBitmap[2][WhiteMarshall] = DoLoadBitmap(hInst, "e", squareSize, "w"); } else { // WinBoard standard pieceBitmap[0][WhiteMarshall] = DoLoadBitmap(hInst, "c", squareSize, "s"); pieceBitmap[1][WhiteMarshall] = DoLoadBitmap(hInst, "c", squareSize, "o"); diff --git a/xboard.c b/xboard.c index 3a39fe0..2e8a773 100644 --- a/xboard.c +++ b/xboard.c @@ -1731,6 +1731,10 @@ void InitDrawingSizes(BoardSize boardSize, int flags) xpmPieceBitmap[i][(int)WhiteMarshall] = xpmPieceBitmap2[i][(int)WhiteSilver]; } #endif + if(gameInfo.variant == VariantSChess && (squareSize == 49 || squareSize == 72)) { + xpmPieceBitmap[i][(int)WhiteAngel] = xpmPieceBitmap2[i][(int)WhiteFalcon]; + xpmPieceBitmap[i][(int)WhiteMarshall] = xpmPieceBitmap2[i][(int)WhiteAlfil]; + } #if !HAVE_LIBXPM // [HGM] why are thee ximMasks used at all? the ximPieceBitmaps seem to be never used! for(p=0; p<=(int)WhiteKing; p++) @@ -1747,6 +1751,10 @@ void InitDrawingSizes(BoardSize boardSize, int flags) ximMaskPm[(int)WhiteMarshall] = ximMaskPm2[(int)WhiteSilver]; } #endif + if(gameInfo.variant == VariantSChess && (squareSize == 49 || squareSize == 72)) { + ximMaskPm[(int)WhiteAngel] = ximMaskPm2[(int)WhiteFalcon]; + ximMaskPm[(int)WhiteMarshall] = ximMaskPm2[(int)WhiteAlfil]; + } #endif } } else { @@ -1766,6 +1774,10 @@ void InitDrawingSizes(BoardSize boardSize, int flags) pieceBitmap[i][(int)WhiteMarshall] = pieceBitmap2[i][(int)WhiteSilver]; } #endif + if(gameInfo.variant == VariantSChess && (squareSize == 49 || squareSize == 72)) { + pieceBitmap[i][(int)WhiteAngel] = pieceBitmap2[i][(int)WhiteFalcon]; + pieceBitmap[i][(int)WhiteMarshall] = pieceBitmap2[i][(int)WhiteAlfil]; + } } } #if HAVE_LIBXPM -- 1.7.0.4