Allow arbitrary nesting of sub-variations in PGN input
[xboard.git] / common.h
index 2b6d695..63cee7d 100644 (file)
--- a/common.h
+++ b/common.h
@@ -250,23 +250,20 @@ typedef enum {
 typedef ChessSquare Board[BOARD_RANKS][BOARD_FILES];
 
 typedef enum {
-    WhiteKingSideCastle = 1, WhiteQueenSideCastle,
+    EndOfFile = 0,
+    WhiteKingSideCastle, WhiteQueenSideCastle,
     WhiteKingSideCastleWild, WhiteQueenSideCastleWild,
     WhiteHSideCastleFR, WhiteASideCastleFR, 
     BlackKingSideCastle, BlackQueenSideCastle,
     BlackKingSideCastleWild, BlackQueenSideCastleWild,
     BlackHSideCastleFR, BlackASideCastleFR, 
-    WhitePromotionKnight, WhitePromotionBishop,
-    WhitePromotionRook, WhitePromotionQueen, WhitePromotionKing,
-    WhitePromotionChancellor, WhitePromotionArchbishop, WhitePromotionCentaur,
-    BlackPromotionKnight, BlackPromotionBishop,
-    BlackPromotionRook, BlackPromotionQueen, BlackPromotionKing,
-    BlackPromotionChancellor, BlackPromotionArchbishop, BlackPromotionCentaur,
+    WhitePromotion, WhiteNonPromotion,
+    BlackPromotion, BlackNonPromotion,
     WhiteCapturesEnPassant, BlackCapturesEnPassant,
     WhiteDrop, BlackDrop, 
     NormalMove, AmbiguousMove, IllegalMove, ImpossibleMove,
     WhiteWins, BlackWins, GameIsDrawn, GameUnfinished,
-    GNUChessGame, XBoardGame, MoveNumberOne, 
+    GNUChessGame, XBoardGame, MoveNumberOne, Open, Close, Nothing,
     Comment, PositionDiagram, ElapsedTime, PGNTag, NAG
   } ChessMove;
 
@@ -369,6 +366,7 @@ typedef enum {
 }
 
 typedef struct {
+    char *language;
 #if !defined(_amigados)
     char *whitePieceColor;
     char *blackPieceColor;
@@ -387,7 +385,7 @@ typedef struct {
     int premoveHighlightColor;
 #endif
     int movesPerSession;
-    int timeIncrement;
+    float timeIncrement;
     char *initString;
     char *secondInitString;
     char *firstComputerString;
@@ -497,6 +495,7 @@ typedef struct {
     char *soundIcsLoss;
     char *soundIcsDraw;
     char *soundIcsUnfinished;
+    Boolean disguise;        /* [HGM] Promoted Pawns look like pieces in bughouse */
     Boolean reuseFirst;
     Boolean reuseSecond;
     Boolean animateDragging; /* If True, animate mouse dragging of pieces */
@@ -524,6 +523,7 @@ typedef struct {
     int secondProtocolVersion;
     Boolean showButtonBar;
     Boolean icsEngineAnalyze; 
+    Boolean variations;         /* [HGM] enable variation-tree walking */
 
     /* [AS] New properties (down to the "ZIPPY" part) */
     Boolean firstScoreIsAbsolute;  /* If true, engine score is always from white side */
@@ -569,9 +569,12 @@ typedef struct {
     char * polyglotDir;
     Boolean usePolyglotBook;
     char * polyglotBook;
+    int bookDepth;
+    int bookStrength;
     int defaultHashSize;
     int defaultCacheSizeEGTB;
     char * defaultPathEGTB;
+    int defaultMatchGames;
 
     /* [HGM] Board size */
     int NrFiles;
@@ -580,6 +583,7 @@ typedef struct {
     int matchPause;
     char * pieceToCharTable;
     char * pieceNickNames;
+    char * colorNickNames;
     Boolean allWhite;
     Boolean upsideDown;
     Boolean alphaRank;
@@ -649,7 +653,9 @@ typedef struct {
     Boolean markers;    /* [HGM] markers   */
 } AppData, *AppDataPtr;
 
-/* [AS] PGN tags (for showing in the game list) */
+/*  PGN tags (for showing in the game list) */
+#define LPUSERGLT_SIZE      64
+
 #define GLT_EVENT           'e'
 #define GLT_SITE            's'
 #define GLT_DATE            'd'