X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=winboard%2Fjaws.c;h=9d8ec9c9269541312662bacb0f314f6f315e23b1;hp=95f70d244e646ae66338897184d15a537f2e361c;hb=08b791a1526fb669916eec752752f1cbb0582de1;hpb=7e9ca02d2427c59cf04b2e9a61010ed5658c2016 diff --git a/winboard/jaws.c b/winboard/jaws.c index 95f70d2..9d8ec9c 100644 --- a/winboard/jaws.c +++ b/winboard/jaws.c @@ -919,13 +919,14 @@ SayWhosTurn() } } +extern char *commentList[]; VOID SayMachineMove(int evenIfDuplicate) { int len, xPos, yPos, moveNr, secondSpace = 0, castle = 0, n; ChessSquare currentpiece; - char *piece, *xchar, *ynum, *p; + char *piece, *xchar, *ynum, *p, checkMark = 0; char c, buf[MSG_SIZ], comment[MSG_SIZ]; static char disambiguation[2]; static int previousMove = 0; @@ -981,6 +982,7 @@ SayMachineMove(int evenIfDuplicate) if(secondSpace) len = secondSpace; // position behind move if(messageText[len-1] == '+' || messageText[len-1] == '#') { /* you are in checkmate */ len--; // strip off check or mate indicator + checkMark = messageText[len]; // make sure still seen after we stip off promo piece } if(messageText[len-2] == '=') { /* promotion */ len-=2; // strip off promotion piece @@ -1037,11 +1039,11 @@ SayMachineMove(int evenIfDuplicate) SayString(piece, FALSE); } else SayString("Capturing onn passann",FALSE); } - if(messageText[len] == '+') SayString("check", FALSE); else - if(messageText[len] == '#') { + } + if(checkMark == '+') SayString("check", FALSE); else + if(checkMark == '#') { SayString("finishing off", FALSE); SayString(WhiteOnMove(n) ? "White" : "Black", FALSE); - } } } @@ -1062,6 +1064,8 @@ SayMachineMove(int evenIfDuplicate) SayString(comment, FALSE); // alphabetic comment (usually game end) } else if(p) SayString(p, FALSE); + if(commentDialog && commentList[currentMove]) SetFocus(commentDialog); + } else { /* starts not with digit */ if(StrCaseStr(messageText, "illegal")) PlayIcsUnfinishedSound();