UFMQQPYCBI6Z576P7PH4ZAPC7L7P3D4H66NJMFQKP6WRAPIK2NOQC
}
// Shoot a ray from the given start point (accx, accy) with the given
// slope, bounded by LOS radius. Store the visited cells in
// xpos[] and ypos[], and return the number of cells visited.
int shoot_ray(double accx, double accy, const double slope,
int maxrange, int xpos[], int ypos[])
{
int curx, cury;
int cellnum;
for (cellnum = 0; true; ++cellnum)
{
_find_next_intercept(&accx, &accy, slope);
curx = static_cast<int>(accx);
cury = static_cast<int>(accy);
if (curx*curx + cury*cury > get_los_radius_squared())
break;
xpos[cellnum] = curx;
ypos[cellnum] = cury;
}
return cellnum;
}
}
// Shoot a ray from the given start point (accx, accy) with the given
// slope, bounded by the given pre-squared LOS radius.
// Store the visited cells in xpos[] and ypos[], and
// return the number of cells visited.
int ray_def::footprint(int radius2, int xpos[], int ypos[])
{
int curx, cury;
int cellnum;
for (cellnum = 0; true; ++cellnum)
{
_find_next_intercept(&accx, &accy, slope);
curx = static_cast<int>(accx);
cury = static_cast<int>(accy);
if (curx*curx + cury*cury > radius2)
break;
xpos[cellnum] = curx;
ypos[cellnum] = cury;