mask.fovType = FovType.SQUARE;
mask.distPlusOneSq = 0;
mask.board = fb;
fovStateT state = new fovStateT();
state.source = new Point2I(startX, startY);
state.mask = mask;
state.board = fb;
state.isLos = true;
state.quadrant = new Point2I(dx < 0 ? -1 : 1, dy < 0 ? -1 : 1);
state.quadrantIndex = 0;
LinkedList<bumpT> steepBumps = new LinkedList<bumpT>();
LinkedList<bumpT> shallowBumps = new LinkedList<bumpT>();
// activeFields is sorted from shallow-to-steep.
LinkedList<fieldT> activeFields = new LinkedList<fieldT>();
activeFields.addLast(new fieldT());
activeFields.getLast().shallow.near = new Point2I(0, 1);
activeFields.getLast().shallow.far = new Point2I(adx + 1, 0);
activeFields.getLast().steep.near = new Point2I(1, 0);
activeFields.getLast().steep.far = new Point2I(0, ady + 1);
Point2I dest = new Point2I(0, 0);
Line2I stopLine = new Line2I(new Point2I(0, 1), new Point2I(adx, ady + 1)), startLine = new Line2I(
new Point2I(1, 0), new Point2I(adx + 1, ady));
// Visit the source square exactly once (in quadrant 1).
actIsBlocked(state, dest);
CLikeIterator<fieldT> currentField = new CLikeIterator<fieldT>(
activeFields.listIterator());
int maxI = adx + ady;
// For each square outline
int lastStartJ = -1;
Point2I topLeft = new Point2I(0, 0), bottomRight = new Point2I(0, 0);
for (int i = 1; i <= maxI && !activeFields.isEmpty(); ++i)
{
// System.out.println("i "+i);
int startJ = max(0, i - adx);
startJ = max(startJ, lastStartJ - 1);