X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=6e189dbb910927abdb44ebc599bfd836c0c2f34f;hb=3dbaa3c440b654ec995f9e0d5a0fa4ef8f38b4ec;hp=9d244c6a3abd0c4a655c76cf8e48a3e30838f734;hpb=10122705035fb2baa9ce2dcfd387efadef14ca85;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 9d244c6..6e189db 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -103,7 +103,7 @@ void DisplayHoldingsCount(HDC hdc, int x, int y, int align, int copyNumber); VOID NewVariantPopup(HWND hwnd); int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY, /*char*/int promoChar)); -void AnimateAtomicCapture(int toX, int toY, int nFrames); +void AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames); typedef struct { ChessSquare piece; @@ -132,10 +132,10 @@ static HighlightInfo highlightInfo = { {{-1, -1}, {-1, -1}} }; static HighlightInfo premoveHighlightInfo = { {{-1, -1}, {-1, -1}} }; typedef struct { // [HGM] atomic - int x, y, radius; + int fromX, fromY, toX, toY, radius; } ExplodeInfo; -static ExplodeInfo explodeInfo = {0, 0, 0}; +static ExplodeInfo explodeInfo; /* Window class names */ char szAppName[] = "WinBoard"; @@ -1244,6 +1244,8 @@ ArgDescriptor argDescriptors[] = { { "autoLogo", ArgBoolean, (LPVOID) &appData.autoLogo, TRUE }, { "firstOptions", ArgString, (LPVOID) &appData.firstOptions, FALSE }, { "secondOptions", ArgString, (LPVOID) &appData.secondOptions, FALSE }, + { "firstNeedsNoncompliantFEN", ArgString, (LPVOID) &appData.fenOverride1, FALSE }, + { "secondNeedsNoncompliantFEN", ArgString, (LPVOID) &appData.fenOverride2, FALSE }, #ifdef ZIPPY { "zippyTalk", ArgBoolean, (LPVOID) &appData.zippyTalk, FALSE }, @@ -1284,6 +1286,7 @@ ArgDescriptor argDescriptors[] = { { "zippyVariants", ArgString, (LPVOID) &appData.zippyVariants, FALSE }, { "zippyMaxGames", ArgInt, (LPVOID)&appData.zippyMaxGames, FALSE }, { "zippyReplayTimeout", ArgInt, (LPVOID)&appData.zippyReplayTimeout, FALSE }, + { "zippyShortGame", ArgInt, (LPVOID)&appData.zippyShortGame, FALSE }, /* Kludge to allow winboard.ini files from buggy 4.0.4 to be read: */ { "zippyReplyTimeout", ArgInt, (LPVOID)&junk, FALSE }, #endif @@ -4509,7 +4512,8 @@ HDCDrawPosition(HDC hdc, BOOLEAN repaint, Board board) if(explodeInfo.radius) { // [HGM] atomic HBRUSH oldBrush; int x, y, r=(explodeInfo.radius * squareSize)/100; - SquareToPos(explodeInfo.y, explodeInfo.x, &x, &y); + board[explodeInfo.fromY][explodeInfo.fromX] = EmptySquare; // suppress display of capturer + SquareToPos(explodeInfo.toY, explodeInfo.toX, &x, &y); x += squareSize/2; y += squareSize/2; if(!fullrepaint) { @@ -5053,7 +5057,10 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) PromotionPopup(hwnd); /* [HGM] Popup now calls FinishMove */ } else { if(saveAnimate /* ^$!%@#$!$ */ && gameInfo.variant == VariantAtomic - && boards[currentMove][toY][toX] != EmptySquare) AnimateAtomicCapture(toX, toY, 20); + && (boards[currentMove][toY][toX] != EmptySquare || + moveType == WhiteCapturesEnPassant || + moveType == BlackCapturesEnPassant ) ) + AnimateAtomicCapture(fromX, fromY, toX, toY, 20); FinishMove(moveType, fromX, fromY, toX, toY, NULLCHAR); } } @@ -10593,13 +10600,15 @@ static void Tween( POINT * start, POINT * mid, POINT * finish, int factor, void -AnimateAtomicCapture(int toX, int toY, int nFrames) +AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames) { // [HGM] atomic: animate blast wave int i; if(appData.debugMode) fprintf(debugFP, "exploding (%d,%d)\n", toX, toY); - explodeInfo.x = toX; - explodeInfo.y = toY; - for(i=0; i