X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=ff0608b2c8aa23b319839a4244a713d0132761d6;hb=8c5702d5679cd14739806e3498f67f0fb6b5ef79;hp=890461a190960bb25d2a3a74218ebcfc558a827b;hpb=1c5fc3438224a019380db2fcdc6d6c25693717a6;p=xboard.git diff --git a/backend.c b/backend.c index 890461a..ff0608b 100644 --- a/backend.c +++ b/backend.c @@ -10220,9 +10220,9 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) /* we can always do that 'in place', now pointers to these rights are passed to ApplyMove */ if(gameInfo.variant == VariantBerolina) berolina = EP_BEROLIN_A; - oldEP = (signed char)board[EP_STATUS]; epRank = board[EP_RANK]; epFile = board[EP_FILE]; lastFile = board[LAST_FILE],lastRank = board[LAST_RANK]; + oldEP = (signed char)board[EP_STATUS]; epRank = board[EP_RANK]; epFile = board[EP_FILE]; lastFile = board[LAST_TO] & 255,lastRank = board[LAST_TO] >> 8; board[EP_STATUS] = EP_NONE; - board[EP_FILE] = board[EP_RANK] = board[LAST_FILE] = board[LAST_RANK] = 100; + board[EP_FILE] = board[EP_RANK] = 100, board[LAST_TO] = 0x4040; if (fromY == DROP_RANK) { /* must be first */ @@ -10278,7 +10278,7 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) if(toX fromX) board[EP_STATUS] = toX; - board[LAST_FILE] = toX; board[LAST_RANK] = toY; + board[LAST_TO] = toX + 256*toY; } } else if( pawn == BlackPawn ) { @@ -10292,7 +10292,7 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) if(toX fromX) board[EP_STATUS] = toX; - board[LAST_FILE] = toX; board[LAST_RANK] = toY; + board[LAST_TO] = toX + 256*toY; } }