diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/effects.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/effects.h | 14 | ||||
-rw-r--r-- | crawl-ref/source/spells2.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/spells2.h | 3 |
4 files changed, 18 insertions, 17 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 92fa7690d0..9dbced7c40 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -4305,12 +4305,12 @@ static int _arc_decomposition(const coord_def & pos, int n_arcs) return static_cast<int> (theta / arc_angle); } -int place_ring(std::vector<coord_def> & ring_points, - coord_def & origin, - mgen_data & prototype, - int n_arcs, - int arc_occupancy, - int & seen_count) +int place_ring(std::vector<coord_def> &ring_points, + const coord_def &origin, + mgen_data prototype, + int n_arcs, + int arc_occupancy, + int &seen_count) { std::random_shuffle(ring_points.begin(), ring_points.end()); @@ -4349,7 +4349,7 @@ int place_ring(std::vector<coord_def> & ring_points, // Collect lists of points that are within LOS (under the given env map), // unoccupied, and not solid (walls/statues). void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points, - coord_def & origin, env_show_grid & losgrid) + const coord_def &origin, const env_show_grid &losgrid) { radius_points.clear(); diff --git a/crawl-ref/source/effects.h b/crawl-ref/source/effects.h index fe13baee0f..dd23f6ba67 100644 --- a/crawl-ref/source/effects.h +++ b/crawl-ref/source/effects.h @@ -42,17 +42,17 @@ int spawn_corpse_mushrooms(item_def &corpse, bool distance_as_time = false); struct mgen_data; -int place_ring(std::vector<coord_def> & ring_points, - coord_def & origin, - mgen_data & prototype, - int n_arcs, - int arc_occupancy, - int & seen_count); +int place_ring(std::vector<coord_def>& ring_points, + const coord_def& origin, + mgen_data prototype, + int n_arcs, + int arc_occupancy, + int& seen_count); // Collect lists of points that are within LOS (under the given losgrid), // unoccupied, and not solid (walls/statues). void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points, - coord_def & origin, env_show_grid & losgrid); + const coord_def &origin, const env_show_grid &losgrid); void random_uselessness(int scroll_slot = -1); diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index b0f2f38563..e91d251949 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -2106,7 +2106,7 @@ void point_point(std::vector<coord_def> & origins, // to calculate the distances in question. In practice it should be called for // at most 7 searches since 8 (all adjacent free, > 8 monsters in view) can be // special cased easily. -bool prioritise_adjacent(coord_def & target, std::vector<coord_def> & candidates) +bool prioritise_adjacent(const coord_def &target, std::vector<coord_def> & candidates) { radius_iterator los_it(target, LOS_RADIUS, true, true, true); @@ -2114,7 +2114,7 @@ bool prioritise_adjacent(coord_def & target, std::vector<coord_def> & candidates // collect hostile monster positions in LOS for ( ; los_it; ++los_it) { - monsters * hostile = monster_at(*los_it); + monsters *hostile = monster_at(*los_it); if (hostile && hostile->attitude == ATT_HOSTILE) mons_positions.push_back(hostile->pos()); diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index 124032f9f4..dcc02dfed2 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -32,7 +32,8 @@ int create_plant(coord_def & target); //bool plant_from_fruit(); bool sunlight(); -bool prioritise_adjacent(coord_def & target, std::vector<coord_def> & candidates); +bool prioritise_adjacent(const coord_def &target, + std::vector<coord_def> &candidates); bool plant_ring_from_fruit(); int rain(const coord_def &target); |