DTLGI2UTJNLKFFS6UXDAJPYIHWQXZVOXW7YXUC66SXGIWWIG23JAC
TQRXKGNUMPIPB4DWAEYEQ33MWWKOMERRAMG4IILPJSJMCHEA5PEQC
SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC
PHJ2TT2CQ2IRXOB5KAV2664KKTPYFPFUIBEGAOQBGB4SAZ7PKNHAC
UFMQQPYCBI6Z576P7PH4ZAPC7L7P3D4H66NJMFQKP6WRAPIK2NOQC
ACZYEIX7WMPIIODKCATBCUE626AJ4ZGGBOMVC6BGXM27EQU2RECAC
6LUCHG4PWMHTNURJG7IL4D6KMCDM7ZKZDUEI2MLX7PR2XMMEDUGQC
JPITTXY2C43TV7GPYP6MWZJBMRPA6FDB2YVLTTJ2CTW6TZJXMR3AC
// 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 pos[], and
// return the number of cells visited.
int ray_def::footprint(int radius2, coord_def cpos[]) const
{
ray_def copy = *this;
coord_def c;
int cellnum;
for (cellnum = 0; true; ++cellnum)
{
copy.raw_advance();
c = copy.pos();
if (c.abs() > radius2)
break;
cpos[cellnum] = c;
}
return cellnum;
}