X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=8aae7b4489b4df79a5803758ff78b0755c65ccad;hb=8ec787419ed071b5eaf5710a6a10637ec9fb7a58;hp=e4e35508e40515d11922b0c591cbd0873144f95c;hpb=4ac8f856998e69684cb3465ffaead92a6a6ed9b1;p=xboard.git diff --git a/backend.c b/backend.c index e4e3550..8aae7b4 100644 --- a/backend.c +++ b/backend.c @@ -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; @@ -12075,8 +12075,13 @@ LoadGameOneMove (ChessMove readAhead) if (appData.debugMode) fprintf(debugFP, "Parsed %s into IllegalMove %s\n", yy_text, currentMoveString); - fromX = currentMoveString[0] - AAA; - fromY = currentMoveString[1] - ONE; + if(currentMoveString[1] == '@') { + fromX = CharToPiece(WhiteOnMove(currentMove) ? ToUpper(currentMoveString[0]) : ToLower(currentMoveString[0])); + fromY = DROP_RANK; + } else { + fromX = currentMoveString[0] - AAA; + fromY = currentMoveString[1] - ONE; + } toX = currentMoveString[2] - AAA; toY = currentMoveString[3] - ONE; promoChar = currentMoveString[4];