diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-10-28 20:49:39 -0700 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-29 10:38:15 +0100 |
commit | 3e559f10ad2ad57f02314b1d3d39814ec976e150 (patch) | |
tree | 05491867f030f56d095c5b044e6155d5e5ed8979 /crawl-ref | |
parent | ebfbb6fbb71da74b891711361ce8191a1f60a7b6 (diff) | |
download | crawl-ref-3e559f10ad2ad57f02314b1d3d39814ec976e150.tar.gz crawl-ref-3e559f10ad2ad57f02314b1d3d39814ec976e150.zip |
Make passive maping use a circular region
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/view.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/view.h | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index e2a35e53c5..1dd2a13a42 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -274,7 +274,7 @@ static void _automap_from( int x, int y, int mutated ) { if (mutated) magic_mapping(8 * mutated, 5 * mutated, true, false, - true, coord_def(x,y)); + true, true, coord_def(x,y)); } void reautomap_level( ) @@ -2917,7 +2917,8 @@ static const FixedArray<char, GXM, GYM>& _tile_difficulties(bool random) // Returns true if it succeeded. bool magic_mapping(int map_radius, int proportion, bool suppress_msg, - bool force, bool deterministic, coord_def pos) + bool force, bool deterministic, bool circular, + coord_def pos) { if (!in_bounds(pos)) pos = you.pos(); @@ -2953,7 +2954,7 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, const FixedArray<char, GXM, GYM>& difficulty = _tile_difficulties(!deterministic); - for (radius_iterator ri(pos, map_radius, true, false); ri; ++ri) + for (radius_iterator ri(pos, map_radius, !circular, false); ri; ++ri) { if (!wizard_map) { diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index e561040106..30c179d4d1 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -70,6 +70,7 @@ void find_features(const std::vector<coord_def>& features, bool magic_mapping(int map_radius, int proportion, bool suppress_msg, bool force = false, bool deterministic = false, + bool circular = false, coord_def origin = coord_def(-1, -1)); void reautomap_level(); |