X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=24edde854cb351196713f879efc3b624fad774c0;hb=66fd3db23545caa404030583316767b938c4f739;hp=c3dcf9774bbbec3e8227ea609f8d8e8ef4c2908f;hpb=d6f2e410787f82be2e56856dbbc9b18717dee9dc;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index c3dcf97..24edde8 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -191,6 +191,7 @@ static HBITMAP pieceBitmap[3][(int) BlackPawn]; /* [HGM] nr of bitmaps referred static HBRUSH lightSquareBrush, darkSquareBrush, blackSquareBrush, /* [HGM] for band between board and holdings */ explodeBrush, /* [HGM] atomic */ + markerBrush, /* [HGM] markers */ whitePieceBrush, blackPieceBrush, iconBkgndBrush /*, outlineBrush*/; static POINT gridEndpoints[(BOARD_RANKS + BOARD_FILES + 2) * 2]; static DWORD gridVertexCounts[BOARD_RANKS + BOARD_FILES + 2]; @@ -1853,6 +1854,7 @@ InitDrawingColors() blackPieceBrush = CreateSolidBrush(blackPieceColor); iconBkgndBrush = CreateSolidBrush(GetSysColor(COLOR_BACKGROUND)); explodeBrush = CreateSolidBrush(highlightSquareColor); // [HGM] atomic + markerBrush = CreateSolidBrush(premoveHighlightColor); // [HGM] markers /* [AS] Force rendering of the font-based pieces */ if( fontBitmapSquareSize > 0 ) { fontBitmapSquareSize = 0; @@ -3312,6 +3314,18 @@ HDCDrawPosition(HDC hdc, BOOLEAN repaint, Board board) DrawHighlightsOnDC(hdcmem); DrawBoardOnDC(hdcmem, board, tmphdc); } + for (row = 0; row < BOARD_HEIGHT; row++) { + for (column = 0; column < BOARD_WIDTH; column++) { + if (marker[row][column]) { // marker changes only occur with full repaint! + HBRUSH oldBrush = SelectObject(hdcmem, + marker[row][column] == 2 ? markerBrush : explodeBrush); + SquareToPos(row, column, &x, &y); + Ellipse(hdcmem, x + squareSize/4, y + squareSize/4, + x + 3*squareSize/4, y + 3*squareSize/4); + SelectObject(hdcmem, oldBrush); + } + } + } if(logoHeight) { HBITMAP whiteLogo = (HBITMAP) first.programLogo, blackLogo = (HBITMAP) second.programLogo; if(appData.autoLogo) {