piece_t change, pack piece_details, conversion piece: mask<=>number

This commit is contained in:
2021-11-10 15:54:13 +01:00
parent bc07a949b0
commit 7c98f0d4c5
9 changed files with 92 additions and 50 deletions

View File

@@ -51,13 +51,13 @@ extern struct piece_details {
int64_t value;
} piece_details[];
#define P_NAME(p) piece_details[PIECE(p)].name
#define P_LETTER(p) piece_details[PIECE(p)].abbrev_w
#define P_SYM(p) piece_details[PIECE(p)].symbol_b
#define P_CSHORT(p) (COLOR(p) == WHITE? piece_details[PIECE(p)].abbrev_w: \
piece_details[PIECE(p)].abbrev_b)
#define P_CSYM(p) (COLOR(p) == WHITE? piece_details[PIECE(p)].symbol_w: \
piece_details[PIECE(p)].symbol_b)
#define P_NAME(p) piece_details[E_PIECE(p)].name
#define P_LETTER(p) piece_details[E_PIECE(p)].abbrev_w
#define P_SYM(p) piece_details[E_PIECE(p)].symbol_b
#define P_CSHORT(p) (IS_WHITE(p)? piece_details[E_PIECE(p)].abbrev_w: \
piece_details[E_PIECE(p)].abbrev_b)
#define P_CSYM(p) (IS_WHITE(p)? piece_details[E_PIECE(p)].symbol_w: \
piece_details[E_PIECE(p)].symbol_b)
/* use short name or symbol - no effect
*/
#define P_USE_UTF 1