X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=board.c;h=abd2a68cfe6bf5dfe0af8cba2c16056f583a2a51;hb=e6e38912837a4fe2464356408d10dee950b3121c;hp=5c55b4f8628d0c7e85034ffaf9757c31184161d8;hpb=904e6bd26188be8089a74ad9196bc5c2b9479530;p=xboard.git diff --git a/board.c b/board.c index 5c55b4f..abd2a68 100644 --- a/board.c +++ b/board.c @@ -599,11 +599,13 @@ void AnimateMove (Board board, int fromX, int fromY, int toX, int toY) { ChessSquare piece; - int hop; + int hop, x = toX, y = toY; Pnt start, finish, mid; Pnt frames[kFactor * 2 + 1]; int nFrames, startColor, endColor; + if(killX >= 0 && IS_LION(board[fromY][fromX])) Roar(); + /* Are we animating? */ if (!appData.animate || appData.blindfold) return; @@ -616,6 +618,10 @@ AnimateMove (Board board, int fromX, int fromY, int toX, int toY) piece = board[fromY][fromX]; if (piece >= EmptySquare) return; + if(killX >= 0) toX = killX, toY = killY; // [HGM] lion: first to kill square + +again: + #if DONT_HOP hop = FALSE; #else @@ -653,6 +659,8 @@ AnimateMove (Board board, int fromX, int fromY, int toX, int toY) /* Be sure end square is redrawn */ damage[0][toY][toX] |= True; + + if(toX != x || toY != y) { fromX = toX; fromY = toY; toX = x; toY = y; goto again; } // second leg } void @@ -817,6 +825,7 @@ DrawSquare (int row, int column, ChessSquare piece, int do_flash) snprintf(tString, 3, "%d", piece); align = 4; // holdings count in upper-left corner } + if(piece == DarkSquare) square_color = 2; if(square_color == 2 || appData.blindfold) piece = EmptySquare; if (do_flash && piece != EmptySquare && appData.flashCount > 0) {