\r
int beeps[] = { 1, 0, 0, 0, 0 };\r
int beepCodes[] = { 0, MB_OK, MB_ICONERROR, MB_ICONQUESTION, MB_ICONEXCLAMATION, MB_ICONASTERISK };\r
+static int dropX = -1, dropY = -1;\r
\r
VOID\r
KeyboardEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\r
char *piece, *xchar, *ynum ;\r
int n, beepType = 1; // empty beep\r
\r
+ if(fromX == -1 || fromY == -1) { // if we just dropped piece, stay at that square\r
+ fromX = dropX; fromY = dropY;\r
+ dropX = dropY = -1; // but only once\r
+ }\r
if(fromX == -1 || fromY == -1) {\r
fromX = BOARD_LEFT; fromY = 0;\r
}\r
ynum = SquareToNum(fromY);\r
if(currentPiece != EmptySquare) {\r
// SayString(piece[0] == 'W' ? "white" : "black", TRUE);\r
- sprintf(buf, "%s %s %s", piece, xchar, ynum);\r
+ sprintf(buf, "%s %s %s", xchar, ynum, piece);\r
} else sprintf(buf, "%s %s", xchar, ynum);\r
SayString(buf, TRUE);\r
}\r
suppressClocks = 0; // back on after two requests in rapid succession\r
sprintf(buf1, "%s", TimeString(whiteTimeRemaining));\r
str1 = buf1;\r
- SayString("White's remaining time is", FALSE);\r
+ SayString("White clock", FALSE);\r
SayString(str1, FALSE);\r
sprintf(buf2, "%s", TimeString(blackTimeRemaining));\r
str2 = buf2;\r
- SayString("Black's remaining time is", FALSE);\r
+ SayString("Black clock", FALSE);\r
SayString(str2, FALSE);\r
lastWhiteTime = whiteTimeRemaining;\r
lastBlackTime = blackTimeRemaining;\r
if ((char)wParam == 022 && gameMode == EditPosition) { /* <Ctl R>. Pop up piece menu */\\r
POINT pt; int x, y;\\r
SquareToPos(fromY, fromX, &x, &y);\\r
+ dropX = fromX; dropY = fromY;\\r
pt.x = x; pt.y = y;\\r
if(gameInfo.variant != VariantShogi)\\r
MenuPopup(hwnd, pt, LoadMenu(hInst, "PieceMenu"), -1);\\r