anchor.diff:  
     Result := ChildNode;
   end; *)
  -
  -function TTileMap.CalculateHeuristics(const Start, Finish: TPoint): NativeInt;
  -var
  -  dX, dY, X, Y: NativeInt;
  -  Mask: NativeInt;
  -begin
  -  dY := Start.Y - Finish.Y;
  -  dX := Start.X - Finish.X;
  -
  -  // Y := Abs(dY)
  -  Mask := -(dY shr HIGH_NATIVE_BIT);
  -  Y := (dY xor Mask) - Mask;
  -
  -  // X := Abs(dY)
  -  Mask := -(dX shr HIGH_NATIVE_BIT);
  -  X := (dX xor Mask) - Mask;
  -
  -  if (Self.FKind < mkHexagonal) then
  -  begin
  -    if (X <= Y) then
  -    begin
  -      Result := X * FInfo.HeuristicsDiagonal + (Y - X) * FInfo.HeuristicsLine;
  -    end else
  -    begin
  -      Result := Y * FInfo.HeuristicsDiagonal + (X - Y) * FInfo.HeuristicsLine;
  -    end;
  -  end else
  -  begin
  -    X := X - ((Mask xor Finish.Y) and Y and 1) - (Y shr 1);
  -    Result := Y + (X and ((X shr HIGH_NATIVE_BIT) - 1));
  -    Result := Result * FInfo.HeuristicsLine;
  -  end;
  -end;
   
   (*procedure TTileMap.ClearMapCells(Node: PCPFNode; Count: NativeUInt);
   var
  
positive.code:       Exit;
      end;
  
      Inc(S);
    end;
  
    // no start points case
    if (Params.StartsCount = 0) then
    begin
      ResultPath := @Result;
      ResultPath.Index := 0;
  
negative.code:   end;
  end;
  
  function TTileMap.CalculateHeuristics(const Start, Finish: TPoint): NativeInt;
  var
    dX, dY, X, Y: NativeInt;
    Mask: NativeInt;
  begin
    dY := Start.Y - Finish.Y;
    dX := Start.X - Finish.X;
  
    // Y := Abs(dY)
    Mask := -(dY shr HIGH_NATIVE_BIT);
    Y := (dY xor Mask) - Mask;
  
    // X := Abs(dY)
    Mask := -(dX shr HIGH_NATIVE_BIT);
    X := (dX xor Mask) - Mask;
  
    if (Self.FKind < mkHexagonal) then
    begin
      if (X <= Y) then
      begin
        Result := X * FInfo.HeuristicsDiagonal + (Y - X) * FInfo.HeuristicsLine;
      end else
      begin
        Result := Y * FInfo.HeuristicsDiagonal + (X - Y) * FInfo.HeuristicsLine;
      end;
    end else
    begin
      X := X - ((Mask xor Finish.Y) and Y and 1) - (Y shr 1);
      Result := Y + (X and ((X shr HIGH_NATIVE_BIT) - 1));
      Result := Result * FInfo.HeuristicsLine;
    end;
  end;
  
  function TTileMap.AllocateHeuristedNode(const X, Y: NativeInt): PCPFNode;
  begin
    Result := nil;
    // todo
  end;
  (*var
    Coordinates: NativeUInt;
    Cell: PCPFCell;
    ChildNode: PCPFNode;
  