summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-06 18:55:32 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-06 18:55:32 +0000
commit942fcc618e384eed001f538abe28912fd0d468d3 (patch)
treedb8fd9c4c50d98bc8820c516e5b8bd0fa9fb0e36 /crawl-ref/source/travel.h
parent50c3e7b2427a5f93e0bcc763beb3130e4d2bc265 (diff)
downloadcrawl-ref-942fcc618e384eed001f538abe28912fd0d468d3.tar.gz
crawl-ref-942fcc618e384eed001f538abe28912fd0d468d3.zip
Fix level compiler to validate PLACE: declarations.
Places are saved as level_ids, not strings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1776 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 522bec1554..651d3072d5 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -171,10 +171,12 @@ public:
{
}
+ static level_id parse_level_id(const std::string &s) throw (std::string);
+
unsigned short packed_place() const;
std::string describe(bool long_name = false, bool with_number = true) const;
- void reset()
+ void clear()
{
branch = BRANCH_MAIN_DUNGEON;
depth = -1;
@@ -254,9 +256,9 @@ struct level_pos
return id.depth > -1 && pos.x != -1 && pos.y != -1;
}
- void reset()
+ void clear()
{
- id.reset();
+ id.clear();
pos = coord_def(-1, -1);
}
@@ -279,7 +281,7 @@ struct travel_target
}
void clear()
{
- p.reset();
+ p.clear();
entrance_only = false;
}
};
@@ -349,7 +351,7 @@ struct stair_info
{
}
- void reset_distance()
+ void clear_distance()
{
distance = -1;
}
@@ -394,7 +396,7 @@ struct LevelInfo
bool know_stair(const coord_def &pos) const;
int get_stair_index(const coord_def &pos) const;
- void reset_distances();
+ void clear_distances();
void set_level_excludes();
const std::vector<travel_exclude> &get_excludes() const
@@ -444,7 +446,7 @@ const int TRAVEL_WAYPOINT_COUNT = 10;
class TravelCache
{
public:
- void reset_distances();
+ void clear_distances();
LevelInfo& get_level_info(const level_id &lev)
{