diff options
Diffstat (limited to 'crawl-ref/source/l_moninf.cc')
-rw-r--r-- | crawl-ref/source/l_moninf.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crawl-ref/source/l_moninf.cc b/crawl-ref/source/l_moninf.cc index 10a3bfbfbb..6224837e9e 100644 --- a/crawl-ref/source/l_moninf.cc +++ b/crawl-ref/source/l_moninf.cc @@ -58,23 +58,20 @@ bool in_show_bounds(const coord_def &s) return (s.rdist() <= ENV_SHOW_OFFSET); } -coord_def _show2grid(const coord_def &s) +coord_def player2grid(const coord_def &s) { return (you.pos() + s); } -coord_def _grid2show(const coord_def &g) +coord_def grid2player(const coord_def &g) { return (g - you.pos()); } -#define COORDSHOW(c, p1, p2) \ - GETCOORD(c, p1, p2, in_show_bounds) - LUAFN(mi_get_monster_at) { COORDSHOW(s, 1, 2) - coord_def p = _show2grid(s); + coord_def p = player2grid(s); if (!you.see_cell(p)) return (0); if (env.mgrid(p) == NON_MONSTER) |