anchor.diff:                if (B[Y1,X1] = Byte(btStone)) OR (B[Y1,X1] = Byte(btGold)) OR (B[Y1,X1] = Byte(btIron)) OR (B[Y1,X1] = Byte(btCoal)) then
                 begin
                   S[Y1 shr 1,X1 shr 1] := B[Y1,X1];
  -                //Terrain := GetFullTexture(FT[ B[Y1,X1] ,4]); // Place empty resources there and replace them with full variants later
  +                Terrain := FT[ B[Y1,X1],3 ]; // Place dummy resources there and replace them with full variants later
                 end
               // Other textures
                 else
  
positive.code:     False  // 23 btDark
    );
  
    WT: array[0..399] of Boolean = ( // Walkable tiles
    //  0      1      2      3      4        5      6      7      8      9       10     11     12     13     14       15
      True,  True,  True,  True,  False,   True,  True,  False, True,  True,    False, True,  False, True,  True,    False,
      True,  True,  True,  True,  True,    True,  True,  False, False, True,    True,  True,  True,  True,  True,    True,
      True,  True,  True,  True,  True,    True,  True,  True,  False, False,   False, False, True,  True,  True,    True,
      False, True,  False, False, True,    False, False, True,  True,  True,    True,  True,  True,  True,  True,    True,
      True,  True,  True,  True,  True,    True,  True,  True,  True,  True,    True,  True,  True,  True,  True,    True,
      True,  True,  True,  True,  True,    True,  True,  True,  True,  True,    True,  True,  True,  True,  True,    True,
      True,  True,  True,  True,  True,    True,  True,  True,  True,  False,   True,  True,  True,  True,  False,   True,
      True,  True,  False, False, True,    True,  False, False, True,  True,    True,  True,  True,  True,  False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, True,  False, False, False,   False,
      False, False, False, False, False,   False, False, False, True,  True,    True,  True,  False, False, False,   False,
      False, False, False, False, False,   False, True,  True,  True,  True,    True,  True,  True,  True,  True,    True,
      False, False, False, False, True,    True,  True,  True,  False, False,   False, False, True,  True,  True,    True,
      False, False, False, False, False,   True,  False, False, False, False,   True,  True,  True,  True,  False,   True,
      False, False, False, False, True,    True,  True,  True,  False, False,   False, False, True,  True,  True,    True,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, True,  True,  False,   False, True,  True,  True,  True,    True,  True,  True,  True,  True,    True,
  	  True,  True,  False, False, False,   True,  True,  False, False, False,   False, False, False, True,  True,    True,
      False, True,  False, False, False,   False, True,  True,  True,  False,   True,  False, False, False, True,    True,
      True,  False, True,  False, False,   False, True,  True,  True,  False,   True,  False, False, False, True,    True,
      False, True,  True,  False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False,
      False, False, False, False, False,   False, False, False, False, False,   False, False, False, False, False,   False
    );
  
  
negative.code:       Output[I,K] := count[I];
        cntRes := cntRes + count[I];
      end;
      // At the moment there is no 5x stone texture
      if (Resource = Byte(btStone)) then
      begin
        for I := Low(Output) to High(Output) do
        begin
          Output[I,4] := Output[I,5];
          Output[I,5] := 0;
        end;
        K := Max(1,K-1);
      end;
  
      cntRes := cntRes * (K * incPerATile + 3*Byte(Resource = Byte(btStone))); // Maximal capacity of shape
  
      // Decrease maximal resource capacity of shape by move specific tiles into lower levels of Output array
      incK := K;
      while (cntRes > Quantity) AND (incK >= -5) do // incK anti overflow condition
      begin
        I := 0;
        K := incK;
        while (cntRes > Quantity) AND (I <= High(Output)) AND (K <= High(Output[I])-Byte(Resource = Byte(btStone))) do // 5x stone is missing
        begin
          if (K >= 1) then
          begin
  