X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=917a532a1ea842a5a34c2abb585b5c0c9c2c6a8d;hb=35f89898c92a8709618e2db77b11cbedfd7fc48c;hp=bf98cc0805ddde51aeb152eb0110456a0a84112e;hpb=81a640a52b1e72cc1d26d9d85a6644ffb933b06c;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index bf98cc0..917a532 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -92,6 +92,9 @@ #include "help.h" #include "wsnap.h" +#define SLASH '/' +#define DATADIR "~~" + //void InitEngineUCI( const char * iniDir, ChessProgramState * cps ); int myrandom(void); @@ -4477,9 +4480,9 @@ Promotion(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) PieceToChar(BlackMarshall) != '~') ) ? SW_SHOW : SW_HIDE); /* [HGM] Hide B & R button in Shogi, use Q as promote, N as defer */ - ShowWindow(GetDlgItem(hDlg, PB_Rook), !style ? SW_SHOW : SW_HIDE); - ShowWindow(GetDlgItem(hDlg, PB_Bishop), !style ? SW_SHOW : SW_HIDE); - if(style) { + ShowWindow(GetDlgItem(hDlg, PB_Rook), !promoStyle ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, PB_Bishop), !promoStyle ? SW_SHOW : SW_HIDE); + if(promoStyle) { SetDlgItemText(hDlg, PB_Queen, "YES"); SetDlgItemText(hDlg, PB_Knight, "NO"); SetWindowText(hDlg, "Promote?"); @@ -4500,7 +4503,7 @@ Promotion(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) promoChar = gameInfo.variant == VariantSuper ? PieceToChar(BlackSilver) : PieceToChar(BlackKing); break; case PB_Queen: - promoChar = style ? '+' : ToLower(PieceToChar(WhiteOnMove(currentMove) ? WhiteQueen : BlackQueen)); + promoChar = promoStyle ? '+' : ToLower(PieceToChar(WhiteOnMove(currentMove) ? WhiteQueen : BlackQueen)); break; case PB_Rook: promoChar = ToLower(PieceToChar(WhiteOnMove(currentMove) ? WhiteRook : BlackRook)); @@ -4517,7 +4520,7 @@ Promotion(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) promoChar = ToLower(PieceToChar(WhiteOnMove(currentMove) ? WhiteAngel : BlackAngel)); break; case PB_Knight: - promoChar = gameInfo.variant == VariantShogi ? '=' : style ? NULLCHAR : + promoChar = gameInfo.variant == VariantShogi ? '=' : promoStyle ? NULLCHAR : ToLower(PieceToChar(WhiteOnMove(currentMove) ? WhiteKnight : BlackKnight)); break; default: @@ -7671,6 +7674,7 @@ DoWriteFile(HANDLE hFile, char *buf, int count, DWORD *outCount, else err = GetLastError(); } + } return err; } @@ -8536,6 +8540,7 @@ HWND gameListOptionsDialog; // low-level front-end: clear text edit / list widget void + GLT_ClearList() { SendDlgItemMessage( gameListOptionsDialog, IDC_GameListTags, LB_RESETCONTENT, 0, 0 );