add the already supported variants 3check and great (=Great Shatranj) to the New...
authorH.G. Muller <h.g.muller@hccnet.nl>
Thu, 11 Jun 2009 04:37:47 +0000 (21:37 -0700)
committerArun Persaud <arun@nubati.net>
Thu, 11 Jun 2009 04:37:47 +0000 (21:37 -0700)
winboard/resource.h
winboard/winboard.rc
winboard/woptions.c

index 812247a..4da6928 100644 (file)
 #define OPT_VariantWildcastle           1523\r
 #define OPT_VariantNocastle             1524\r
 #define OPT_VariantGiveaway             1525\r
 #define OPT_VariantWildcastle           1523\r
 #define OPT_VariantNocastle             1524\r
 #define OPT_VariantGiveaway             1525\r
+#define OPT_Variant3Check               1526\r
+#define OPT_VariantGreat                1527\r
 #define IDC_Files                       1550\r
 #define IDC_Ranks                       1551\r
 #define IDC_Holdings                    1552\r
 #define IDC_Files                       1550\r
 #define IDC_Ranks                       1551\r
 #define IDC_Holdings                    1552\r
index 59c0e9e..6d5008b 100644 (file)
@@ -637,6 +637,8 @@ BEGIN
                     50,10\r
     CONTROL         "&Janus",OPT_VariantJanus,"Button",BS_AUTORADIOBUTTON,9,84,\r
                     50,10\r
                     50,10\r
     CONTROL         "&Janus",OPT_VariantJanus,"Button",BS_AUTORADIOBUTTON,9,84,\r
                     50,10\r
+    CONTROL         "&3Check",OPT_Variant3Check,"Button",BS_AUTORADIOBUTTON,9,94,\r
+                    50,10\r
     CONTROL         "&knightmate",OPT_VariantKnightmate,"Button",BS_AUTORADIOBUTTON,\r
                     70,14,50,10\r
     CONTROL         "&atomic",OPT_VariantAtomic,"Button",BS_AUTORADIOBUTTON,\r
     CONTROL         "&knightmate",OPT_VariantKnightmate,"Button",BS_AUTORADIOBUTTON,\r
                     70,14,50,10\r
     CONTROL         "&atomic",OPT_VariantAtomic,"Button",BS_AUTORADIOBUTTON,\r
@@ -653,6 +655,8 @@ BEGIN
                     50,10\r
     CONTROL         "&wildcastle",OPT_VariantWildcastle,"Button",BS_AUTORADIOBUTTON,70,84,\r
                     50,10\r
                     50,10\r
     CONTROL         "&wildcastle",OPT_VariantWildcastle,"Button",BS_AUTORADIOBUTTON,70,84,\r
                     50,10\r
+    CONTROL         "&great",OPT_VariantGreat,"Button",BS_AUTORADIOBUTTON,70,94,\r
+                    50,10\r
     CONTROL         "&fairy",OPT_VariantFairy,"Button",BS_AUTORADIOBUTTON,134,\r
                     14,50,10\r
     CONTROL         "&bughouse",OPT_VariantBughouse,"Button",BS_AUTORADIOBUTTON,134,24,50,\r
     CONTROL         "&fairy",OPT_VariantFairy,"Button",BS_AUTORADIOBUTTON,134,\r
                     14,50,10\r
     CONTROL         "&bughouse",OPT_VariantBughouse,"Button",BS_AUTORADIOBUTTON,134,24,50,\r
@@ -669,16 +673,16 @@ BEGIN
                     74,50,10\r
     CONTROL         "&nocastle",OPT_VariantNocastle,"Button",BS_AUTORADIOBUTTON,134,\r
                     84,50,10\r
                     74,50,10\r
     CONTROL         "&nocastle",OPT_VariantNocastle,"Button",BS_AUTORADIOBUTTON,134,\r
                     84,50,10\r
