diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
commit | 1d0f57cbceb778139ca215cc4fcfd1584951f6dd (patch) | |
tree | cafd60c944c51fcce778aa5d6912bc548c518339 /crawl-ref/source/direct.h | |
parent | 6f5e187a9e5cd348296dba2fd89d2e206e775a01 (diff) | |
download | crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.tar.gz crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.zip |
Merged stone_soup r15:451 into trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.h')
-rw-r--r-- | crawl-ref/source/direct.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/crawl-ref/source/direct.h b/crawl-ref/source/direct.h index e591107578..cb31de043d 100644 --- a/crawl-ref/source/direct.h +++ b/crawl-ref/source/direct.h @@ -3,6 +3,8 @@ * Summary: Functions used when picking squares. * Written by: Linley Henzell * + * Modified for Crawl Reference by $Author$ on $Date$ + * * Change History (most recent first): * * <1> -/--/-- LRH Created @@ -28,7 +30,7 @@ #define DIR_DIR 2 void direction( struct dist &moves, int restricts = DIR_NONE, - int mode = TARG_ANY ); + int mode = TARG_ANY, bool confirm_fizzle = false ); // last updated 12may2000 {dlb} /* *********************************************************************** @@ -42,6 +44,31 @@ bool in_viewport_bounds(int x, int y); bool in_los(int x, int y); bool in_vlos(int x, int y); +int dos_direction_unmunge(int doskey); + std::string feature_description(int mx, int my); +std::string feature_description(int grid); + +std::vector<dungeon_feature_type> features_by_desc(const text_pattern &pattern); + +inline int view2gridX(int vx) +{ + return (you.x_pos + vx - VIEW_CX); +} + +inline int view2gridY(int vy) +{ + return (you.y_pos + vy - VIEW_CY); +} + +inline int grid2viewX(int gx) +{ + return (gx - you.x_pos + VIEW_CX); +} + +inline int grid2viewY(int gy) +{ + return (gy - you.y_pos + VIEW_CY); +} #endif |