From: H.G. Muller Date: Sun, 12 Jul 2009 17:04:30 +0000 (-0700) Subject: fix for Animation of castling moves in Chess960 X-Git-Tag: v4.4.0.beta1~25 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1cc17e4e2b0f324b5ef1e15dffefaebd8df61bdd;p=xboard.git fix for Animation of castling moves in Chess960 Animation of castling moves in Chess960 turned out to sometimes make the king disappear from the display. For the time being I patched this in xboard.c to suppress animation of FRC castling moves altogether. As FRC castlings internally are represented as KxR, the to-square does not make sense anyway, which made the animation look very weird even when it led not to a king disappearance act. And the Rook move of a castling is never animated. --- diff --git a/xboard.c b/xboard.c index e9f983e..afc3e6d 100644 --- a/xboard.c +++ b/xboard.c @@ -9258,6 +9258,10 @@ AnimateMove(board, fromX, fromY, toX, toY) if (!appData.animate || appData.blindfold) return; + if(board[toY][toX] == WhiteRook && board[fromY][fromX] == WhiteKing || + board[toY][toX] == BlackRook && board[fromY][fromX] == BlackKing) + return; // [HGM] FRC: no animtion of FRC castlings, as to-square is not true to-square + if (fromY < 0 || fromX < 0 || toX < 0 || toY < 0) return; piece = board[fromY][fromX]; if (piece >= EmptySquare) return;