From 1cc17e4e2b0f324b5ef1e15dffefaebd8df61bdd Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 12 Jul 2009 10:04:30 -0700 Subject: [PATCH] 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. --- xboard.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) 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; -- 1.7.0.4