X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=9cb0cd966d01b30a39fdf2fa62378fdf9aa4b36e;hb=829031aa78f85ced458ab253cdae852e01c751f2;hp=95422768ab06d98806648d4ad7ceab325167259a;hpb=3228ac43c6f5e72a8ddeb1f7040490f223822afc;p=xboard.git diff --git a/common.h b/common.h index 9542276..9cb0cd9 100644 --- a/common.h +++ b/common.h @@ -142,7 +142,7 @@ typedef char *String; #define VIRGIN (BOARD_RANKS-2) /* [HGM] pieces not moved */ #define EP_STATUS CASTLING][(BOARD_FILES-2) /* [HGM] in upper rank */ #define HOLDINGS_SET CASTLING][(BOARD_FILES-1) /* [HGM] in upper-right corner*/ -#define ONE ('1'-(BOARD_HEIGHT>9)) /* [HGM] foremost board rank */ +#define ONE ('1'-(BOARD_HEIGHT==10)) /* [HGM] foremost board rank */ #define AAA ('a'-BOARD_LEFT) /* [HGM] leftmost board file */ #define VIRGIN_W 1 /* [HGM] flags in Board[VIRGIN][X] */ #define VIRGIN_B 2 @@ -248,12 +248,20 @@ typedef enum { WhitePawn, WhiteKnight, WhiteBishop, WhiteRook, WhiteQueen, WhiteFerz, WhiteAlfil, WhiteAngel, WhiteMarshall, WhiteWazir, WhiteMan, WhiteCannon, WhiteNightrider, WhiteCardinal, WhiteDragon, WhiteGrasshopper, - WhiteSilver, WhiteFalcon, WhiteLance, WhiteCobra, WhiteUnicorn, WhiteKing, + WhiteSilver, WhiteFalcon, WhiteLance, WhiteCobra, WhiteUnicorn, WhiteLion, + WhiteTokin, WhiteDagger, WhitePCardinal, WhitePDragon, WhiteCat, + WhitePSword, WhiteMonarch, WhiteMother, WhiteNothing, WhitePRook, WhitePDagger, + WhiteDolphin, WhiteStag, WhiteHorned, WhiteEagle, WhiteSword, + WhiteCrown, WhiteHCrown, WhiteHorse, WhiteDrunk, WhitePBishop, WhiteKing, BlackPawn, BlackKnight, BlackBishop, BlackRook, BlackQueen, BlackFerz, BlackAlfil, BlackAngel, BlackMarshall, BlackWazir, BlackMan, BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper, - BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackKing, - EmptySquare, + BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackLion, + BlackTokin, BlackDagger, BlackPCardinal, BlackPDragon, BlackCat, + BlackPSword, BlackMonarch, BlackMother, BlackNothing, BlackPRook, BlackPDagger, + BlackDolphin, BlackStag, BlackHorned, BlackEagle, BlackSword, + BlackCrown, BlackHCrown, BlackHorse, BlackDrunk, BlackPBishop, BlackKing, + EmptySquare, DarkSquare, NoRights, // [HGM] gamestate: for castling rights hidden in board[CASTLING] ClearBoard, WhitePlay, BlackPlay, PromotePiece, DemotePiece /*for use on EditPosition menus*/ } ChessSquare; @@ -264,6 +272,9 @@ typedef enum { #define PROMOTED (int)WhiteDragon - (int)WhiteRook + (int) #define DEMOTED (int)WhiteRook - (int)WhiteDragon + (int) #define SHOGI (int)EmptySquare + (int) +#define CHUPROMOTED ((int)WhitePDragon - (int)WhiteDragon)*(gameInfo.variant == VariantChu) + PROMOTED +#define IS_SHOGI(V) ((V) == VariantShogi || (V) == VariantChu) +#define IS_LION(V) ((V) == WhiteLion || (V) == BlackLion) typedef ChessSquare Board[BOARD_RANKS][BOARD_FILES]; @@ -279,7 +290,7 @@ typedef enum { WhitePromotion, WhiteNonPromotion, BlackPromotion, BlackNonPromotion, WhiteCapturesEnPassant, BlackCapturesEnPassant, - WhiteDrop, BlackDrop, + WhiteDrop, BlackDrop, FirstLeg, NormalMove, AmbiguousMove, IllegalMove, ImpossibleMove, WhiteWins, BlackWins, GameIsDrawn, GameUnfinished, GNUChessGame, XBoardGame, MoveNumberOne, Open, Close, Nothing, @@ -293,7 +304,7 @@ typedef enum { } ColorClass; typedef enum { - SoundMove, SoundBell, SoundAlarm, SoundIcsWin, SoundIcsLoss, + SoundMove, SoundBell, SoundRoar, SoundAlarm, SoundIcsWin, SoundIcsLoss, SoundIcsDraw, SoundIcsUnfinished, NSoundClasses } SoundClass; @@ -323,6 +334,7 @@ typedef enum { Variant35, /* Temporary name for possible future ICC wild 35 */ Variant36, /* Temporary name for possible future ICC wild 36 */ VariantShogi, /* [HGM] added variants */ + VariantChu, VariantXiangqi, VariantCourier, VariantGothic, @@ -342,6 +354,8 @@ typedef enum { VariantSChess, VariantGrand, VariantSpartan, + VariantLion, + VariantChuChess, VariantUnknown /* Catchall for other unknown variants */ } VariantClass; @@ -370,6 +384,7 @@ typedef enum { "wild35", \ "wild36", \ "shogi", \ + "chu", \ "xiangqi", \ "courier", \ "gothic", \ @@ -389,6 +404,8 @@ typedef enum { "seirawan",\ "grand",\ "spartan",\ + "lion",\ + "chuchess",\ "unknown" \ } @@ -524,6 +541,7 @@ typedef struct { char *soundSeek; char *soundMove; // [HGM] IMPORTANT: order must be as in SoundClass char *soundBell; + char *soundRoar; char *soundIcsAlarm; char *soundIcsWin; char *soundIcsLoss; @@ -662,6 +680,7 @@ typedef struct { Boolean suppressLoadMoves; int serverPause; int timeOdds[ENGINES]; + int drawDepth[ENGINES]; int timeOddsMode; int accumulateTC[ENGINES]; int NPS[ENGINES];