summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-clone.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-11-11 00:51:12 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-11-11 00:53:21 +0100
commit5be338836d26d62a78b9668b6c7ab08cc1cb98b2 (patch)
tree1252f6b543a1b4b87bde73acaaa9c94123aeb270 /crawl-ref/source/mon-clone.cc
parent39aa805b401e889169479cb51daff13921e4534a (diff)
downloadcrawl-ref-5be338836d26d62a78b9668b6c7ab08cc1cb98b2.tar.gz
crawl-ref-5be338836d26d62a78b9668b6c7ab08cc1cb98b2.zip
Make a bunch of functions static, delete some unused junk.
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r--crawl-ref/source/mon-clone.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc
index 23a43a5c21..9ddf2f8380 100644
--- a/crawl-ref/source/mon-clone.cc
+++ b/crawl-ref/source/mon-clone.cc
@@ -54,19 +54,19 @@ static bool _monster_clone_exists(monster* mons)
return (false);
}
-bool mons_is_illusion(monster* mons)
+static bool _mons_is_illusion(monster* mons)
{
return (mons->type == MONS_PLAYER_ILLUSION
|| mons->type == MONS_MARA_FAKE
|| mons->props.exists(clone_slave_key));
}
-bool mons_is_illusion_cloneable(monster* mons)
+static bool _mons_is_illusion_cloneable(monster* mons)
{
- return (!mons_is_illusion(mons) && !_monster_clone_exists(mons));
+ return (!_mons_is_illusion(mons) && !_monster_clone_exists(mons));
}
-bool player_is_illusion_cloneable()
+static bool _player_is_illusion_cloneable()
{
for (monster_iterator mi; mi; ++mi)
{
@@ -81,11 +81,11 @@ bool actor_is_illusion_cloneable(actor *target)
if (target->atype() == ACT_PLAYER)
{
ASSERT(target == &you);
- return player_is_illusion_cloneable();
+ return _player_is_illusion_cloneable();
}
else
{
- return mons_is_illusion_cloneable(target->as_monster());
+ return _mons_is_illusion_cloneable(target->as_monster());
}
}
@@ -93,7 +93,7 @@ static void _mons_summon_monster_illusion(monster* caster,
monster* foe)
{
// If the monster's clone is still kicking around, don't clone it again.
- if (!mons_is_illusion_cloneable(foe))
+ if (!_mons_is_illusion_cloneable(foe))
return;
// [ds] Bind the original target's attitude before calling
@@ -156,7 +156,7 @@ static void _init_player_illusion_properties(monsterentry *me)
// that are (presumably) internal to the body, like haste and
// poisoning, and specifically not external effects like corona and
// sticky flame.
-enchant_type player_duration_to_mons_enchantment(duration_type dur)
+static enchant_type _player_duration_to_mons_enchantment(duration_type dur)
{
switch (dur)
{
@@ -182,7 +182,7 @@ static void _mons_load_player_enchantments(monster* creator, monster* target)
{
const duration_type dur(static_cast<duration_type>(i));
const enchant_type ench =
- player_duration_to_mons_enchantment(dur);
+ _player_duration_to_mons_enchantment(dur);
if (ench == ENCH_NONE)
continue;
target->add_ench(mon_enchant(ench,