X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=749bac904daa7ebb112d08a903aa89f3572ff329;hb=211b194243de81ed013566a30ef754018586c4e1;hp=7f38a5d8c945539c0dbbfb7a926ff26b793ec680;hpb=2b3e74845df5fa493d77cff31634017d307d8268;p=xboard.git diff --git a/backend.c b/backend.c index 7f38a5d..749bac9 100644 --- a/backend.c +++ b/backend.c @@ -6028,9 +6028,10 @@ InitPosition (int redraw) gameInfo.boardHeight = 8; gameInfo.holdingsSize = 0; nrCastlingRights = -1; /* [HGM] Kludge to indicate default should be used */ - for(i=0; iBOARD_LEFT && board[toY][toX-1] == BlackPawn && gameInfo.variant != VariantBerolina || toX < fromX) board[EP_STATUS] = toX | berolina; @@ -9928,6 +9932,7 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) if(fromY != toY) // [HGM] Xiangqi sideway Pawn moves should not count as 50-move breakers board[EP_STATUS] = EP_PAWN_MOVE; if( toY-fromY== -2) { + board[EP_FILE] = (fromX + toX)/2; board[EP_RANK] = (fromY + toY)/2; if(toX>BOARD_LEFT && board[toY][toX-1] == WhitePawn && gameInfo.variant != VariantBerolina || toX < fromX) board[EP_STATUS] = toX | berolina; @@ -9937,6 +9942,11 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) } } + if(fromY == 0) board[TOUCHED_W] |= 1<