/* Mark this square as needing to be redrawn. Note that
we don't remove the piece though, since logically (ie
as seen by opponent) the move hasn't been made yet. */
- damage[0][boardY][boardX] = True;
+ damage[0][boardY][boardX] |= True;
} else {
anims[Player].dragActive = False;
}
DrawOneSquare(anims[Player].startSquare.x, anims[Player].startSquare.y,
EmptySquare, anims[Player].startColor, 0, NULL, NULL, 0);
AnimationFrame(Player, &anims[Player].prevFrame, anims[Player].dragPiece);
- damage[0][anims[Player].startBoardY][anims[Player].startBoardX] = TRUE;
+ damage[0][anims[Player].startBoardY][anims[Player].startBoardX] |= TRUE;
}
static void
for (i=0; i<appData.flashCount; ++i) {
DrawOneSquare(x, y, piece, square_color, 0, tString, bString, 0);
GraphExpose(currBoard, x, y, squareSize, squareSize);
+ DoEvents(); // requires event processing to actually update screen :-(
FlashDelay(flash_delay);
DrawOneSquare(x, y, EmptySquare, square_color, 0, tString, bString, 0);
GraphExpose(currBoard, x, y, squareSize, squareSize);
+ DoEvents();
FlashDelay(flash_delay);
}
}
/* Special check for castling so we don't flash both the king
and the rook (just flash the king). */
if (do_flash) {
- /* Mark rook for drawing with NO flashing. */
- check_castle_draw(board, lastBoard[nr], &rrow, &rcol);
+ if(check_castle_draw(board, lastBoard[nr], &rrow, &rcol)) {
+ /* Mark rook for drawing with NO flashing. */
+ damage[nr][rrow][rcol] |= 1;
+ }
}
/* First pass -- Erase arrow and grid highlights, but keep square content unchanged. Except for new markers. */
DrawSquare(i, j, board[i][j], 0);
if(lineGap && damage[nr][i][j] & 2) {
drawHighlight(j, i, 0);
- SquareExpose(i, j, 1);
+ SquareExpose(i, j, lineGap);
} else SquareExpose(i, j, 0);
damage[nr][i][j] = 0;
}