anchor.diff:  
   type
   
  -  TKKRoadableFF = class(TKMQuickFlood)
  -  private
  -    fVisitIdx: Byte;
  -    fVisitArr, fSearchArr: TKMByte2Array;
  -  protected
  -    procedure MakeNewQueue(); override;
  -    function CanBeVisited(const aX,aY: SmallInt): Boolean; override;
  -    function IsVisited(const aX,aY: SmallInt): Boolean; override;
  -    procedure MarkAsVisited(const aX,aY: SmallInt); override;
  -  public
  -    constructor Create(aMinLimit, aMaxLimit: TKMPoint; var aSearchArr: TKMByte2Array; const aScanEightTiles: Boolean = False); reintroduce;
  -  end;
  -
     //Collection of influence maps
     TKMInfluences = class
     private
  
positive.code: end;
  
  
  
  
  { TKKRoadableFF }
  constructor TKKRoadableFF.Create(aMinLimit, aMaxLimit: TKMPoint; var aSearchArr: TKMByte2Array; const aScanEightTiles: Boolean = False);
  begin
    inherited Create(aScanEightTiles);
    fVisitIdx := High(Byte);
    fSearchArr := aSearchArr;
    fMinLimit := aMinLimit;
    fMaxLimit := aMaxLimit;
    SetLength(fVisitArr, Length(fSearchArr), Length(fSearchArr[0]));
  end;
  
  
  procedure TKKRoadableFF.MakeNewQueue();
  var
    X,Y: Integer;
  begin
    if (fVisitIdx >= High(Byte) - 1) then
    begin
      fVisitIdx := 0;
      for Y := Low(fVisitArr) to High(fVisitArr) do
        for X := Low(fVisitArr[Y]) to High(fVisitArr[Y]) do
          fVisitArr[Y,X] := 0;
    end;
    fVisitIdx := fVisitIdx + 1;
    inherited MakeNewQueue();
  end;
  
  
  function TKKRoadableFF.CanBeVisited(const aX,aY: SmallInt): Boolean;
  begin
    Result := gTerrain.TileIsRoadable( KMPoint(aX, aY) );
  end;
  
  
  function TKKRoadableFF.IsVisited(const aX,aY: SmallInt): Boolean;
  begin
    Result := fVisitArr[aY,aX] = fVisitIdx;
  end;
  
  
  procedure TKKRoadableFF.MarkAsVisited(const aX,aY: SmallInt);
  begin
    fVisitArr[aY,aX] := fVisitIdx;
    fSearchArr[aY,aX] := 0;
  end;
  
  
  end.
  
negative.code:   LoadStream.Read(Len);
    SetLength(fPresence, Len);
    LoadStream.Read(fPresence[0], SizeOf(fPresence[0]) * Len);
  end;
  
  
  