From a412a4919ef83ff7cc231ce8176ba9069b41bc65 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 18 Oct 2010 19:46:33 +0200 Subject: [PATCH] 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. --- xboard.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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, -- 1.7.0.4