From b38e4381c132f9b1ecbe8962bfd5fc1e8cda76a3 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 5 Feb 2007 18:40:37 +0000 Subject: 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 --- crawl-ref/source/travel.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/travel.h') 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* 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 -- cgit v1.2.3-54-g00ecf