From: H.G. Muller Date: Wed, 3 Jul 2013 14:37:27 +0000 (+0200) Subject: Let magenta marker activate sweep promotion X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=afd442f06122e6d80024d655aa91e13b1e69599f;p=xboard.git Let magenta marker activate sweep promotion This allows an engine to indicate non-standard promotion possibilities. --- diff --git a/backend.c b/backend.c index 24ae75d..1a30148 100644 --- a/backend.c +++ b/backend.c @@ -7025,6 +7025,7 @@ MarkByFEN(char *fen) while(*fen) { int s = 0; marker[r][f] = 0; + if(*fen == 'M') legal[r][f] = 2; else // request promotion choice if(*fen >= 'A' && *fen <= 'Z') legal[r][f] = 1; else if(*fen >= 'a' && *fen <= 'z') *fen += 'A' - 'a'; if(*fen == '/' && f > BOARD_LEFT) f = BOARD_LEFT, r--; else @@ -7124,8 +7125,8 @@ HoverEvent (int hiX, int hiY, int x, int y) // [HGM] lift: entered new to-square; redraw arrow, and inform engine for(r=0; r= BOARD_LEFT && x < BOARD_RGHT) clearFlag = 1; // and defer click-click move of empty-square to up-click return; } - if(HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, FALSE)) { + if(legal[y][x] == 2 || HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, FALSE)) { if(appData.sweepSelect) { ChessSquare piece = boards[currentMove][fromY][fromX]; promoSweep = defaultPromoChoice;