From 0869a80df1986501c68f608d71aaac4acea882dc Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 8 Nov 2009 10:14:16 +0100 Subject: Rename some halo functions. --- crawl-ref/source/actor.h | 2 +- crawl-ref/source/halo.cc | 14 +++++++------- crawl-ref/source/showsymb.cc | 2 +- crawl-ref/source/tilepick.cc | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index 0ca4e19c33..a542c73306 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -207,7 +207,7 @@ public: // Halo radius. virtual int halo_radius() const = 0; // Is the given point within this actor's halo? - virtual bool inside_halo(const coord_def &c) const; + virtual bool halo_contains(const coord_def &c) const; virtual bool petrified() const = 0; diff --git a/crawl-ref/source/halo.cc b/crawl-ref/source/halo.cc index daa80a728c..152756c7e8 100644 --- a/crawl-ref/source/halo.cc +++ b/crawl-ref/source/halo.cc @@ -11,10 +11,10 @@ // TODO: generalize. bool actor::haloed() const { - return (you.inside_halo(pos())); + return (you.halo_contains(pos())); } -bool actor::inside_halo(const coord_def &c) const +bool actor::halo_contains(const coord_def &c) const { int r = halo_radius(); return ((c - pos()).abs() <= r * r && see_cell(c)); @@ -36,15 +36,15 @@ int monsters::halo_radius() const return 0; } -std::list inside_halo(const coord_def &c) +std::list haloers(const coord_def &c) { - std::list haloers; + std::list ret; for (radius_iterator ri(c, LOS_RADIUS, false); ri; ++ri) { actor* a = actor_at(*ri); - if (a && a->inside_halo(c)) - haloers.push_back(a); + if (a && a->halo_contains(c)) + ret.push_back(a); } - return (haloers); + return (ret); } diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc index a4734219e8..25bdf8e4d5 100644 --- a/crawl-ref/source/showsymb.cc +++ b/crawl-ref/source/showsymb.cc @@ -106,7 +106,7 @@ static unsigned short _feat_colour(const coord_def &where, if (feat >= DNGN_FLOOR_MIN && feat <= DNGN_FLOOR_MAX || feat == DNGN_UNDISCOVERED_TRAP) { - if (you.inside_halo(where)) + if (you.halo_contains(where)) { if (silenced(where)) colour = LIGHTCYAN; diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 5200803458..f75357d994 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -4762,7 +4762,7 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy) if (in_bounds) { bool print_blood = true; - if (you.inside_halo(gc)) + if (you.halo_contains(gc)) { monsters *mon = monster_at(gc); if (observe_cell(gc) && mon) -- cgit v1.2.3-54-g00ecf