X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=111895876459d0b9b67921ae305a57bc13b70748;hp=1e14f59b743bfee385ca02243d6b3ef6dc8333b0;hb=e6310b3469b07b6bbecf8d8f75367a655090f22b;hpb=1277a428237eec3299c6606951fac014bb3ef851 diff --git a/src/movegen.cpp b/src/movegen.cpp index 1e14f59b..11189587 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -34,7 +34,7 @@ namespace { // After castling, the rook and king final positions are the same in Chess960 // as they would be in standard chess. - Square kfrom = pos.king_square(us); + Square kfrom = pos.square(us); Square rfrom = pos.castling_rook_square(Cr); Square kto = relative_square(us, KingSide ? SQ_G1 : SQ_C1); Bitboard enemies = pos.pieces(~us); @@ -66,7 +66,7 @@ namespace { template - inline ExtMove* make_promotions(ExtMove* moveList, Square to, const CheckInfo* ci) { + ExtMove* make_promotions(ExtMove* moveList, Square to, const CheckInfo* ci) { if (Type == CAPTURES || Type == EVASIONS || Type == NON_EVASIONS) *moveList++ = make(to - Delta, to, QUEEN); @@ -219,20 +219,20 @@ namespace { } - template FORCE_INLINE + template ExtMove* generate_moves(const Position& pos, ExtMove* moveList, Color us, Bitboard target, const CheckInfo* ci) { assert(Pt != KING && Pt != PAWN); - const Square* pl = pos.list(us); + const Square* pl = pos.squares(us); for (Square from = *pl; from != SQ_NONE; from = *++pl) { if (Checks) { if ( (Pt == BISHOP || Pt == ROOK || Pt == QUEEN) - && !(PseudoAttacks[Pt][from] & target & ci->checkSq[Pt])) + && !(PseudoAttacks[Pt][from] & target & ci->checkSquares[Pt])) continue; if (ci->dcCandidates && (ci->dcCandidates & from)) @@ -242,7 +242,7 @@ namespace { Bitboard b = pos.attacks_from(from) & target; if (Checks) - b &= ci->checkSq[Pt]; + b &= ci->checkSquares[Pt]; while (b) *moveList++ = make_move(from, pop_lsb(&b)); @@ -252,7 +252,7 @@ namespace { } - template FORCE_INLINE + template ExtMove* generate_all(const Position& pos, ExtMove* moveList, Bitboard target, const CheckInfo* ci = nullptr) { @@ -266,7 +266,7 @@ namespace { if (Type != QUIET_CHECKS && Type != EVASIONS) { - Square ksq = pos.king_square(Us); + Square ksq = pos.square(Us); Bitboard b = pos.attacks_from(ksq) & target; while (b) *moveList++ = make_move(ksq, pop_lsb(&b)); @@ -364,7 +364,7 @@ ExtMove* generate(const Position& pos, ExtMove* moveList) { assert(pos.checkers()); Color us = pos.side_to_move(); - Square ksq = pos.king_square(us); + Square ksq = pos.square(us); Bitboard sliderAttacks = 0; Bitboard sliders = pos.checkers() & ~pos.pieces(KNIGHT, PAWN); @@ -400,7 +400,7 @@ template<> ExtMove* generate(const Position& pos, ExtMove* moveList) { Bitboard pinned = pos.pinned_pieces(pos.side_to_move()); - Square ksq = pos.king_square(pos.side_to_move()); + Square ksq = pos.square(pos.side_to_move()); ExtMove* cur = moveList; moveList = pos.checkers() ? generate(pos, moveList)