diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-08-17 17:26:32 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-08-17 19:44:57 +0200 |
commit | 934cc1d96b9af44bdc3c37c930b79abc519b97bf (patch) | |
tree | d677ff9d7a85f5bc0a3d1eb3352a4458be43ecab /crawl-ref/source/exclude.cc | |
parent | 865ad7c97e5620b1af0b0fbde37646a81b57b295 (diff) | |
download | crawl-ref-934cc1d96b9af44bdc3c37c930b79abc519b97bf.tar.gz crawl-ref-934cc1d96b9af44bdc3c37c930b79abc519b97bf.zip |
Make a bunch of functions static or non-existant.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r-- | crawl-ref/source/exclude.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 2957adf3af..ab387e99de 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -41,7 +41,7 @@ static bool _mon_needs_auto_exclude(const monster* mon, bool sleepy = false) } // Check whether a given monster is listed in the auto_exclude option. -bool need_auto_exclude(const monster* mon, bool sleepy) +static bool _need_auto_exclude(const monster* mon, bool sleepy = false) { // This only works if the name is lowercased. std::string name = mon->name(DESC_BASENAME, @@ -64,7 +64,9 @@ bool need_auto_exclude(const monster* mon, bool sleepy) // Nightstalker reduces LOS, so reducing the maximum exclusion radius // only makes sense. This is only possible because it's a permanent // mutation; the lantern of Shadows should not have this effect. -int _get_full_exclusion_radius() +// TODO: update the radiuses on wield/unwield, we already need to do that +// when gaining/losing nightstalker. +static int _get_full_exclusion_radius() { return (LOS_RADIUS - player_mutation_level(MUT_NIGHTSTALKER)); } @@ -76,7 +78,7 @@ void set_auto_exclude(const monster* mon) if (!player_in_mappable_area()) return; - if (need_auto_exclude(mon) && !is_exclude_root(mon->pos())) + if (_need_auto_exclude(mon) && !is_exclude_root(mon->pos())) { int rad = _get_full_exclusion_radius(); if (mon->type == MONS_HYPERACTIVE_BALLISTOMYCETE) @@ -100,7 +102,7 @@ void set_auto_exclude(const monster* mon) // player in sight. If sleepy is true, stationary monsters are ignored. void remove_auto_exclude(const monster* mon, bool sleepy) { - if (need_auto_exclude(mon, sleepy)) + if (_need_auto_exclude(mon, sleepy)) { del_exclude(mon->pos()); #ifdef USE_TILE |