X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=9333320d0716fcef294df9a8cdb455a84619b769;hb=54fc63f1e8ea41966f47d2b60b616db0a9c5010d;hp=69775951df22254b7df3a96f709862eb1379afb8;hpb=395642a0ccce8adbc55d4c8ff58780ab07c12813;p=xboard.git diff --git a/backend.c b/backend.c index 6977595..9333320 100644 --- a/backend.c +++ b/backend.c @@ -2511,6 +2511,14 @@ PlotSeekAd (int i) } void +PlotSingleSeekAd (int i) +{ + DrawSeekOpen(); + PlotSeekAd(i); + DrawSeekClose(); +} + +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 +2538,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); } } @@ -2594,6 +2602,7 @@ DrawSeekGraph () h = BOARD_HEIGHT * (squareSize + lineGap) + lineGap; w = BOARD_WIDTH * (squareSize + lineGap) + lineGap; + DrawSeekOpen(); DrawSeekBackground(0, 0, w, h); DrawSeekAxis(hMargin, h-1-vMargin, w-5, h-1-vMargin); DrawSeekAxis(hMargin, h-1-vMargin, hMargin, 5); @@ -2618,6 +2627,7 @@ DrawSeekGraph () } } for(i=0; i= 0 && x < BOARD_LEFT || x >= BOARD_RGHT) { @@ -7289,6 +7304,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) } ClearHighlights(); fromX = fromY = -1; + MarkTargetSquares(1); DrawPosition(TRUE, boards[currentMove]); return; } @@ -7300,6 +7316,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 +7339,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 +9726,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 +9734,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 +13399,7 @@ PauseEvent () WhiteOnMove(forwardMostMove))) { StopClocks(); } + case AnalyzeMode: pausing = TRUE; ModeHighlight(); break;