From: H.G. Muller Date: Mon, 18 Oct 2010 17:46:33 +0000 (+0200) Subject: Implement -flipBlack in XBoard X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a412a4919ef83ff7cc231ce8176ba9069b41bc65;p=xboard.git Implement -flipBlack in XBoard When -flipBlack is true, the white and back piece pixmaps are swapped in flipView. The idea is that the black pieces are upside-down versions of the white (Shogi) pieces, so that swapping white and black in effect turns all pieces upside down, which is what should happen in flipView. --- diff --git a/xboard.c b/xboard.c index dc99bd3..d9f382a 100644 --- a/xboard.c +++ b/xboard.c @@ -4215,6 +4215,7 @@ static void colorDrawPieceImage(piece, square_color, x, y, dest) } break; } + if(appData.upsideDown && flipView) kind ^= 2; // swap white and black pieces XCopyArea(xDisplay, xpmPieceBitmap[kind][piece], dest, wlPieceGC, 0, 0, squareSize, squareSize, x, y); @@ -8742,6 +8743,7 @@ OverlayPiece(piece, clip, outline, dest) kind = 0; else kind = 2; + if(appData.upsideDown && flipView) kind ^= 2; XCopyArea(xDisplay, xpmPieceBitmap[kind][piece], dest, clip, 0, 0, squareSize, squareSize,