OSDN Git Service

Add Doxygen comment to snipe.c.
authordeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 18 Jan 2014 05:54:11 +0000 (05:54 +0000)
committerdeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 18 Jan 2014 05:54:11 +0000 (05:54 +0000)
src/snipe.c

index 398b16e..eda904e 100644 (file)
@@ -1,8 +1,19 @@
+/*!
+ * @file snipe.c
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¤Î¼ÂÁõ / Sniping
+ * @date 2014/01/18
+ * @author
+ * 2014 Deskull rearranged comment for Doxygen.\n
+ */
+
 #include "angband.h"
 
 #define MAX_SNIPE_POWERS 16
 
+/*! ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¾ðÊó¤Îtypedef */
 typedef struct snipe_power snipe_power;
+
+/*! ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¾ðÊó¤Î¹½Â¤ÂΠ*/
 struct snipe_power
 {
        int     min_lev;
@@ -10,6 +21,7 @@ struct snipe_power
        const char *name;
 };
 
+/*! ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¤Î²òÀâ¥á¥Ã¥»¡¼¥¸ */
 static const char *snipe_tips[MAX_SNIPE_POWERS] =
 {
 #ifdef JP
@@ -49,6 +61,7 @@ static const char *snipe_tips[MAX_SNIPE_POWERS] =
 #endif
 };
 
+/*! ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¥Æ¡¼¥Ö¥ë */
 snipe_power snipe_powers[MAX_SNIPE_POWERS] =
 {
        /* Level gained,  cost,  name */
@@ -89,7 +102,10 @@ snipe_power snipe_powers[MAX_SNIPE_POWERS] =
 #endif
 };
 
-
+/*! 
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼¤Î½¸ÃæÅٲû»
+ * @return ¾ï¤ËTRUE¤òÊÖ¤¹
+ */
 static bool snipe_concentrate(void)
 {
        if ((int)p_ptr->concent < (2 + (p_ptr->lev + 5) / 10)) p_ptr->concent++;
@@ -113,6 +129,11 @@ static bool snipe_concentrate(void)
        return (TRUE);
 }
 
+/*! 
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼¤Î½¸ÃæÅ٥ꥻ¥Ã¥È
+ * @param msg TRUE¤Ê¤é¤Ð¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤¹¤ë
+ * @return ¤Ê¤·
+ */
 void reset_concentration(bool msg)
 {
        if (msg)
@@ -136,6 +157,11 @@ void reset_concentration(bool msg)
        p_ptr->update |= (PU_MONSTERS);
 }
 
+/*! 
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼¤Î½¸ÃæÅ٤ˤè¤ë¥À¥á¡¼¥¸¥Ü¡¼¥Ê¥¹¤ò²Ã»»¤¹¤ë
+ * @param tdam »»½ÐÃæ¤Î¥À¥á¡¼¥¸
+ * @return ½¸ÃæÅÙ½¤Àµ¤ò²Ã¤¨¤¿¥À¥á¡¼¥¸
+ */
 int boost_concentration_damage(int tdam)
 {
        tdam *= (10 + p_ptr->concent);
@@ -144,6 +170,10 @@ int boost_concentration_damage(int tdam)
        return (tdam);
 }
 
+/*! 
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼¤Îµ»Ç½¥ê¥¹¥È¤òɽ¼¨¤¹¤ë
+ * @return ¤Ê¤·
+ */
 void display_snipe_list(void)
 {
        int             i;
@@ -181,19 +211,23 @@ void display_snipe_list(void)
 }
 
 