-    GROUPBOX        "Variant",IDC_STATIC,4,4,185,95\r
-    LTEXT           "Board size:",IDC_STATIC,10,115,40,8\r
-    EDITTEXT        IDC_Ranks,60,111,14,14,ES_AUTOHSCROLL\r
-    LTEXT           "ranks",IDC_STATIC,77,115,22,8\r
-    EDITTEXT        IDC_Files,116,111,14,14,ES_AUTOHSCROLL\r
-    LTEXT           "files",IDC_STATIC,133,115,37,8\r
-    LTEXT           "Holdings with room for:",IDC_STATIC,10,133,90,8\r
-    EDITTEXT        IDC_Holdings,93,129,14,14,ES_AUTOHSCROLL\r
-    LTEXT           "pieces",IDC_STATIC,110,133,22,8\r
-    LTEXT           "('-1' means defaults for selected variant)",IDC_STATIC,10,151,150,8\r
+    GROUPBOX        "Variant",IDC_STATIC,4,4,185,105\r
+    LTEXT           "Board size:",IDC_STATIC,10,125,40,8\r
+    EDITTEXT        IDC_Ranks,60,121,14,14,ES_AUTOHSCROLL\r
+    LTEXT           "ranks",IDC_STATIC,77,125,22,8\r
+    EDITTEXT        IDC_Files,116,121,14,14,ES_AUTOHSCROLL\r
+    LTEXT           "files",IDC_STATIC,133,125,37,8\r
+    LTEXT           "Holdings with room for:",IDC_STATIC,10,143,90,8\r
+    EDITTEXT        IDC_Holdings,93,139,14,14,ES_AUTOHSCROLL\r
+    LTEXT           "pieces",IDC_STATIC,110,143,22,8\r
+    LTEXT           "('-1' means defaults for selected variant)",IDC_STATIC,10,161,150,8\r
 END\r
 \r
 DLG_Fonts DIALOG DISCARDABLE  0, 0, 266, 226\r
 END\r
 \r
 DLG_Fonts DIALOG DISCARDABLE  0, 0, 266, 226\r
index b1f50b6..cd0b029 100644 (file)
@@ -793,7 +793,9 @@ VariantWhichRadio(HWND hDlg)
          (IsDlgButtonChecked(hDlg, OPT_VariantJanus) ? VariantJanus :
          (IsDlgButtonChecked(hDlg, OPT_VariantWildcastle) ? VariantWildCastle :
          (IsDlgButtonChecked(hDlg, OPT_VariantNocastle) ? VariantNoCastle :
          (IsDlgButtonChecked(hDlg, OPT_VariantJanus) ? VariantJanus :
          (IsDlgButtonChecked(hDlg, OPT_VariantWildcastle) ? VariantWildCastle :
          (IsDlgButtonChecked(hDlg, OPT_VariantNocastle) ? VariantNoCastle :
-          VariantNormal ))))))))))))))))))))))));
+         (IsDlgButtonChecked(hDlg, OPT_Variant3Check) ? Variant3Check :
+         (IsDlgButtonChecked(hDlg, OPT_VariantGreat) ? VariantGreat :
+          VariantNormal ))))))))))))))))))))))))));
 }
 
 LRESULT CALLBACK
 }
 
 LRESULT CALLBACK
@@ -866,6 +868,8 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
       CheckDlgButton(hDlg, OPT_VariantCylinder, TRUE);
       break;
     case Variant3Check:
       CheckDlgButton(hDlg, OPT_VariantCylinder, TRUE);
       break;
     case Variant3Check:
+      CheckDlgButton(hDlg, OPT_Variant3Check, TRUE);
+      break;
     case VariantSuper:
       CheckDlgButton(hDlg, OPT_VariantSuper, TRUE);
       break;
     case VariantSuper:
       CheckDlgButton(hDlg, OPT_VariantSuper, TRUE);
       break;
@@ -881,9 +885,9 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     case VariantNoCastle:
       CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE);
       break;
     case VariantNoCastle:
       CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE);
       break;
-//    case VariantGreat: // Note to self: must still make this button (and GiveAway too).
-//      CheckDlgButton(hDlg, OPT_VariantGreat, TRUE);
-//      break;
+    case VariantGreat: // Note to self: must still make this button (and GiveAway too).
+      CheckDlgButton(hDlg, OPT_VariantGreat, TRUE);
+      break;
     default: ;
     }
 
     default: ;
     }