From 4810e20e1187226654ceb1b4b05fa1065c6a6cea Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 30 Jun 2010 10:49:12 +0200 Subject: [PATCH] Allow -flipBlack to work with font-based piece rendering In addition the font-based pieces will also be flipped vertically in flipView for variant shogi when -flipBlack is off. --- winboard/winboard.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index cbf38fa..bb78522 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -2531,6 +2531,9 @@ DrawPieceOnDC(HDC hdc, ChessSquare piece, int color, int sqcolor, int x, int y, SelectObject( tmphdc, hPieceMask[ index ] ); + if(appData.upsideDown ? color==flipView : (flipView && gameInfo.variant == VariantShogi)) + StretchBlt(hdc, x+squareSize, y+squareSize, -squareSize, -squareSize, tmphdc, 0, 0, squareSize, squareSize, SRCAND); + else BitBlt( hdc, x, y, squareSize, squareSize, @@ -2540,6 +2543,9 @@ DrawPieceOnDC(HDC hdc, ChessSquare piece, int color, int sqcolor, int x, int y, SelectObject( tmphdc, hPieceFace[ index ] ); + if(appData.upsideDown ? color==flipView : (flipView && gameInfo.variant == VariantShogi)) + StretchBlt(hdc, x+squareSize, y+squareSize, -squareSize, -squareSize, tmphdc, 0, 0, squareSize, squareSize, SRCPAINT); + else BitBlt( hdc, x, y, squareSize, squareSize, -- 1.7.0.4