Add -variant seirawan to menu
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 13 Nov 2010 17:42:27 +0000 (18:42 +0100)
committerArun Persaud <arun@nubati.net>
Sun, 14 Nov 2010 05:09:00 +0000 (21:09 -0800)
backend.c
common.h
winboard/resource.h
winboard/winboard.c
winboard/winboard.rc
winboard/woptions.c
xoptions.c

index 0026207..ba658ea 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -957,6 +957,7 @@ InitBackEnd1()
       case VariantJanus:      /* should work */
       case VariantSuper:      /* experimental */
       case VariantGreat:      /* experimental, requires legality testing to be off */
+      case VariantSChess:     /* S-Chess, should work */
        break;
       }
     }
index 63cee7d..322bd66 100644 (file)
--- a/common.h
+++ b/common.h
@@ -319,6 +319,7 @@ typedef enum {
     VariantGreat,
     VariantTwilight,
     VariantMakruk,
+    VariantSChess,
     VariantUnknown       /* Catchall for other unknown variants */
 } VariantClass;
 
@@ -362,6 +363,7 @@ typedef enum {
   "great",\
   "twilight",\
   "makruk",\
+  "seirawan",\
   "unknown" \
 }
 
index 9dc8528..15835f5 100644 (file)
 #define OPT_VariantGreat                1527\r
 #define OPT_VariantTwilight             1528\r
 #define OPT_VariantMakruk               1529\r
+#define OPT_VariantSChess               1530\r
 #define IDC_Files                       1550\r
 #define IDC_Ranks                       1551\r
 #define IDC_Holdings                    1552\r
index 620cad5..e98e516 100644 (file)
@@ -306,7 +306,7 @@ int dialogItems[][40] = {
   OPT_VariantBughouse, OPT_VariantTwilight, OPT_VariantShogi, OPT_VariantSuper,\r
   OPT_VariantKnightmate, OPT_VariantBerolina, OPT_VariantCylinder, OPT_VariantFairy,\r
   OPT_VariantMakruk, OPT_VariantGothic, OPT_VariantCapablanca, OPT_VariantJanus,\r
-  OPT_VariantCRC, OPT_VariantFalcon, OPT_VariantCourier, OPT_VariantGreat,\r
+  OPT_VariantCRC, OPT_VariantFalcon, OPT_VariantCourier, OPT_VariantGreat, OPT_VariantSChess,\r
   OPT_VariantShatranj, OPT_VariantXiangqi, GPB_Variant, GPB_Board, IDC_Height,\r
   IDC_Width, IDC_Hand, IDC_Pieces, IDC_Def }, \r
 { DLG_Fonts, IDOK, IDCANCEL, OPT_ChooseClockFont, OPT_ChooseMessageFont,\r
index bb8cd3f..25658ba 100644 (file)
@@ -712,7 +712,9 @@ BEGIN
                     50,10\r
     CONTROL         "&Shatranj",OPT_VariantShatranj,"Button",BS_AUTORADIOBUTTON,134,\r
                     84,50,10\r
-    CONTROL         "&xiangqi",OPT_VariantXiangqi,"Button",BS_AUTORADIOBUTTON,134,94,50,\r
+    CONTROL         "Seira&wan",OPT_VariantSChess,"Button",BS_AUTORADIOBUTTON,134,94,50,\r
+                    10\r
+    CONTROL         "&xiangqi",OPT_VariantXiangqi,"Button",BS_AUTORADIOBUTTON,134,104,50,\r
                     10\r
     GROUPBOX        "Variant",GPB_Variant,4,4,185,115\r
     LTEXT           "Board size:",GPB_Board,10,135,40,8\r
index 4d071ce..2c5b24f 100644 (file)
@@ -786,7 +786,8 @@ VariantWhichRadio(HWND hDlg)
          (IsDlgButtonChecked(hDlg, OPT_VariantGiveaway) ? VariantGiveaway :\r
          (IsDlgButtonChecked(hDlg, OPT_VariantTwilight) ? VariantTwilight :\r
          (IsDlgButtonChecked(hDlg, OPT_VariantMakruk) ? VariantMakruk :\r
-          VariantNormal )))))))))))))))))))))))))))));\r
+         (IsDlgButtonChecked(hDlg, OPT_VariantSChess) ? VariantSChess :\r
+          VariantNormal ))))))))))))))))))))))))))))));\r
 }\r
 \r
 LRESULT CALLBACK\r
@@ -889,6 +890,9 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     case VariantMakruk:\r
       CheckDlgButton(hDlg, OPT_VariantMakruk, TRUE);\r
       break;\r
+    case VariantSChess:\r
+      CheckDlgButton(hDlg, OPT_VariantSChess, TRUE);\r
+      break;\r
     default: ;\r
     }\r
 \r
index b30719d..af309a1 100644 (file)
@@ -966,6 +966,7 @@ struct NewVarButton buttonDesc[] = {
     {N_("give-away"),         "#FFFFBF", 0, VariantGiveaway},
     {N_("losers"),            "#FFFFBF", 0, VariantLosers},
     {N_("fairy"),             "#BFBFBF", 0, VariantFairy},
+    {N_("Seirawan"),          "#FFBFBF", 0, VariantSChess},
     {N_("Superchess"),        "#FFBFBF", 0, VariantSuper},
     {N_("crazyhouse"),        "#FFBFBF", 0, VariantCrazyhouse},
     {N_("bughouse"),          "#FFBFBF", 0, VariantBughouse},