X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=aa81da2b152c4f243e1bf893520936204f5c7e8b;hb=03ed95a03b8bbe911780b8c72f2c155671ba2a73;hp=57775f329e35fc3b4bf241bcb055f7ea3ecaf60c;hpb=3d4f4c07067f9789ac9f74fa8208d6f91fc94848;p=xboard.git diff --git a/backend.c b/backend.c index 57775f3..aa81da2 100644 --- a/backend.c +++ b/backend.c @@ -5680,7 +5680,7 @@ LoadMultiPV (int x, int y, char *buf, int index, int *start, int *end, int pane) } ParsePV(buf+startPV, FALSE, gameMode != AnalyzeMode); *start = startPV; *end = index-1; - extendGame = (gameMode == AnalyzeMode && appData.autoExtend); + extendGame = (gameMode == AnalyzeMode && appData.autoExtend && origIndex - startPV < 5); return TRUE; } @@ -8371,10 +8371,10 @@ BitbaseProbe () // probe EGBB if(loaded == 2) return 13; // loading failed before if(loaded == 0) { - loaded = 2; // prepare for failure char *p, *path = strstr(appData.egtFormats, "scorpio:"), buf[MSG_SIZ]; HMODULE lib; PLOAD_EGBB loadBB; + loaded = 2; // prepare for failure if(!path) return 13; // no egbb installed strncpy(buf, path + 8, MSG_SIZ); if(p = strchr(buf, ',')) *p = NULLCHAR; else p = buf + strlen(buf); @@ -11755,11 +11755,20 @@ AutoPlayOneMove () SetHighlights(-1, -1, toX, toY); } } else { + int viaX = moveList[currentMove][5] - AAA; + int viaY = moveList[currentMove][6] - ONE; fromX = moveList[currentMove][0] - AAA; fromY = moveList[currentMove][1] - ONE; HistorySet(parseList, backwardMostMove, forwardMostMove, currentMove); /* [AS] */ + if(moveList[currentMove][4] == ';') { // multi-leg + ChessSquare piece = boards[currentMove][viaY][viaX]; + AnimateMove(boards[currentMove], fromX, fromY, viaX, viaY); + boards[currentMove][viaY][viaX] = boards[currentMove][fromY][fromX]; + AnimateMove(boards[currentMove], fromX=viaX, fromY=viaY, toX, toY); + boards[currentMove][viaY][viaX] = piece; + } else AnimateMove(boards[currentMove], fromX, fromY, toX, toY); if (appData.highlightLastMove) { @@ -15484,9 +15493,18 @@ ForwardInner (int target) SetHighlights(-1, -1, toX, toY); } } else { + int viaX = moveList[target - 1][5] - AAA; + int viaY = moveList[target - 1][6] - ONE; fromX = moveList[target - 1][0] - AAA; fromY = moveList[target - 1][1] - ONE; if (target == currentMove + 1) { + if(moveList[target - 1][4] == ';') { // multi-leg + ChessSquare piece = boards[currentMove][viaY][viaX]; + AnimateMove(boards[currentMove], fromX, fromY, viaX, viaY); + boards[currentMove][viaY][viaX] = boards[currentMove][fromY][fromX]; + AnimateMove(boards[currentMove], viaX, viaY, toX, toY); + boards[currentMove][viaY][viaX] = piece; + } else AnimateMove(boards[currentMove], fromX, fromY, toX, toY); } if (appData.highlightLastMove) { @@ -15851,7 +15869,7 @@ SaveSelected (FILE *g, int dummy, char *dummy2) if(lg->position >= 0) { // selected? LoadGame(f, nItem, "", TRUE); SaveGamePGN2(g); // leaves g open - cnt++; + cnt++; DoEvents(); } lg = (ListGame *) lg->node.succ; } @@ -15890,6 +15908,7 @@ CreateBookEvent () if(lg->position >= 0) { LoadGame(f, nItem, "", TRUE); AddGameToBook(TRUE); + DoEvents(); } lg = (ListGame *) lg->node.succ; } @@ -16589,6 +16608,10 @@ EngineDefinedVariant (ChessProgramState *cps, int n) v = StringToVariant(s); if(v == VariantNormal && strcmp(s, "normal") && !strstr(s, "_normal")) v = VariantUnknown; // garbage is recognized as normal if(v == VariantUnknown) { // non-standard variant in list of engine-supported variants + if(!strcmp(s, "tenjiku") || !strcmp(s, "dai") || !strcmp(s, "dada") || // ignore Alien-Edition variants + !strcmp(s, "maka") || !strcmp(s, "tai") || !strcmp(s, "kyoku") || + !strcmp(s, "checkers") || !strcmp(s, "go") || !strcmp(s, "reversi") || + !strcmp(s, "dark") || !strcmp(s, "alien") || !strcmp(s, "multi") || !strcmp(s, "amazons") ) n++; if(--n < 0) safeStrCpy(buf, s, MSG_SIZ); } if(p) *p++ = ',';