inline static void
-Link(short side, short piece,
+Link(short side,
short from, short to, unsigned short local_flag, short s)
{
if (*TrP == TREE)
{
- ShowMessage("TREE overflow\n");
+ dsp->ShowMessage("TREE overflow\n");
}
else
{
}
-inline int
-NonPromotionPossible(short color, short f,
+static inline int
+NonPromotionPossible(short color,
short t, short p)
{
switch (p)
/* bonus for possible next moves */
inline static short
-field_bonus(short ply, short side, short piece,
+field_bonus(short side, short piece,
short f, short t, unsigned short *local_flag)
{
short s, u, ptyp;
if (score_if_impossible < 0)
{
/* The move is flagged as illegal. */
- Link(side, piece,
+ Link(side,
f, t, local_flag, score_if_impossible);
return;
s -= 16 / Captured[side][silver];
#if defined DROPBONUS
- s += field_bonus(ply, side, piece, f, t, &local_flag);
+ s += field_bonus(side, piece, f, t, &local_flag);
if (s == 10 && piece != pawn)
local_flag |= questionable;
else
{
#if defined FIELDBONUS
- s += field_bonus(ply, side, piece, f, t, &local_flag);
+ s += field_bonus(side, piece, f, t, &local_flag);
#endif
}
}
if (try_link || GenerateAllMoves)
{
- Link(side, piece, f, t, local_flag,
+ Link(side, f, t, local_flag,
s - ((SCORE_LIMIT + 1000) * 2));
}
LinkMove(ply, sq, u, local_flag | promote, xside, true);
if ((possible
- = NonPromotionPossible(color[sq], sq, u, piece)))
+ = NonPromotionPossible(color[sq], u, piece)))
{
LinkMove(ply, sq, u, local_flag, xside, possible);
}
if ((PP = PromotionPossible(color[sq], sq, u, piece)))
{
- Link(side, piece,
+ Link(side,
sq, u, capture | promote,
(*value)[stage][board[u]]
#if !defined SAVE_SVALUE
if (!PP || flag.tsume)
{
- Link(side, piece,
+ Link(side,
sq, u, capture,
(*value)[stage][board[u]]
#if !defined SAVE_SVALUE