-/*
- * Allow user to choose a mindcrafter power.
- *
- * If a valid spell is chosen, saves it in '*sn' and returns TRUE
- * If the user hits escape, returns FALSE, and set '*sn' to -1
- * If there are no legal choices, returns FALSE, and sets '*sn' to -2
- *
- * The "prompt" should be "cast", "recite", or "study"
- * The "known" should be TRUE for cast/pray, FALSE for study
- *
- * nb: This function has a (trivial) display bug which will be obvious
- * when you run it. It's probably easy to fix but I haven't tried,
- * sorry.
+/*! 
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¤òÁªÂò¤¹¤ë
+ * @param sn ÁªÂò¤·¤¿Æü쵻ǽID¡¢¥­¥ã¥ó¥»¥ë¤Î¾ì¹ç-1¡¢ÉÔÀµ¤ÊÁªÂò¤Î¾ì¹ç-2¤òÊÖ¤¹
+ * @param only_browse °ìÍ÷¤ò¸«¤ë¤À¤±¤Î¾ì¹çTRUE¤òÊÖ¤¹
+ * @return È¯Æ°²Äǽ¤ÊËâË¡¤òÁªÂò¤·¤¿¾ì¹çTRUE¡¢¥­¥ã¥ó¥»¥ë½èÍý¤«ÉÔÀµ¤ÊÁªÂò¤¬¹Ô¤ï¤ì¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
+ * Allow user to choose a mindcrafter power.\n
+ *\n
+ * If a valid spell is chosen, saves it in '*sn' and returns TRUE\n
+ * If the user hits escape, returns FALSE, and set '*sn' to -1\n
+ * If there are no legal choices, returns FALSE, and sets '*sn' to -2\n
+ *\n
+ * The "prompt" should be "cast", "recite", or "study"\n
+ * The "known" should be TRUE for cast/pray, FALSE for study\n
+ *\n
+ * nb: This function has a (trivial) display bug which will be obvious\n
+ * when you run it. It's probably easy to fix but I haven't tried,\n
+ * sorry.\n
  */
 static int get_snipe_power(int *sn, bool only_browse)
 {
@@ -402,8 +436,16 @@ static int get_snipe_power(int *sn, bool only_browse)
        return (TRUE);
 }
 
-
-int tot_dam_aux_snipe (int mult, monster_type *m_ptr)
+/*!
+ * @brief ¥¹¥Ê¥¤¥Ð¡¼µ»Ç½¤Î¥¹¥ì¥¤ÇÜΨ·×»»¤ò¹Ô¤¦ /
+ * Calcurate magnification of snipe technics
+ * @param mult ¥¹¥Ê¥¤¥Ð¡¼µ»Ç½¤Î¥¹¥ì¥¤¸ú²Ì°ÊÁ°¤Ë»»½Ð¤·¤Æ¤¤¤ë¿Í×ÁǤÎÇÜΨ(/10ÇÜ)
+ * @param flgs ¥¹¥Ê¥¤¥Ð¡¼µ»Ç½¤Ë»ÈÍѤ¹¤ëÉð´ï¤Î¥¹¥ì¥¤¥Õ¥é¥°ÇÛÎó
+ * @param m_ptr ÌÜɸ¤È¤Ê¤ë¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param mode ¥¹¥Ê¥¤¥Ð¡¼µ»Ç½¤Î¥¹¥ì¥¤·¿ID
+ * @return ¥¹¥ì¥¤¤ÎÇÜΨ(/10ÇÜ)
+ */
+int tot_dam_aux_snipe(int mult, monster_type *m_ptr)
 {
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
        bool seen = is_seen(m_ptr);
@@ -494,9 +536,12 @@ int tot_dam_aux_snipe (int mult, monster_type *m_ptr)
        return (mult);
 }
 
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+
+/*!
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¤Îȯư /
+ * do_cmd_cast calls this function if the player's class is 'snipe'.
+ * @param spell È¯Æ°¤¹¤ëÆü쵻ǽ¤ÎID
+ * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤éTRUE¡¢¥­¥ã¥ó¥»¥ë¤·¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
  */
 static bool cast_sniper_spell(int spell)
 {
@@ -549,10 +594,9 @@ static bool cast_sniper_spell(int spell)
        return (is_fired);
 }
 
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+/*!
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @return ¤Ê¤·
  */
 void do_cmd_snipe(void)
 {
@@ -614,9 +658,9 @@ void do_cmd_snipe(void)
        p_ptr->window |= (PW_SPELL);
 }
 
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
+/*!
+ * @brief ¥¹¥Ê¥¤¥Ñ¡¼µ»Ç½¥³¥Þ¥ó¥É¤Îɽ¼¨ /
+ * @return ¤Ê¤·
  */
 void do_cmd_snipe_browse(void)
 {