MCPcopy Create free account
hub / github.com/crawl/crawl / parse

Method parse

crawl-ref/source/mapmark.cc:154–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154map_marker *map_feature_marker::parse(const string &s, const string &)
155{
156 if (!starts_with(s, "feat:"))
157 return nullptr;
158 string raw = s;
159 strip_tag(raw, "feat:", true);
160
161 const dungeon_feature_type ft = dungeon_feature_by_name(raw);
162 if (ft == DNGN_UNSEEN)
163 {
164 throw bad_map_marker_f("Bad feature marker: %s (unknown feature '%s')",
165 s.c_str(), raw.c_str());
166 }
167 return new map_feature_marker(coord_def(0, 0), ft);
168}
169
170string map_feature_marker::debug_describe() const
171{

Callers

nothing calls this directly

Calls 5

starts_withFunction · 0.85
strip_tagFunction · 0.85
dungeon_feature_by_nameFunction · 0.85
bad_map_markerClass · 0.85
coord_defClass · 0.70

Tested by

no test coverage detected