*p++ = '+';
piece = (ChessSquare)(DEMOTED piece);
}
- *p++ = PieceToChar(piece);
+ *p++ = (piece == DarkSquare ? '*' : PieceToChar(piece));
if(p[-1] == '~') {
/* [HGM] flag promoted pieces as '<promoted>~' (Crazyhouse) */
p[-1] = PieceToChar((ChessSquare)(DEMOTED piece));
while (emptycount--)
board[i][(j++)+gameInfo.holdingsWidth] = EmptySquare;
#endif
+ } else if (*p == '*') {
+ board[i][(j++)+gameInfo.holdingsWidth] = DarkSquare; p++;
} else if (isdigit(*p)) {
emptycount = *p++ - '0';
while(isdigit(*p)) emptycount = 10*emptycount + *p++ - '0'; /* [HGM] allow > 9 */
snprintf(tString, 3, "%d", piece);
align = 4; // holdings count in upper-left corner
}
+ if(piece == DarkSquare) square_color = 2;
if(square_color == 2 || appData.blindfold) piece = EmptySquare;
if (do_flash && piece != EmptySquare && appData.flashCount > 0) {
BlackFerz, BlackAlfil, BlackAngel, BlackMarshall, BlackWazir, BlackMan,
BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper,
BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackKing,
- EmptySquare,
+ EmptySquare, DarkSquare,
NoRights, // [HGM] gamestate: for castling rights hidden in board[CASTLING]
ClearBoard, WhitePlay, BlackPlay, PromotePiece, DemotePiece /*for use on EditPosition menus*/
} ChessSquare;
(int) piece2 < (int) EmptySquare);
}
#else
-#define SameColor(piece1, piece2) (piece1 < EmptySquare && piece2 < EmptySquare && (piece1 < BlackPawn) == (piece2 < BlackPawn))
+#define SameColor(piece1, piece2) (piece1 < EmptySquare && piece2 < EmptySquare && (piece1 < BlackPawn) == (piece2 < BlackPawn) || piece1 == DarkSquare || piece2 == DarkSquare)
#endif
char pieceToChar[] = {
}\r
\r
return result;\r
+\r
}\r
\r
BOOL IsDrawArrowEnabled()\r
DisplayHoldingsCount(hdc, x, y, flipView, (int) board[row][column]);\r
else if( column == BOARD_RGHT) /* right align */\r
DisplayHoldingsCount(hdc, x, y, !flipView, (int) board[row][column]);\r
+ else if( piece == DarkSquare) DisplayHoldingsCount(hdc, x, y, 0, 0);\r
else\r
if (appData.monoMode) {\r
if (piece == EmptySquare) {\r