X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=d637ab1dd8d85ddc20a5942873be129930039bf3;hb=17d5e197ff197599a155a56cf2adaca266774a48;hp=ad78134f59cdde954a0369d1ae8830f71e74ba9d;hpb=c0b6d3079c133f9e21766f500feed1c81bf3cafb;p=xboard.git diff --git a/backend.c b/backend.c index ad78134..d637ab1 100644 --- a/backend.c +++ b/backend.c @@ -5528,7 +5528,7 @@ ParseOneMove (char *move, int moveNum, ChessMove *moveType, int *fromX, int *fro /* End of code added by Tord */ case IllegalMove: /* bug or odd chess variant */ if(currentMoveString[1] == '@') { // illegal drop - *fromX = *moveType == WhiteOnMove(moveNum) ? + *fromX = WhiteOnMove(moveNum) ? (int) CharToPiece(ToUpper(currentMoveString[0])) : (int) CharToPiece(ToLower(currentMoveString[0])); goto drop; @@ -6566,7 +6566,7 @@ HasPromotionChoice (int fromX, int fromY, int toX, int toY, char *promoChoice, i promotionZoneSize = BOARD_HEIGHT/3; highestPromotingPiece = (p >= WhiteLion || PieceToChar(piece + 22) == '.') ? WhitePawn : WhiteLion; } else if(gameInfo.variant == VariantShogi) { - promotionZoneSize = BOARD_HEIGHT/3; + promotionZoneSize = BOARD_HEIGHT/3 +(BOARD_HEIGHT == 8); highestPromotingPiece = (int)WhiteAlfil; } else if(gameInfo.variant == VariantMakruk || gameInfo.variant == VariantGrand || gameInfo.variant == VariantChuChess) { promotionZoneSize = 3; @@ -7556,7 +7556,7 @@ printf("to click %d,%d\n",x,y); else gatingPiece = doubleClick ? fromP : EmptySquare; fromX = x; fromY = y; dragging = 1; - ReportClick("lift", x, y); + if(!second) ReportClick("lift", x, y); MarkTargetSquares(0); DragPieceBegin(xPix, yPix, FALSE); if(appData.sweepSelect && CanPromote(piece = boards[currentMove][y][x], y)) {