summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-05 18:40:37 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-05 18:40:37 +0000
commitb38e4381c132f9b1ecbe8962bfd5fc1e8cda76a3 (patch)
treeb6aa628bb50e1f6287c401a4e2fea6644b4ec555 /crawl-ref/source/travel.h
parent5f847aeb6e49ca48844922654a085c9626b34586 (diff)
downloadcrawl-ref-b38e4381c132f9b1ecbe8962bfd5fc1e8cda76a3.tar.gz
crawl-ref-b38e4381c132f9b1ecbe8962bfd5fc1e8cda76a3.zip
Dungeon builder now guarantees a path between { and one of )]}> on D:1, except
in the case of enclosed entry vaults. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@921 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 6493e37209..97491884c1 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -42,6 +42,9 @@ bool is_player_mapped(int grid_x, int grid_y);
void find_travel_pos(int you_x, int you_y, char *move_x, char *move_y,
std::vector<coord_def>* coords = NULL);
+bool is_travelsafe_square(int x, int y, bool ignore_hostile = false,
+ bool ignore_terrain_knowledge = false);
+
/* ***********************************************************************
* Initiates explore - the character runs around the level to map it. Note
* that the caller has to ensure that the level is mappable before calling
@@ -423,6 +426,7 @@ class travel_pathfind
{
public:
travel_pathfind();
+ virtual ~travel_pathfind();
// Finds travel direction or explore target.
const coord_def pathfind(run_mode_type rt);
@@ -461,18 +465,19 @@ public:
// RMODE_EXPLORE_GREEDY.
const coord_def unexplored_square() const;
-private:
+protected:
bool is_greed_inducing_square(const coord_def &c) const;
bool path_examine_point(const coord_def &c);
- bool path_flood(const coord_def &c, const coord_def &dc);
+ virtual bool path_flood(const coord_def &c, const coord_def &dc);
bool square_slows_movement(const coord_def &c);
void check_square_greed(const coord_def &c);
+ void good_square(const coord_def &c);
-private:
+protected:
static const int UNFOUND_DIST = -10000;
static const int INFINITE_DIST = 10000;
-private:
+protected:
run_mode_type runmode;
// Where pathfinding starts, and the destination. Note that dest is not