X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=81f25536aef2c4c9080bbc09034b2df80e51fc84;hb=73a174a6d6ef63290bf90f2cb92708b0929dd04b;hp=92fb92d0c5395eebd25a50860b4cb12707dae5e9;hpb=83177353155da1e778d08f91caefd3fc0dc29944;p=xboard.git diff --git a/common.h b/common.h index 92fb92d..81f2553 100644 --- a/common.h +++ b/common.h @@ -294,23 +294,27 @@ typedef enum { WhiteFerz, WhiteAlfil, WhiteAngel, WhiteMarshall, WhiteWazir, WhiteMan, WhiteCannon, WhiteNightrider, WhiteCardinal, WhiteDragon, WhiteGrasshopper, WhiteSilver, WhiteFalcon, WhiteLance, WhiteCobra, WhiteUnicorn, WhiteLion, - WhiteWolf, WhiteCamel, WhiteZebra, WhiteWizard, WhiteAmazon, + WhiteButterfly, WhiteZebra, WhiteCamel, WhiteTower, WhiteWolf, + WhiteFlying, WhiteDuck, WhiteAxe, WhiteHat, WhiteGnu, WhiteCub, WhiteTokin, WhiteClaw, WhitePCardinal, WhitePDragon, WhiteCat, WhitePSword, WhiteMonarch, WhiteMother, WhiteNothing, WhitePRook, WhitePDagger, WhiteDolphin, WhiteStag, WhiteHorned, WhiteEagle, WhiteSword, WhiteCrown, WhiteHCrown, WhiteHorse, WhiteDrunk, WhitePBishop, - WhiteFlying, WhiteViking, WhiteIron, WhiteCopper, WhiteTower, + WhiteWheel, WhitePKnight, WhiteWizard, WhiteCopper, WhiteIron, WhiteViking, + WhiteFlag, WhiteAmazon, WhiteWheer, WhiteShield, WhiteShierd, WhiteKing, BlackPawn, BlackKnight, BlackBishop, BlackRook, BlackQueen, BlackFerz, BlackAlfil, BlackAngel, BlackMarshall, BlackWazir, BlackMan, BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper, BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackLion, - BlackWolf, BlackCamel, BlackZebra, BlackWizard, BlackAmazon, + BlackButterfly, BlackZebra, BlackCamel, BlackTower, BlackWolf, + BlackFlying, BlackDuck, BlackAxe, BlackHat, BlackGnu, BlackCub, BlackTokin, BlackClaw, BlackPCardinal, BlackPDragon, BlackCat, BlackPSword, BlackMonarch, BlackMother, BlackNothing, BlackPRook, BlackPDagger, BlackDolphin, BlackStag, BlackHorned, BlackEagle, BlackSword, BlackCrown, BlackHCrown, BlackHorse, BlackDrunk, BlackPBishop, - BlackFlying, BlackViking, BlackIron, BlackCopper, BlackTower, + BlackWheel, BlackPKnight, BlackWizard, BlackCopper, BlackIron, BlackViking, + BlackFlag, BlackAmazon, BlackWheer, BlackShield, BlackShierd, BlackKing, EmptySquare, DarkSquare, NoRights, // [HGM] gamestate: for castling rights hidden in board[CASTLING] @@ -320,11 +324,12 @@ typedef enum { /* [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)WhiteDragon - (int)WhiteRook + (int) -#define DEMOTED (int)WhiteRook - (int)WhiteDragon + (int) +#define PROMO (int)WhiteDragon - (int)WhiteRook + (int) +#define PROMOTED(X) (promoPartner[X]) +#define DEMOTED(X) (promoPartner[X]) #define SHOGI (int)EmptySquare + (int) -#define CHUPROMOTED ((int)WhitePDragon - (int)WhiteDragon)*(gameInfo.variant == VariantChu) + PROMOTED -#define CHUDEMOTED ((int)WhiteDragon - (int)WhitePDragon)*(gameInfo.variant == VariantChu) + DEMOTED +#define CHUPROMOTED(X) (promoPartner[X]) +#define CHUDEMOTED(X) (promoPartner[X]) #define IS_SHOGI(V) ((V) == VariantShogi || (V) == VariantChu) #define IS_LION(V) ((V) == WhiteLion || (V) == BlackLion)