halo, both of which are in spells3.cc, move it there and make it static, at least for now.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3796 c06c8d41-db1a-0410-9941-cceddc491573
WL3O4GOFGFEDGJ74LVMYJEIRSSZ3ZPIPY5FWAZJED3FPCTUV6NQQC
DKRSOHZXL6EPSLKOKHF7GJXSZEJVY7CXGACSHWLM5B5FTRETWWCAC
4OV4JZ6NWQ2ZK4LEWCUWALLB3BVANJJ2EMLHC5LJLA5WYSP25OIQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
CGYTZT5QWIEGYKUOLOK7MFXSLJKLYRZONER5ZCDZO5XYWSLG475QC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
JJHOTW7LDUJ6DLUG2DTFWASCAFPGD2WBW7MHBSECJZU7PTJYWQDQC
JDZCDMUCQ7VENYVLB62KQWUIRGABID37OKATOKCBUPCDL7W75NPAC
// Is there a monster in a circle with the given radius, centered on the
// player's position? If so, return the distance to it. Otherwise,
// return -1.
static int mons_inside_circle(int posx, int posy, int radius)
{
if (!inside_level_bounds(posx, posy))
return -1;
int dist = distance(posx, posy, you.x_pos, you.y_pos);
if (dist > radius*radius)
return -1;
if (mgrd[posx][posy] != NON_MONSTER)
return dist;
return -1;
}
}
// Is there a monster in a circle with the given radius, centered on the
// player's position? If so, return the distance to it. Otherwise,
// return -1.
int mons_inside_circle(int posx, int posy, int radius)
{
if (!inside_level_bounds(posx, posy))
return -1;
int dist = distance(posx, posy, you.x_pos, you.y_pos);
if (dist > radius*radius)
return -1;
if (mgrd[posx][posy] != NON_MONSTER)
return dist;
return -1;