diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2011-01-23 16:28:04 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2011-01-23 16:28:04 +1000 |
commit | f65600405fc8f836e7d292a9e21e8e83644e28ba (patch) | |
tree | afa1ffaf9c48d8123c23b87e09bed8d8622aa91a /crawl-ref/source/orb.cc | |
parent | b0dace13a70a14c8367a896f5e2b865289609e63 (diff) | |
download | crawl-ref-f65600405fc8f836e7d292a9e21e8e83644e28ba.tar.gz crawl-ref-f65600405fc8f836e7d292a9e21e8e83644e28ba.zip |
Doxygen: document orb.cc
Diffstat (limited to 'crawl-ref/source/orb.cc')
-rw-r--r-- | crawl-ref/source/orb.cc | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/crawl-ref/source/orb.cc b/crawl-ref/source/orb.cc index 2e8308dffa..8069d37775 100644 --- a/crawl-ref/source/orb.cc +++ b/crawl-ref/source/orb.cc @@ -1,7 +1,10 @@ -/* +/** + * @file + * @section DESCRIPTION + * * File: orb.cc * Summary: Orb-related functionality. - */ +**/ #include "AppHdr.h" @@ -11,9 +14,21 @@ #include "shout.h" #include "view.h" -// Return true if it was an "actual" noise, flavour-wise. +/** + * Make a "noise" caused by the orb. + * + * Alerts monsters via fake_noisy. If the area is silenced, perform a "flashing + * lights" visual effect. + * + * @param where The location the "noise" comes from. + * @param loudness The loudness of the noise, determining distance travelled. + * @returns True if the area was unsilenced and thus an actual noise + * occurred, otherwise false, denoting that flashing lights + * occurred. +**/ bool orb_noise (const coord_def& where, int loudness) { + // XXX: Fake noisy doesn't work. Oops. fake_noisy(loudness, where); if (silenced(where)) @@ -29,6 +44,17 @@ bool orb_noise (const coord_def& where, int loudness) return (true); } +/** + * Make a "noise" upon picking up the orb. + * + * Calls orb_noise(where, loudness), and, depending on the result of that + * function, prints one of two messages. + * + * @param where Passed to orb_noise. + * @param loudness Passed to orb_noise. + * @param msg The message to be printed if orb_noise returned true. + * @param msg2 The message to be printed if orb_noise returned false. +**/ void orb_pickup_noise (const coord_def& where, int loudness, const char* msg, const char* msg2) { if (orb_noise(where, loudness)) |