Added new variant Twilight Chess
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 13 Jun 2009 16:12:15 +0000 (09:12 -0700)
committerArun Persaud <arun@nubati.net>
Sat, 13 Jun 2009 16:12:15 +0000 (09:12 -0700)
common.h
winboard/resource.h
winboard/woptions.c

index 06e1c87..1780f3b 100644 (file)
--- 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" \
 }
 
index 4da6928..3ab644a 100644 (file)
 #define OPT_VariantGiveaway             1525\r
 #define OPT_Variant3Check               1526\r
 #define OPT_VariantGreat                1527\r
+#define OPT_VariantTwilight             1528\r
 #define IDC_Files                       1550\r
 #define IDC_Ranks                       1551\r
 #define IDC_Holdings                    1552\r
index cd0b029..1e79b6d 100644 (file)
@@ -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: ;
     }