\r
VOID SayString(char *mess, BOOL flag)\r
{ // for debug file\r
- char buf[MSG_SIZ], *p;\r
+ char buf[8000], *p;\r
if(appData.debugMode) fprintf(debugFP, "SAY '%s'\n", mess);\r
strcpy(buf, mess);\r
if(p = StrCaseStr(buf, "Xboard adjudication:")) {\r
\r
helpMenuInfo.cbSize = sizeof(helpMenuInfo);\r
menuMain = GetMenu(hwndMain);\r
- if(appData.debugMode) fprintf(debugFP, "hwndMain: %8x %8x\n", hwndMain, menuMain);\r
menuJAWS = CreatePopupMenu();\r
\r
for(i=0; menuItemJAWS[i].name; i++) {\r
return;\r
}\r
\r
-extern char castlingRights[MAX_MOVES][BOARD_SIZE];\r
int PosFlags(int nr);\r
\r
typedef struct {\r
swapColor = piece < (int)BlackPawn && !WhiteOnMove(currentMove) ||\r
piece >= (int)BlackPawn && WhiteOnMove(currentMove);\r
cl.count = 0; cl.rf = fromY; cl.ff = fromX; cl.rt = cl.ft = -1;\r
- GenLegal(boards[currentMove], PosFlags(currentMove + swapColor), EP_NONE, \r
- castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);\r
+ GenLegal(boards[currentMove], PosFlags(currentMove + swapColor), ReadCallback, (VOIDSTAR) &cl);\r
if(cl.count == 0) SayString("None", FALSE);\r
boards[currentMove][fromY][fromX] = victim; // repair\r
\r
victim = boards[currentMove][fromY][fromX]; // put dummy piece on target square, to activate Pawn captures\r
boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? WhiteQueen : BlackQueen;\r
cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1;\r
- GenLegal(boards[currentMove], PosFlags(currentMove+1), EP_NONE, \r
- castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);\r
+ GenLegal(boards[currentMove], PosFlags(currentMove+1), ReadCallback, (VOIDSTAR) &cl);\r
if(cl.count == 0) SayString("None", FALSE);\r
\r
SayString("You are defended by", FALSE);\r
\r
boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? BlackQueen : WhiteQueen;\r
cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1;\r
- GenLegal(boards[currentMove], PosFlags(currentMove), EP_NONE, \r
- castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);\r
+ GenLegal(boards[currentMove], PosFlags(currentMove), ReadCallback, (VOIDSTAR) &cl);\r
if(cl.count == 0) SayString("None", FALSE);\r
boards[currentMove][fromY][fromX] = victim; // put back original occupant\r
\r
(BlackPawn <= pdown && pdown <= BlackKing &&\r
BlackPawn <= pup && pup <= BlackKing))) {\r
/* EditPosition, empty square, or different color piece;\r
- click-click move is possible */\r
+ click-click move is possible */ \r
+ char promoChoice = NULLCHAR;\r
\r
- if (IsPromotion(oldFromX, oldFromY, fromX, fromY)) {\r
+ if (HasPromotionChoice(oldFromX, oldFromY, fromX, fromY, &promoChoice)) {\r
if (appData.alwaysPromoteToQueen) {\r
UserMoveEvent(oldFromX, oldFromY, fromX, fromY, 'q');\r
}\r
} \r
}\r
else {\r
- UserMoveEvent(oldFromX, oldFromY, fromX, fromY, NULLCHAR);\r
+ UserMoveEvent(oldFromX, oldFromY, fromX, fromY, promoChoice);\r
}\r
oldFromX = oldFromY = -1;\r
break;\r
}\r
\r
#define JAWS_ARGS \\r
- { "beepOffBoard", ArgInt, (LPVOID) beeps, TRUE },\\r
- { "beepEmpty", ArgInt, (LPVOID) (beeps+1), TRUE },\\r
- { "beepWhite", ArgInt, (LPVOID) (beeps+2), TRUE },\\r
- { "beepBlack", ArgInt, (LPVOID) (beeps+3), TRUE },\\r
- { "beepHoldings", ArgInt, (LPVOID) (beeps+4), TRUE },\\r
+ { "beepOffBoard", ArgInt, (LPVOID) beeps, TRUE, (ArgIniType) 1 },\\r
+ { "beepEmpty", ArgInt, (LPVOID) (beeps+1), TRUE, (ArgIniType) 0 },\\r
+ { "beepWhite", ArgInt, (LPVOID) (beeps+2), TRUE, (ArgIniType) 0 },\\r
+ { "beepBlack", ArgInt, (LPVOID) (beeps+3), TRUE, (ArgIniType) 0 },\\r
+ { "beepHoldings", ArgInt, (LPVOID) (beeps+4), TRUE, (ArgIniType) 0 },\\r
\r
#define JAWS_ALT_INTERCEPT \\r
if(suppressOneKey) {\\r