X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=b7dad0656ff2d4424512794f4dd4c5051335f70b;hb=15eab3074ed1dc476c19b48da66e82dea27399b5;hp=69775951df22254b7df3a96f709862eb1379afb8;hpb=395642a0ccce8adbc55d4c8ff58780ab07c12813;p=xboard.git diff --git a/backend.c b/backend.c index 6977595..b7dad06 100644 --- a/backend.c +++ b/backend.c @@ -2511,6 +2511,12 @@ PlotSeekAd (int i) } void +PlotSingleSeekAd (int i) +{ + PlotSeekAd(i); +} + +void AddAd (char *handle, char *rating, int base, int inc, char rated, char *type, int nr, Boolean plot) { char buf[MSG_SIZ], *ext = ""; @@ -2530,7 +2536,7 @@ AddAd (char *handle, char *rating, int base, int inc, char rated, char *type, i seekNrList[nrOfSeekAds] = nr; zList[nrOfSeekAds] = 0; seekAdList[nrOfSeekAds++] = StrSave(buf); - if(plot) PlotSeekAd(nrOfSeekAds-1); + if(plot) PlotSingleSeekAd(nrOfSeekAds-1); } } @@ -2600,7 +2606,7 @@ DrawSeekGraph () for(i=0; i<4000; i+= 100) if(i>=minRating && i= 0 && x < BOARD_LEFT || x >= BOARD_RGHT) { @@ -7289,6 +7300,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) } ClearHighlights(); fromX = fromY = -1; + MarkTargetSquares(1); DrawPosition(TRUE, boards[currentMove]); return; } @@ -7300,6 +7312,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) if (HasPromotionChoice(fromX, fromY, toX, toY, &promoChoice, appData.sweepSelect)) { SetHighlights(fromX, fromY, toX, toY); + MarkTargetSquares(1); if(gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat || gameInfo.variant == VariantGrand) { // [HGM] super: promotion to captured piece selected from holdings ChessSquare p = boards[currentMove][fromY][fromX], q = boards[currentMove][toY][toX]; @@ -7322,6 +7335,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) if(saveAnimate && !appData.animate && currentMove != oldMove && // drag-move was performed Explode(boards[currentMove-1], fromX, fromY, toX, toY)) DrawPosition(TRUE, boards[currentMove]); + MarkTargetSquares(1); fromX = fromY = -1; } appData.animate = saveAnimate; @@ -9708,9 +9722,6 @@ ShowMove (int fromX, int fromY, int toX, int toY) AnimateMove(boards[forwardMostMove - 1], fromX, fromY, toX, toY); } - if (appData.highlightLastMove) { - SetHighlights(fromX, fromY, toX, toY); - } } currentMove = forwardMostMove; } @@ -9719,6 +9730,11 @@ ShowMove (int fromX, int fromY, int toX, int toY) DisplayMove(currentMove - 1); DrawPosition(FALSE, boards[currentMove]); + if (!pausing || gameMode == PlayFromGameFile || gameMode == AnalyzeFile) { + if (appData.highlightLastMove) { // [HGM] moved to after DrawPosition, as with arrow it could redraw old board + SetHighlights(fromX, fromY, toX, toY); + } + } DisplayBothClocks(); HistorySet(parseList,backwardMostMove,forwardMostMove,currentMove-1); } @@ -13379,6 +13395,7 @@ PauseEvent () WhiteOnMove(forwardMostMove))) { StopClocks(); } + case AnalyzeMode: pausing = TRUE; ModeHighlight(); break;