From: H.G.Muller Date: Fri, 13 Mar 2015 21:58:15 +0000 (+0100) Subject: Make Claws glyph available in non-Chu variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f24db00b2a6580f64ed6c0863888ec8fa3c2907a;p=xboard.git Make Claws glyph available in non-Chu variants The variant-dependent replacement glyphs for promotable pieces in Chu are now assigned to pieces that reuse the replaced glyphs to represent promoted pieces, rather than to unused promoted pieces. This means that in Chu they now must be replaced by swapping, which avoids occurrence of duplicats both in Chu and other variants. And thus frees piece types that now can be used for new glyphs. As a result the Nightrider remains available in Chu, and the Claw glyph in other variants. Other freed pieces are for now used for the promotion Golds of variant shogi. --- diff --git a/common.h b/common.h index 6239e13..fa06beb 100644 --- a/common.h +++ b/common.h @@ -293,7 +293,7 @@ typedef enum { WhiteFerz, WhiteAlfil, WhiteAngel, WhiteMarshall, WhiteWazir, WhiteMan, WhiteCannon, WhiteNightrider, WhiteCardinal, WhiteDragon, WhiteGrasshopper, WhiteSilver, WhiteFalcon, WhiteLance, WhiteCobra, WhiteUnicorn, WhiteLion, - WhiteTokin, WhiteDagger, WhitePCardinal, WhitePDragon, WhiteCat, + WhiteTokin, WhiteClaw, WhitePCardinal, WhitePDragon, WhiteCat, WhitePSword, WhiteMonarch, WhiteMother, WhiteNothing, WhitePRook, WhitePDagger, WhiteDolphin, WhiteStag, WhiteHorned, WhiteEagle, WhiteSword, WhiteCrown, WhiteHCrown, WhiteHorse, WhiteDrunk, WhitePBishop, WhiteKing, @@ -301,7 +301,7 @@ typedef enum { BlackFerz, BlackAlfil, BlackAngel, BlackMarshall, BlackWazir, BlackMan, BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper, BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackLion, - BlackTokin, BlackDagger, BlackPCardinal, BlackPDragon, BlackCat, + BlackTokin, BlackClaw, BlackPCardinal, BlackPDragon, BlackCat, BlackPSword, BlackMonarch, BlackMother, BlackNothing, BlackPRook, BlackPDagger, BlackDolphin, BlackStag, BlackHorned, BlackEagle, BlackSword, BlackCrown, BlackHCrown, BlackHorse, BlackDrunk, BlackPBishop, BlackKing, diff --git a/draw.c b/draw.c index 848fa61..3cb5727 100644 --- a/draw.c +++ b/draw.c @@ -162,10 +162,14 @@ SelectPieces(VariantClass v) pngPieceBitmaps[i][(int)WhiteNightrider] = pngPieceBitmaps2[i][(int)WhiteLion]; } if(v == VariantChu) { - pngPieceBitmaps[i][(int)WhiteNightrider] = pngPieceBitmaps2[i][(int)WhiteKing+1]; - pngPieceBitmaps[i][(int)WhiteUnicorn] = pngPieceBitmaps2[i][(int)WhiteCat]; - pngPieceBitmaps[i][(int)WhiteSilver] = pngPieceBitmaps2[i][(int)WhiteSword]; - pngPieceBitmaps[i][(int)WhiteFalcon] = pngPieceBitmaps2[i][(int)WhiteDagger]; + pngPieceBitmaps[i][(int)WhiteNightrider] = pngPieceBitmaps2[i][(int)WhiteClaw]; + pngPieceBitmaps[i][(int)WhiteClaw] = pngPieceBitmaps2[i][(int)WhiteNightrider]; + pngPieceBitmaps[i][(int)WhiteUnicorn] = pngPieceBitmaps2[i][(int)WhiteHorned]; + pngPieceBitmaps[i][(int)WhiteSilver] = pngPieceBitmaps2[i][(int)WhiteStag]; + pngPieceBitmaps[i][(int)WhiteFalcon] = pngPieceBitmaps2[i][(int)WhiteEagle]; + pngPieceBitmaps[i][(int)WhiteHorned] = pngPieceBitmaps2[i][(int)WhiteUnicorn]; + pngPieceBitmaps[i][(int)WhiteStag] = pngPieceBitmaps2[i][(int)WhiteSilver]; + pngPieceBitmaps[i][(int)WhiteEagle] = pngPieceBitmaps2[i][(int)WhiteFalcon]; } } } @@ -282,9 +286,9 @@ CreatePNGBoard (char *s, int kind) char *pngPieceNames[] = // must be in same order as internal piece encoding { "Pawn", "Knight", "Bishop", "Rook", "Queen", "Advisor", "Elephant", "Archbishop", "Marshall", "Gold", "Commoner", - "Canon", "Nightrider", "CrownedBishop", "CrownedRook", "Princess", "Chancellor", "Hawk", "Lance", "Cobra", "Unicorn", "Lion", - "GoldPawn", "HSword", "PromoHorse", "PromoDragon", "Leopard", "PromoSword", "Prince", "Phoenix", "Kylin", "PromoRook", "PromoHSword", - "Dolphin", "Chancellor", "Unicorn", "Hawk", "Sword", "Crown", "HCrown", "Knight", "Elephant", "PromoBishop", "King", + "Canon", "Nightrider", "CrownedBishop", "CrownedRook", "Crown", "Chancellor", "Hawk", "Lance", "Cobra", "Unicorn", "Lion", + "GoldPawn", "Claw", "PromoHorse", "PromoDragon", "GoldLance", "PromoSword", "Prince", "Phoenix", "Kylin", "PromoRook", "PromoHSword", + "Dolphin", "Sword", "Leopard", "HSword", "GoldSilver", "Princess", "HCrown", "Knight", "Elephant", "PromoBishop", "King", "Claw", "GoldKnight", "GoldLance", "GoldSilver", NULL };