X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=788318460e688751421a090f6856e3ea87c50907;hb=ea750683ac62717dd7346de17b5ae072622ff92a;hp=be6d4e82c21923f53e496734d470e04246417855;hpb=7e4f4f5718bf4efee8be4abfc981d18cfd6f8438;p=xboard.git diff --git a/common.h b/common.h index be6d4e8..7883184 100644 --- a/common.h +++ b/common.h @@ -86,6 +86,8 @@ int pclose(FILE *); #define FALSE 0 #endif +#define UNKNOWN -1 /* [HGM] nps */ + #if !HAVE_RANDOM # if HAVE_RAND48 # define srandom srand48 @@ -98,7 +100,11 @@ int pclose(FILE *); /* End compatibility grunge */ -#define PROTOVER 2 /* engine protocol version */ +#define PROTOVER 2 /* engine protocol version */ + +// [HGM] license: Messages that engines must print to satisfy their license requirements for patented variants +#define GOTHIC "Gothic Chess (see www.GothicChess.com) is licensed under U.S. Patent #6,481,716 by Ed Trice" +#define NOFALCON "Falcon Chess (see www.chessvariants.com) is licensed under U.S. Patent #5,690,334 by George W. Duke" /* [HGM] Some notes about board sizes: In games that allow piece drops, the holdings are considered part of the @@ -172,7 +178,7 @@ int pclose(FILE *); #define ZIPPY_GAME_START "" #define ZIPPY_ADJOURN FALSE #define ZIPPY_ABORT FALSE -#define ZIPPY_VARIANTS "normal" +#define ZIPPY_VARIANTS "normal,fischerandom,crazyhouse,losers,suicide,3checks,twokings,bughouse,shatranj" #define ZIPPY_MAX_GAMES 0 #define ZIPPY_REPLAY_TIMEOUT 120 @@ -185,29 +191,26 @@ typedef enum { } GameMode; typedef enum { - WhitePawn, WhiteKnight, WhiteBishop, WhiteRook, WhiteQueen, -#ifdef FAIRY /* [HGM] the order here is crucial for Crazyhouse & Shogi: */ /* only the first N pieces can go into the holdings, and */ - /* promotions in those variants shift P-W to E-M */ - WhiteFerz, WhiteWazir, WhiteAlfil, WhiteNightrider, WhiteCardinal, - WhiteMarshall, WhiteGrasshopper, WhiteCannon, WhiteMan, WhiteUnicorn, -#endif - WhiteKing, BlackPawn, BlackKnight, BlackBishop, BlackRook, BlackQueen, -#ifdef FAIRY - BlackFerz, BlackWazir, BlackAlfil, BlackNightrider, BlackCardinal, - BlackMarshall, BlackGrasshopper, BlackCannon, BlackMan, BlackUnicorn, -#endif - BlackKing, + /* promotions in those variants shift P-W to U-S */ + WhitePawn, WhiteKnight, WhiteBishop, WhiteRook, WhiteQueen, + WhiteFerz, WhiteAlfil, WhiteAngel, WhiteMarshall, WhiteWazir, WhiteMan, + WhiteCannon, WhiteNightrider, WhiteCardinal, WhiteDragon, WhiteGrasshopper, + WhiteSilver, WhiteFalcon, WhiteLance, WhiteCobra, WhiteUnicorn, WhiteKing, + BlackPawn, BlackKnight, BlackBishop, BlackRook, BlackQueen, + BlackFerz, BlackAlfil, BlackAngel, BlackMarshall, BlackWazir, BlackMan, + BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper, + BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackKing, EmptySquare, - ClearBoard, WhitePlay, BlackPlay /*for use on EditPosition menus*/ + ClearBoard, WhitePlay, BlackPlay, PromotePiece, DemotePiece /*for use on EditPosition menus*/ } ChessSquare; /* [HGM] some macros that can be used as prefixes to convert piece types */ #define WHITE_TO_BLACK (int)BlackPawn - (int)WhitePawn + (int) #define BLACK_TO_WHITE (int)WhitePawn - (int)BlackPawn + (int) -#define PROMOTED (int)WhiteAlfil - (int)WhitePawn + (int) -#define DEMOTED (int)WhitePawn - (int)WhiteAlfil + (int) +#define PROMOTED (int)WhiteDragon - (int)WhiteRook + (int) +#define DEMOTED (int)WhiteRook - (int)WhiteDragon + (int) #define SHOGI (int)EmptySquare + (int) @@ -222,14 +225,10 @@ typedef enum { BlackHSideCastleFR, BlackASideCastleFR, WhitePromotionKnight, WhitePromotionBishop, WhitePromotionRook, WhitePromotionQueen, WhitePromotionKing, -#ifdef FAIRY - WhitePromotionChancellor, WhitePromotionArchbishop, -#endif + WhitePromotionChancellor, WhitePromotionArchbishop, WhitePromotionCentaur, BlackPromotionKnight, BlackPromotionBishop, BlackPromotionRook, BlackPromotionQueen, BlackPromotionKing, -#ifdef FAIRY - BlackPromotionChancellor, BlackPromotionArchbishop, -#endif + BlackPromotionChancellor, BlackPromotionArchbishop, BlackPromotionCentaur, WhiteCapturesEnPassant, BlackCapturesEnPassant, WhiteDrop, BlackDrop, NormalMove, AmbiguousMove, IllegalMove, ImpossibleMove, @@ -281,7 +280,13 @@ typedef enum { VariantCapablanca, VariantKnightmate, VariantFairy, - VariantShowgi, + VariantCylinder, + VariantFalcon, + VariantCapaRandom, + VariantBerolina, + VariantJanus, + VariantSuper, + VariantGreat, VariantUnknown /* Catchall for other unknown variants */ } VariantClass; @@ -316,7 +321,13 @@ typedef enum { "capablanca", \ "knightmate", \ "fairy", \ - "showgi", \ + "cylinder", \ + "falcon",\ + "caparandom",\ + "berolina",\ + "janus",\ + "super",\ + "great",\ "unknown" \ } @@ -470,6 +481,7 @@ typedef struct { int firstProtocolVersion; int secondProtocolVersion; Boolean showButtonBar; + Boolean icsEngineAnalyze; /* [AS] New properties (down to the "ZIPPY" part) */ Boolean firstScoreIsAbsolute; /* If true, engine score is always from white side */ @@ -521,6 +533,9 @@ typedef struct { int NrRanks; int holdingsSize; int matchPause; + char * pieceToCharTable; + Boolean allWhite; + Boolean upsideDown; Boolean alphaRank; Boolean testClaims; Boolean checkMates; @@ -528,7 +543,6 @@ typedef struct { Boolean trivialDraws; int ruleMoves; int drawRepeats; - char * pieceToCharTable; #if ZIPPY char *zippyLines; @@ -548,6 +562,29 @@ typedef struct { int zippyMaxGames; int zippyReplayTimeout; /*seconds*/ #endif + + char *serverMovesName; + Boolean suppressLoadMoves; + int serverPause; + int firstTimeOdds; + int secondTimeOdds; + int timeOddsMode; + int firstAccumulateTC; + int secondAccumulateTC; + int firstNPS; + int secondNPS; + Boolean autoKibitz; + int engineComments; + char *userName; + int rewindIndex; /* [HGM] autoinc */ + int sameColorGames; /* [HGM] alternate */ + int smpCores; /* [HGM] SMP */ + char *egtFormats; + int niceEngines; /* [HGM] nice */ + char *firstLogo; /* [HGM] logo */ + char *secondLogo; + Boolean autoLogo; + Boolean noGUI; /* [HGM] fast: suppress all display updates */ } AppData, *AppDataPtr; /* [AS] PGN tags (for showing in the game list) */ @@ -599,6 +636,3 @@ typedef struct { #endif -/* extern int holdingsWidth; -extern int holdingsHeight; -/*extern int holdings[(int) EmptySquare];*/