anchor.diff:      {$else}
         ParentNode := Pointer(Cell.NodePtr and NODEPTR_CLEAN_MASK);
       {$endif}
  -
  -    // child and flags (unlock if needed)
  -    ParentNodeInfo := ((NativeUInt(ParentNode.NodeInfo) and FLAGS_CLEAN_MASK) or
  -      ($00ff0000 + FLAG_KNOWN_PATH + FLAG_ATTAINABLE)) +
  +    {$ifdef CPUX86}
  +    Store.Cell := Cell;
  +    {$endif}
  +
  +    // remove from list
  +    Left := ParentNode.Prev;
  +    Right := ParentNode.Next;
  +    Left.Next := Right;
  +    Right.Prev := Left;
  +
  +    // parent node info
  +    ParentNodeInfo := ParentNode.NodeInfo;
  +    Store.ParentNodeInfo := ParentNodeInfo;
  +    Buffer := (ParentNodeInfo and Integer($ff00ff00)) +
  +      ($00ff0000 + FLAGS_KNOWN_ATTAINABLE) +
         (((NodeInfo + 4){invert parent} and 7) shl 4);
  -    ParentNode.NodeInfo := ParentNodeInfo;
  -
  -    // remove from list
  -    L := ParentNode.Prev;
  -    R := ParentNode.Next;
  -    L.Next := R;
  -    R.Prev := L;
  -    {$if Defined(CPUX86) and (not Defined(FPC))}
  -    ParentNode := Pointer(Cell.NodePtr and NODEPTR_CLEAN_MASK);
  -    {$ifend}
  -
  -    // store heuristics
  +    ParentNode.NodeInfo := Buffer;
  +
  +    // tiles
  +    ParentNodeInfo := ParentNodeInfo shr 24;
  +    Buffer := (NodeInfo and 1) shl 8;
  +    NodeInfo := NodeInfo shr 24;
  +    ParentNodeInfo := ParentNodeInfo + Buffer;
  +    NodeInfo := NodeInfo + Buffer;
  +
  +    // attainable length
  +    ParentNode.AttainableLength := Node.AttainableLength + 1;
  +
  +    // attainable path
       {$ifdef CPUX86}
  -    nLength := Node.nAttainableLength;
  +    CardinalWeights := Store.CardinalWeights;
       {$endif}
  -    Dec(nLength){increment};
  +    ParentNode.AttainablePath := Node.AttainablePath +
  +      ((CardinalWeights[ParentNodeInfo] + CardinalWeights[NodeInfo]) shr 1);
  +
  +    // attainable distance
       {$ifdef CPUX86}
  -      NodeInfo := (ParentNode.SortValue - ParentNode.Path){heurisctics};
  -      ParentNode.Path := nLength - NodeInfo;
  +      SingleWeights := Store.SingleWeights;
  +      ParentNode.AttainableDistance := Node.AttainableDistance +
  +        HALF * (SingleWeights[ParentNodeInfo] + SingleWeights[NodeInfo]);
       {$else}
  -      ParentNode.Path := nLength - (ParentNode.SortValue - ParentNode.Path){heurisctics};
  -    {$endif}
  -
  -    // length and distance
  -    SingleWeigths := {$ifdef CPUX86}Store.{$endif}SingleDiagonalWeigths;
  -    ParentNode.nAttainableLength := nLength;
  -    Inc(NativeInt(SingleWeigths), (ParentNodeInfo and (1 shl 4){child}) shl (10 - 4));
  -    {$ifdef CPUX86}
  -      ParentNode.AttainableDistance := Node.AttainableDistance +
  -        HALF * (SingleWeigths[ParentNodeInfo shr 24] + SingleWeigths[Node.NodeInfo shr 24]);
  -    {$else}
  -      W1 := SingleWeigths[ParentNodeInfo shr 24];
  -      W2 := SingleWeigths[NodeInfo shr 24];
  +      W1 := SingleWeights[ParentNodeInfo];
  +      W2 := SingleWeights[NodeInfo];
         ParentNode.AttainableDistance := Node.AttainableDistance + HALF * (W1 + W2);
       {$endif}
  -    NodeInfo := ParentNodeInfo;
  +
  +    // next node
       Node := ParentNode;
  +    NodeInfo := Store.ParentNodeInfo;
     until (ParentNode = {$ifdef CPUX86}Store.{$endif}StartPointNode);
   
  -  // result length and distance
  -fill_result:
  -  _StartPoint := Store.StartPoint;
  -  _StartPoint.Length := not {$ifdef CPUX86}{Parent}Node.nAttainableLength{$else}nLength{$endif};
  -  _StartPoint.Distance := {Parent}Node.AttainableDistance;
  -end;
  -
  -procedure TTileMap.FillAttainablePath(const StartNode, FinishNode: PCPFNode);
  -var
  -  Node: PCPFNode;
  +  // result attainable path
  +  Store.StartPoint.AttainablePath := Node.AttainablePath;
  +end;
  +
  +procedure TTileMap.FillAttainablePath(const AttainableNode: PCPFNode);
  +var
     Cell: PCPFCell;
  +  NodeInfo, i, Count: NativeUInt;
     Point: PPoint;
  -  CellOffsets: PCPFOffsets;
  -  N: NativeUInt;
  +  NodeXY, OffsetXY, ChildXY: Cardinal;
  +
  +  CellOffsets: {$ifdef CPUX86}TCPFOffsets{$else}PCPFOffsets{$endif};
   
     {$ifdef LARGEINT}
       NodeBuffers: PCPFNodeBuffers;
     {$endif}
   begin
  -  // parameters
  -  Node := StartNode;
  -  Cell := @FInfo.CellArray[NativeInt(Node.Coordinates.Y) * Width + Node.Coordinates.X];
  +  CellOffsets := {$ifNdef CPUX86}@{$endif}FInfo.CellOffsets;
  +  Count := AttainableNode.AttainableLength;
  +  NodeXY := Cardinal(AttainableNode.Coordinates);
  +  Cell := @FInfo.CellArray[Word(NodeXY){Y} * FInfo.MapWidth + NativeInt(NodeXY shr 16){X}];
     Point := FActualInfo.FoundPath.Buffer.Memory;
  -  CellOffsets := @FInfo.CellOffsets;
  +
     {$ifdef LARGEINT}
     NodeBuffers := Pointer(@FInfo.NodeAllocator.Buffers);
     {$endif}
   
  -  // each node loop
  -  repeat
  +  for i := 1 to Count do
  +  begin
       // coordinates
  -    {$ifdef CPUX86}
  -      Point.Y := Node.Coordinates.Y;
  -      Point.X := Node.Coordinates.X;
  +    Point.X := NodeXY shr 16;
  +    Point.Y := Word(NodeXY);
  +    Inc(Point);
  +
  +    // child
  +    {$ifdef LARGEINT}
  +      NodeInfo := Cell.NodePtr;
  +      NodeInfo := PCPFNode((NodeBuffers[NodeInfo shr LARGE_NODEPTR_OFFSET]) +
  +        (NodeInfo and NODEPTR_CLEAN_MASK)).NodeInfo;
       {$else}
  -      N := Cardinal(Node.Coordinates);
  -      {$ifdef LARGEINT}
  -        PNativeUInt(Point)^ := (NativeUInt(Word(N)) shl 32) + (N shr 16);
  -      {$else}
  -        Point.Y := Word(N);
  -        Point.X := N shr 16;
  -      {$endif}
  +      NodeInfo := PCPFNode(Cell.NodePtr and NODEPTR_CLEAN_MASK).NodeInfo;
       {$endif}
  -    Inc(Point);
  -
  -    // known child cell
  -    Inc(NativeInt(Cell), CellOffsets[(Node.NodeInfo shr 4) and 7]);
  -
  -    // cell node
  -    {$ifdef LARGEINT}
  -      N := Cell.NodePtr;
  -      Node := Pointer(
  -        (NodeBuffers[N shr LARGE_NODEPTR_OFFSET]) +
  -        (N and NODEPTR_CLEAN_MASK) );
  -    {$else}
  -      Node := Pointer(Cell.NodePtr and NODEPTR_CLEAN_MASK);
  -    {$endif}
  -  until (Node = FinishNode);
  -
  -  // finish node coordinates
  -  N := Cardinal(Node.Coordinates);
  -  {$ifdef LARGEINT}
  -    PNativeUInt(Point)^ := (NativeUInt(Word(N)) shl 32) + (N shr 16);
  -  {$else}
  -    Point.Y := Word(N);
  -    Point.X := N shr 16;
  -  {$endif}
  -end;
  -
  -procedure TTileMap.FillStandardPath(const StartNode, FinishNode: PCPFNode);
  +    NodeInfo := NodeInfo shr 4;
  +    NodeInfo := NodeInfo and 7;
  +
  +    // child cell
  +    Inc(NativeInt(Cell), CellOffsets[NodeInfo]);
  +
  +    // child coordinates
  +    OffsetXY := Cardinal(POINT_OFFSETS[NodeInfo]);
  +    ChildXY := NodeXY + OffsetXY;
  +    OffsetXY := OffsetXY and $ffff0000;
  +    NodeXY := NodeXY and $ffff0000;
  +    Inc(OffsetXY, Word(ChildXY));
  +    Inc(NodeXY, OffsetXY);
  +  end;
  +end;
  +
  +procedure TTileMap.FillStandardPath(const StartNode: PCPFNode);
   type
     TWeightCounts = packed record
       Diagonal: Integer;
  
