From 8650c257cc9fcbbe4daaf1f3fff2b87bb53f5c3f Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 13 Jun 2009 09:12:15 -0700 Subject: [PATCH] Added new variant Twilight Chess --- common.h | 2 ++ winboard/resource.h | 1 + winboard/woptions.c | 12 ++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common.h b/common.h index 06e1c87..1780f3b 100644 --- a/common.h +++ b/common.h @@ -290,6 +290,7 @@ typedef enum { VariantJanus, VariantSuper, VariantGreat, + VariantTwilight, VariantUnknown /* Catchall for other unknown variants */ } VariantClass; @@ -331,6 +332,7 @@ typedef enum { "janus",\ "super",\ "great",\ + "twilight",\ "unknown" \ } diff --git a/winboard/resource.h b/winboard/resource.h index 4da6928..3ab644a 100644 --- a/winboard/resource.h +++ b/winboard/resource.h @@ -478,6 +478,7 @@ #define OPT_VariantGiveaway 1525 #define OPT_Variant3Check 1526 #define OPT_VariantGreat 1527 +#define OPT_VariantTwilight 1528 #define IDC_Files 1550 #define IDC_Ranks 1551 #define IDC_Holdings 1552 diff --git a/winboard/woptions.c b/winboard/woptions.c index cd0b029..1e79b6d 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -795,7 +795,9 @@ VariantWhichRadio(HWND hDlg) (IsDlgButtonChecked(hDlg, OPT_VariantNocastle) ? VariantNoCastle : (IsDlgButtonChecked(hDlg, OPT_Variant3Check) ? Variant3Check : (IsDlgButtonChecked(hDlg, OPT_VariantGreat) ? VariantGreat : - VariantNormal )))))))))))))))))))))))))); + (IsDlgButtonChecked(hDlg, OPT_VariantGiveaway) ? VariantGiveaway : + (IsDlgButtonChecked(hDlg, OPT_VariantTwilight) ? VariantTwilight : + VariantNormal )))))))))))))))))))))))))))); } LRESULT CALLBACK @@ -885,9 +887,15 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case VariantNoCastle: CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE); break; - case VariantGreat: // Note to self: must still make this button (and GiveAway too). + case VariantGreat: CheckDlgButton(hDlg, OPT_VariantGreat, TRUE); break; + case VariantGiveaway: + CheckDlgButton(hDlg, OPT_VariantGiveaway, TRUE); + break; + case VariantTwilight: + CheckDlgButton(hDlg, OPT_VariantTwilight, TRUE); + break; default: ; } -- 1.7.0.4