From 199d107c9f40413126a31fcc843f5c54608bc73c Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 29 Jul 2007 17:10:16 +0000 Subject: &L can place encompass levels, and is more aggressive about overwriting existing dungeon features. Dungeon features of importance - such as stairs, shops, and altars - and map markers are shifted out of the way, to the nearest free floor square. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1947 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mapmark.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'crawl-ref/source/mapmark.cc') diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc index 2f2dc84a6b..191466f9e2 100644 --- a/crawl-ref/source/mapmark.cc +++ b/crawl-ref/source/mapmark.cc @@ -421,6 +421,27 @@ map_marker *env_find_marker(const coord_def &c, map_marker_type type) return (NULL); } +void env_move_markers(const coord_def &from, const coord_def &to) +{ + std::pair + els = env.markers.equal_range(from); + + std::list markers; + for (dgn_marker_map::iterator i = els.first; i != els.second; ) + { + dgn_marker_map::iterator curr = i++; + markers.push_back(curr->second); + env.markers.erase(curr); + } + + for (std::list::iterator i = markers.begin(); + i != markers.end(); ++i) + { + (*i)->pos = to; + env_add_marker(*i); + } +} + std::vector env_get_markers(const coord_def &c) { std::pair -- cgit v1.2.3-54-g00ecf