positive.code:   Inc(StartPoint);
    for i := Params.StartsCount downto 2 do
    begin
      {$ifdef LARGEINT}
        NodeInfo := StartPoint.DistanceAsInt64;
        Dec(NodeInfo, BestStartPoint.DistanceAsInt64);
        if (NativeInt(NodeInfo) < 0) then goto change_beststart;
        if (NativeInt(NodeInfo) > 0) then goto next_start;
        if (StartPoint.XYDistance >= BestStartPoint.XYDistance) then goto next_start;
      {$else}
        FinishX := StartPoint.DistanceHighDword - BestStartPoint.DistanceHighDword;
        if (FinishX < 0) then goto change_beststart;
        if (FinishX > 0) then goto next_start;
        FinishX := StartPoint.DistanceLowDword;
        if (Cardinal(FinishX) < BestStartPoint.DistanceLowDword) then goto change_beststart;
        if (Cardinal(FinishX) > BestStartPoint.DistanceLowDword) then goto next_start;
        if (StartPoint.XYDistance >= BestStartPoint.XYDistance) then goto next_start;
      {$endif}
    change_beststart:
       BestStartPoint := StartPoint;
  
  
negative.code:   Index: NativeUInt;
  begin
    // retrieve map cells
    if (RetrieveCells) then
    begin
      if (FInfo.NodeAllocator.Count <> 0) then
      begin
        if (FNodes.Finish <> nil) then
          ForgetFinishNode;
  
        if (FActualInfo.Excludes.Count <> 0) then
          ForgetExcludedNodes;
  
        Index := FInfo.NodeAllocator.Count - 1;
        Node := FInfo.NodeAllocator.Buffers[Index];
        HighNode := FInfo.NodeAllocator.NewNode;
        RetrieveNodeArrayCells(FInfo, Node, HighNode);
        while (Index <> 0) do
        begin
          Dec(Index);
  
          HighNode := FInfo.NodeAllocator.Buffers[Index];
          Node := HighNode;
          Inc(HighNode, NODESTORAGE_INFO[Index].Count);
  
          RetrieveNodeArrayCells(FInfo, Node, HighNode);
        end;
      end;
    end;
  
  