protected void calculateEdgeTiles(Point paramPoint, int paramInt)
  {
    int i = 0; int j = this.gridsize.width - 1; int k = 0; int m = this.gridsize.height - 1;
    int n = Math.max(i, paramPoint.x - paramInt);
    int i1 = Math.min(j, paramPoint.x + paramInt);
    int i2 = Math.max(k, paramPoint.y - paramInt);
    int i3 = Math.min(m, paramPoint.y + paramInt);

    int i6 = 0;
    for (int i4 = n; i6 == 0; i4 = i1)
    {
      for (int i5 = i2; i5 <= i3; i5++)
      {
        calculateTile(i4, i5);
      }
      if (i4 == i1) {
        i6 = 1;
      }
    }

    i6 = 0;
    for (int i5 = i2; i6 == 0; i5 = i3)
    {
      for (int i4 = n + 1; i4 < i1; i4++)
      {
        calculateTile(i4, i5);
      }
      if (i5 == i3)
        i6 = 1;
    }
  }