diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-16 16:29:50 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-16 16:29:50 +0100 |
commit | cf5e53b696a075ba08ef6684502adb980667e068 (patch) | |
tree | 7cd5daaa66f57f6802206cf4d2555935b13e7c04 | |
parent | aa0eb6d507b381ea971682083890a5a252ed23bb (diff) |
WriteMoves: fixed compiler warnings
-rw-r--r-- | FICS/gamedb.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index a6a5f2c..f552aa2 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -668,6 +668,8 @@ WriteMoves(FILE *fp, move_t *m) else piece = piecetype(CharToPiece(m->moveString[0])); +#define ORIGINAL_CODE 0 +#if ORIGINAL_CODE MoveInfo = (MoveInfo <<= 3) | piece; MoveInfo = (MoveInfo <<= 3) | m->fromFile; MoveInfo = (MoveInfo <<= 3) | m->fromRank; @@ -676,6 +678,31 @@ WriteMoves(FILE *fp, move_t *m) MoveInfo = (MoveInfo <<= 3) | (m->pieceCaptured & 7); MoveInfo = (MoveInfo <<= 3) | (m->piecePromotionTo & 7); MoveInfo = (MoveInfo <<= 1) | (m->enPassant != 0); +#else + MoveInfo <<= 3; + MoveInfo |= piece; + + MoveInfo <<= 3; + MoveInfo |= m->fromFile; + + MoveInfo <<= 3; + MoveInfo |= m->fromRank; + + MoveInfo <<= 3; + MoveInfo |= m->toFile; + + MoveInfo <<= 3; + MoveInfo |= m->toRank; + + MoveInfo <<= 3; + MoveInfo |= (m->pieceCaptured & 7); + + MoveInfo <<= 3; + MoveInfo |= (m->piecePromotionTo & 7); + + MoveInfo <<= 1; + MoveInfo |= (m->enPassant != 0); +#endif /* Are we using from-file or from-rank in 'algString'? */ |