summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-17 14:16:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-17 14:16:52 +0000
commita9a5ce7479fc6358f96aadad9654d35f2a573782 (patch)
treec1c30d02f940fc10fd80f729ce712fe0fee8fc07 /crawl-ref/source/travel.h
parent3893b36195d2345f1a24a42fd5ed31cd72a8f501 (diff)
downloadcrawl-ref-a9a5ce7479fc6358f96aadad9654d35f2a573782.tar.gz
crawl-ref-a9a5ce7479fc6358f96aadad9654d35f2a573782.zip
x on the level-map changes travel exclusion radius. Radius steps are 1, 4 and
8. Travel cache version also changes. [1738213] describe_floor() now uses feature_description instead of rolling its own. This does produce redundant messages when stepping into shallow water, but I think we can live with that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1591 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index d6fb9c62f1..8fad985664 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -25,10 +25,13 @@
void initialise_travel();
void stop_running(void);
void travel_init_new_level();
-void toggle_exclude(int x, int y);
+void cycle_exclude_radius(const coord_def &p);
+void toggle_exclude(const coord_def &p);
+void set_exclude(const coord_def &p, int radius2);
void clear_excludes();
unsigned char is_waypoint(int x, int y);
void update_excludes();
+bool is_exclude_root(const coord_def &p);
bool is_stair(unsigned gridc);
bool is_travelable_stair(unsigned gridc);
command_type stair_direction(int stair_feat);
@@ -319,6 +322,22 @@ struct stair_info
void load(FILE *);
};
+struct travel_exclude
+{
+ coord_def pos;
+ int radius;
+
+ travel_exclude(const coord_def &p, int r = LOS_RADIUS)
+ : pos(p), radius(r)
+ {
+ }
+
+ int radius_sq() const
+ {
+ return (radius * radius * 17 / 16);
+ }
+};
+
// Information on a level that interlevel travel needs.
struct LevelInfo
{
@@ -341,7 +360,7 @@ struct LevelInfo
void reset_distances();
void set_level_excludes();
- const std::vector<coord_def> &get_excludes() const
+ const std::vector<travel_exclude> &get_excludes() const
{
return excludes;
}
@@ -375,7 +394,7 @@ private:
std::vector<stair_info> stairs;
// Squares that are not safe to travel to.
- std::vector<coord_def> excludes;
+ std::vector<travel_exclude> excludes;
std::vector<short> stair_distances; // Dist between stairs
level_id id;