diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-02 17:51:08 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-02 17:51:08 +0000 |
commit | 77bd894ea2391d0575ff39afac149ee4e54adc2c (patch) | |
tree | d89a4935818020cb6931869618753c701bd3d5a6 /crawl-ref/source/direct.h | |
parent | 882095e2a137991f94fb71584a9290bbc333d42b (diff) | |
download | crawl-ref-77bd894ea2391d0575ff39afac149ee4e54adc2c.tar.gz crawl-ref-77bd894ea2391d0575ff39afac149ee4e54adc2c.zip |
Highlight monsters in the path of a beam (with :).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1512 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.h')
-rw-r--r-- | crawl-ref/source/direct.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/direct.h b/crawl-ref/source/direct.h index 8522b5d10b..6c7d23c95f 100644 --- a/crawl-ref/source/direct.h +++ b/crawl-ref/source/direct.h @@ -49,6 +49,11 @@ inline int view2gridY(int vy) return (you.y_pos + vy - VIEW_CY); } +inline coord_def view2grid(const coord_def &pos) +{ + return coord_def( view2gridX(pos.x), view2gridY(pos.y) ); +} + inline int grid2viewX(int gx) { return (gx - you.x_pos + VIEW_CX); @@ -59,4 +64,9 @@ inline int grid2viewY(int gy) return (gy - you.y_pos + VIEW_CY); } +inline coord_def grid2view(const coord_def &pos) +{ + return coord_def( grid2viewX(pos.x), grid2viewY(pos.y) ); +} + #endif |