X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fjaws.c;h=4073abe74ba667708e9b2de4495170811fc46891;hb=91e0735ab1cbc57465e0252bc95b90bc2ab13caa;hp=a9cfd7f988b9c4f69adde8d3e6f2b5506546bbb8;hpb=b4785979256d342c544eaca1a6644a70eb96b2e0;p=xboard.git diff --git a/winboard/jaws.c b/winboard/jaws.c index a9cfd7f..4073abe 100644 --- a/winboard/jaws.c +++ b/winboard/jaws.c @@ -352,7 +352,6 @@ KeyboardEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) return; } -extern char castlingRights[MAX_MOVES][BOARD_SIZE]; int PosFlags(int nr); typedef struct { @@ -431,8 +430,7 @@ PossibleAttackMove() swapColor = piece < (int)BlackPawn && !WhiteOnMove(currentMove) || piece >= (int)BlackPawn && WhiteOnMove(currentMove); cl.count = 0; cl.rf = fromY; cl.ff = fromX; cl.rt = cl.ft = -1; - GenLegal(boards[currentMove], PosFlags(currentMove + swapColor), EP_NONE, - castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl); + GenLegal(boards[currentMove], PosFlags(currentMove + swapColor), ReadCallback, (VOIDSTAR) &cl); if(cl.count == 0) SayString("None", FALSE); boards[currentMove][fromY][fromX] = victim; // repair @@ -459,16 +457,14 @@ PossibleAttacked() victim = boards[currentMove][fromY][fromX]; // put dummy piece on target square, to activate Pawn captures boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? WhiteQueen : BlackQueen; cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1; - GenLegal(boards[currentMove], PosFlags(currentMove+1), EP_NONE, - castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl); + GenLegal(boards[currentMove], PosFlags(currentMove+1), ReadCallback, (VOIDSTAR) &cl); if(cl.count == 0) SayString("None", FALSE); SayString("You are defended by", FALSE); boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? BlackQueen : WhiteQueen; cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1; - GenLegal(boards[currentMove], PosFlags(currentMove), EP_NONE, - castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl); + GenLegal(boards[currentMove], PosFlags(currentMove), ReadCallback, (VOIDSTAR) &cl); if(cl.count == 0) SayString("None", FALSE); boards[currentMove][fromY][fromX] = victim; // put back original occupant