COLORREF chroma = RGB(0xFF,0x00,0xFF);\r
RECT rc;\r
SIZE sz;\r
+\r
POINT pt;\r
int backColor = whitePieceColor; \r
int foreColor = blackPieceColor;\r
{ // correct board size to one where built-in pieces exist\r
if((v == VariantCapablanca || v == VariantGothic || v == VariantGrand || v == VariantCapaRandom || v == VariantJanus || v == VariantSuper)\r
&& (boardSize < SizePetite || boardSize > SizeBulky) // Archbishop and Chancellor available in entire middle range\r
+\r
|| (v == VariantShogi && boardSize != SizeModerate) // Japanese-style Shogi\r
|| v == VariantKnightmate || v == VariantSChess || v == VariantXiangqi || v == VariantSpartan\r
|| v == VariantShatranj || v == VariantMakruk || v == VariantGreat || v == VariantFairy || v == VariantLion ) {\r
else\r
if(dragInfo.from.x == BOARD_RGHT+1 )\r
board[dragInfo.from.y][dragInfo.from.x-1]++;\r
+\r
board[dragInfo.from.y][dragInfo.from.x] = dragged_piece;\r
x = dragInfo.pos.x - squareSize / 2;\r
y = dragInfo.pos.y - squareSize / 2;\r
WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
FARPROC lpProc;\r
- int wmId, wmEvent;\r
+ int wmId;\r
char *defName;\r
FILE *f;\r
UINT number;\r
\r
case WM_COMMAND: /* message: command from application menu */\r
wmId = LOWORD(wParam);\r
- wmEvent = HIWORD(wParam);\r
\r
switch (wmId) {\r
case IDM_NewGame:\r
CommentDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
static HANDLE hwndText = NULL;\r
- int len, newSizeX, newSizeY, flags;\r
+ int len, newSizeX, newSizeY;\r
static int sizeX, sizeY;\r
char *str;\r
RECT rect;\r
/* Size and position the dialog */\r
if (!commentDialog) {\r
commentDialog = hDlg;\r
- flags = SWP_NOZORDER;\r
GetClientRect(hDlg, &rect);\r
sizeX = rect.right;\r
sizeY = rect.bottom;\r
LRESULT CALLBACK\r
ErrorDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
- HANDLE hwndText;\r
RECT rChild;\r
\r
switch (message) {\r
\r
errorDialog = hDlg;\r
SetWindowText(hDlg, errorTitle);\r
- hwndText = GetDlgItem(hDlg, OPT_ErrorText);\r
SetDlgItemText(hDlg, OPT_ErrorText, errorMessage);\r
return FALSE;\r
\r
LRESULT CALLBACK\r
GothicDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
- HANDLE hwndText;\r
RECT rChild;\r
int height = GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYFRAME);\r
\r
*/\r
gothicDialog = hDlg;\r
SetWindowText(hDlg, errorTitle);\r
- hwndText = GetDlgItem(hDlg, OPT_ErrorText);\r
SetDlgItemText(hDlg, OPT_ErrorText, errorMessage);\r
return FALSE;\r
\r
ov.OffsetHigh = 0;\r
switch(code) {\r
case 1: LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK, 0, 1024, 0, &ov); break; // LOCK_SH\r
+\r
case 2: LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK, 0, 1024, 0, &ov); break; // LOCK_EX\r
case 3: UnlockFileEx(hFile, 0, 1024, 0, &ov); break; // LOCK_UN\r
default: return -1;\r
LayoutOptions(int firstOption, int endOption, char *groupName, Option *optionList)\r
{\r
int i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons;\r
- Control lastType, nextType;\r
+ Control lastType, nextType=Label;\r
\r
nextOption = firstOption;\r
while(nextOption < endOption) {\r
GetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)\r
// read out all controls, and if value is altered, remember it and send it to the engine\r
{\r
- HANDLE hwndCombo;\r
int i, k, new=0, changed=0, len;\r
char **choices, newText[MSG_SIZ], buf[MSG_SIZ], *text;\r
BOOL success;\r
break;\r
case ComboBox:\r
choices = (char**) optionList[j].textValue;\r
- hwndCombo = GetDlgItem(hDlg, 2001+2*i);\r
success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ );\r
if(!success) break;\r
new = -1;\r
int extra, num = ES_NUMBER;\r
\r
switch(type) {\r
- case Slider+100:\r
- num = 0; // needs text control for accepting negative numbers\r
+// case Slider+100:\r
+// num = 0; // needs text control for accepting negative numbers\r
case Slider:\r
case Spin:\r
AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);\r
\r
void PseudoOK(HWND hDlg)\r
{\r
- void (*saveOK)();\r
- saveOK = okFunc; okFunc = 0;\r
+ okFunc = 0;\r
GetOptionValues(hDlg, activeCps, activeList);\r
EndDialog( hDlg, 0 );\r
comboCallback = NULL; activeCps = NULL;\r