summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2014-03-13 12:02:04 -0500
committerSteve Melenchuk <smelenchuk@gmail.com>2014-04-24 21:27:48 -0600
commit216500d13dad04c00521f84045fd6d63ad1a2d55 (patch)
tree79a87601c822b19d456e739fca360bb1494677e1 /crawl-ref/source/mon-util.cc
parentfc2778f61a89ec054cfaa21832b20c91f0dc58cd (diff)
downloadcrawl-ref-216500d13dad04c00521f84045fd6d63ad1a2d55.tar.gz
crawl-ref-216500d13dad04c00521f84045fd6d63ad1a2d55.zip
Document the monster shape query functions
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index aec70ad2d3..a63defedf8 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -4435,6 +4435,11 @@ static mon_body_shape _get_ghost_shape(const monster* mon)
}
}
+/**
+ * Get the monster body shape of the given monster.
+ * @param mon The monster in question.
+ * @returns The mon_body_shape type of this monster.
+ */
mon_body_shape get_mon_shape(const monster* mon)
{
if (mons_is_pghost(mon->type))
@@ -4445,6 +4450,11 @@ mon_body_shape get_mon_shape(const monster* mon)
return get_mon_shape(mon->type);
}
+/**
+ * Get the monster body shape of the given monster type.
+ * @param mon The monster type in question.
+ * @returns The mon_body_shape type of this monster type.
+ */
mon_body_shape get_mon_shape(const monster_type mc)
{
if (mc == MONS_CHAOS_SPAWN)
@@ -4454,6 +4464,11 @@ mon_body_shape get_mon_shape(const monster_type mc)
return smc->shape;
}
+/**
+ * Get a DB lookup string for the given monster body shape.
+ * @param mon The monster body shape type in question.
+ * @returns A DB lookup string for the monster body shape.
+ */
string get_mon_shape_str(const mon_body_shape shape)
{
ASSERT_RANGE(shape, MON_SHAPE_HUMANOID, MON_SHAPE_MISC + 1);