]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Add basic log facility
[stockfish] / src / bitboard.h
index 404178dcc4b73f2c7e564b173c637c3d29ba29b9..59de12886e513f55b6ba2ffae18cfe4ce96986bd 100644 (file)
@@ -60,12 +60,12 @@ extern Bitboard SquaresInFrontMask[2][64];
 extern Bitboard PassedPawnMask[2][64];
 extern Bitboard AttackSpanMask[2][64];
 
-extern const uint64_t RMult[64];
+extern uint64_t RMult[64];
 extern int RShift[64];
 extern Bitboard RMask[64];
 extern Bitboard* RAttacks[64];
 
-extern const uint64_t BMult[64];
+extern uint64_t BMult[64];
 extern int BShift[64];
 extern Bitboard BMask[64];
 extern Bitboard* BAttacks[64];
@@ -113,7 +113,7 @@ inline Bitboard rank_bb(Rank r) {
 }
 
 inline Bitboard rank_bb(Square s) {
-  return RankBB[square_rank(s)];
+  return RankBB[rank_of(s)];
 }
 
 inline Bitboard file_bb(File f) {
@@ -121,7 +121,7 @@ inline Bitboard file_bb(File f) {
 }
 
 inline Bitboard file_bb(Square s) {
-  return FileBB[square_file(s)];
+  return FileBB[file_of(s)];
 }
 
 
@@ -133,7 +133,7 @@ inline Bitboard neighboring_files_bb(File f) {
 }
 
 inline Bitboard neighboring_files_bb(Square s) {
-  return NeighboringFilesBB[square_file(s)];
+  return NeighboringFilesBB[file_of(s)];
 }
 
 
@@ -145,7 +145,7 @@ inline Bitboard this_and_neighboring_files_bb(File f) {
 }
 
 inline Bitboard this_and_neighboring_files_bb(Square s) {
-  return ThisAndNeighboringFilesBB[square_file(s)];
+  return ThisAndNeighboringFilesBB[file_of(s)];
 }
 
 
@@ -160,7 +160,7 @@ inline Bitboard in_front_bb(Color c, Rank r) {
 }
 
 inline Bitboard in_front_bb(Color c, Square s) {
-  return InFrontBB[c][square_rank(s)];
+  return InFrontBB[c][rank_of(s)];
 }
 
 
@@ -245,7 +245,7 @@ inline Bitboard attack_span_mask(Color c, Square s) {
 
 inline bool squares_aligned(Square s1, Square s2, Square s3) {
   return  (BetweenBB[s1][s2] | BetweenBB[s1][s3] | BetweenBB[s2][s3])
-        & ((1ULL << s1) | (1ULL << s2) | (1ULL << s3));
+        & (    SetMaskBB[s1] |     SetMaskBB[s2] |     SetMaskBB[s3]);
 }