anchor.diff:              P[Y,TP_Start.X] := val;
             if P[Y,TP_End.X] > val then
               P[Y,TP_End.X] := val;
  -
             //A[Y*3,TP_Start.X*3] := Byte(btDark);
             //A[Y*3,TP_End.X*3] := Byte(btDark);
  -
           end;
           TP_Start.X := Max(TP_Start.X - 1, 0);
           TP_Start.Y := Max(TP_Start.Y - 1, 0);
  
positive.code:             P[TP_Start.Y,X] := val;
            if P[TP_End.Y,X] > val then
              P[TP_End.Y,X] := val;
  
            //A[TP_Start.Y*3,X*3] := Byte(btDark);
            //A[TP_End.Y*3,X*3] := Byte(btDark);
  
          end;
          for Y := TP_Start.Y to TP_End.Y do
          begin
  
negative.code:       Y := PointsArr[i,j].Y;
        FloodSearch(X,Y,S[Y,X],-S[Y,X],Count[i,j],S);
      end;
    if RMGSettings.Resource.Active then
    begin
      // Resources
  