anchor.diff:    end;
   end;
   
  +function TPathMap.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 TPathMap.FindPath(const Start, Finish: TPoint;
     const Weights: TPathMapWeightsPtr; const ExcludedPoints: PPoint;
     const ExcludedPointsCount: NativeUInt): PPathMapResult;
  
positive.code:   _5 = (1 shl 5);
    _6 = (1 shl 6);
    _7 = (1 shl 7);
  
    UNSUPPORTED_TILE_WEIGHT = High(Cardinal) shr 1;
  
  
negative.code:     procedure SetCaching(const Value: Boolean);
      procedure CachingChanged;
      function AllocateNode(const X, Y: NativeInt): PPathMapNode;
      function CalculateHeuristics(const Start, Finish: TPoint): NativeInt;
      function DoFindPath(MapSelf: Pointer; StartNode: PPathMapNode): PPathMapNode;
    {$ifdef CPFLIB}
    public
  