X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=73bd41cfcbff2a5177e57edbeddf68ded0036609;hb=a2f26aa3631ae35cb507615e547eccb9ac521083;hp=f5254ea731e9a67e823142cb34cbda0f9c95a93b;hpb=4d4d6305b409a21e22162ca25175aa6d60dc8916;p=xboard.git diff --git a/xboard.c b/xboard.c index f5254ea..73bd41c 100644 --- a/xboard.c +++ b/xboard.c @@ -4263,7 +4263,7 @@ static void colorDrawPieceImage(piece, square_color, x, y, dest) } break; } - if(appData.upsideDown && flipView) kind ^= 2; // swap white and black pieces + if(appData.upsideDown && flipView) { kind ^= 2; p += p < BlackPawn ? BlackPawn : -BlackPawn; }// swap white and black pieces if(useTexture & square_color+1) { BlankSquare(x, y, square_color, piece, dest, 1); // erase previous contents with background XSetClipMask(xDisplay, wlPieceGC, xpmMask[p]); @@ -4605,9 +4605,12 @@ void XDrawPosition(w, repaint, board) * but this causes a very distracting flicker. */ - if ( lineGap && IsDrawArrowEnabled()) repaint = True; if (!repaint && lastBoardValid[nr] && (nr == 1 || lastFlipView == flipView)) { + if ( lineGap && IsDrawArrowEnabled()) + XDrawSegments(xDisplay, xBoardWindow, lineGC, + gridSegments, BOARD_HEIGHT + BOARD_WIDTH + 2); + /* If too much changes (begin observing new game, etc.), don't do flashing */ do_flash = too_many_diffs(board, lastBoard[nr]) ? 0 : 1; @@ -8766,6 +8769,7 @@ BeginAnimation(anim, piece, startColor, start) { Pixmap mask; + if(appData.upsideDown && flipView) piece += piece < BlackPawn ? BlackPawn : -BlackPawn; /* The old buffer is initialised with the start square (empty) */ BlankSquare(start->x, start->y, startColor, EmptySquare, anim->saveBuf, 0); anim->prevFrame = *start; @@ -9303,16 +9307,13 @@ void DrawArrowBetweenSquares( int s_col, int s_row, int d_col, int d_row ) DrawArrowBetweenPoints( s_x, s_y, d_x, d_y ); - if(lineGap == 0) { - // this is a good idea, but it only works when lineGap == 0, because 'damage' on grid lines is not repaired - hor = 64*s_col + 32; vert = 64*s_row + 32; - for(i=0; i<= 64; i++) { + hor = 64*s_col + 32; vert = 64*s_row + 32; + for(i=0; i<= 64; i++) { damage[0][vert+6>>6][hor+6>>6] = True; damage[0][vert-6>>6][hor+6>>6] = True; damage[0][vert+6>>6][hor-6>>6] = True; damage[0][vert-6>>6][hor-6>>6] = True; hor += d_col - s_col; vert += d_row - s_row; - } } }