summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-20 11:40:25 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-20 11:40:25 +0000
commitb27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4 (patch)
tree1f3ba836c9d1cec2e625c6a4382f5babe32a8463 /crawl-ref/source/travel.h
parentab679653017c1d661572cf34a62bf5ddf7c1304e (diff)
downloadcrawl-ref-b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4.tar.gz
crawl-ref-b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4.zip
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
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h26
1 files changed, 20 insertions, 6 deletions
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;