From b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 20 Jul 2007 11:40:25 +0000 Subject: Updated travel to allow it to use rock stairs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1898 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/travel.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/travel.h') diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h index 7f234ca7da..a4e4317220 100644 --- a/crawl-ref/source/travel.h +++ b/crawl-ref/source/travel.h @@ -344,27 +344,37 @@ private: struct stair_info { +public: + enum stair_type + { + PHYSICAL, + PLACEHOLDER + }; + +public: coord_def position; // Position of stair - int grid; // Grid feature of the stair. + dungeon_feature_type grid; // Grid feature of the stair. level_pos destination; // The level and the position on the level this // stair leads to. This may be a guess. int distance; // The distance traveled to reach this stair. bool guessed_pos; // true if we're not sure that 'destination' is // correct. + stair_type type; stair_info() : position(-1, -1), grid(DNGN_FLOOR), destination(), - distance(-1), guessed_pos(true) + distance(-1), guessed_pos(true), type(PHYSICAL) { } - void clear_distance() - { - distance = -1; - } + void clear_distance() { distance = -1; } void save(FILE *) const; void load(FILE *); + + std::string describe() const; + + bool can_travel() const { return (type == PHYSICAL); } }; struct travel_exclude @@ -447,6 +457,10 @@ private: level_id id; friend class TravelCache; + +private: + void create_placeholder_stair(const coord_def &, const level_pos &); + void resize_stair_distances(); }; const int TRAVEL_WAYPOINT_COUNT = 10; -- cgit v1.2.3-54-g00ecf