OSDN Git Service

Add Doxygen comment to flavor.c.
authordeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 3 Jan 2014 14:17:07 +0000 (14:17 +0000)
committerdeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 3 Jan 2014 14:17:07 +0000 (14:17 +0000)
src/flavor.c

index 1f5c3c9..75d7fc1 100644 (file)
@@ -255,36 +255,39 @@ static void shuffle_flavors(byte tval)
        C_KILL(k_idx_list, max_k_idx, s16b);
 }
 
-/*
- * Prepare the "variable" part of the "k_info" array.
- *
- * The "color"/"metal"/"type" of an item is its "flavor".
- * For the most part, flavors are assigned randomly each game.
- *
- * Initialize descriptions for the "colored" objects, including:
- * Rings, Amulets, Staffs, Wands, Rods, Food, Potions, Scrolls.
- *
- * The first 4 entries for potions are fixed (Water, Apple Juice,
- * Slime Mold Juice, Unused Potion).
- *
- * Scroll titles are always between 6 and 14 letters long.  This is
- * ensured because every title is composed of whole words, where every
- * word is from 1 to 8 letters long (one or two syllables of 1 to 4
- * letters each), and that no scroll is finished until it attempts to
- * grow beyond 15 letters.  The first time this can happen is when the
- * current title has 6 letters and the new word has 8 letters, which
- * would result in a 6 letter scroll title.
- *
- * Duplicate titles are avoided by requiring that no two scrolls share
- * the same first four letters (not the most efficient method, and not
- * the least efficient method, but it will always work).
- *
- * Hack -- make sure everything stays the same for each saved game
- * This is accomplished by the use of a saved "random seed", as in
- * "town_gen()".  Since no other functions are called while the special
- * seed is in effect, so this function is pretty "safe".
- *
- * Note that the "hacked seed" may provide an RNG with alternating parity!
+/*!
+ * @brief ¥²¡¼¥à³«»Ï»þ¤Ë¹Ô¤ï¤ì¤ë¥Ù¡¼¥¹¥¢¥¤¥Æ¥à¤Î½é´ü²½¥ë¡¼¥Á¥ó / Prepare the "variable" part of the "k_info" array.
+ * @return ¤Ê¤·
+ * @details
+ * Prepare the "variable" part of the "k_info" array.\n
+ *\n
+ * The "color"/"metal"/"type" of an item is its "flavor".\n
+ * For the most part, flavors are assigned randomly each game.\n
+ *\n
+ * Initialize descriptions for the "colored" objects, including:\n
+ * Rings, Amulets, Staffs, Wands, Rods, Food, Potions, Scrolls.\n
+ *\n
+ * The first 4 entries for potions are fixed (Water, Apple Juice,\n
+ * Slime Mold Juice, Unused Potion).\n
+ *\n
+ * Scroll titles are always between 6 and 14 letters long.  This is\n
+ * ensured because every title is composed of whole words, where every\n
+ * word is from 1 to 8 letters long (one or two syllables of 1 to 4\n
+ * letters each), and that no scroll is finished until it attempts to\n
+ * grow beyond 15 letters.  The first time this can happen is when the\n
+ * current title has 6 letters and the new word has 8 letters, which\n
+ * would result in a 6 letter scroll title.\n
+ *\n
+ * Duplicate titles are avoided by requiring that no two scrolls share\n
+ * the same first four letters (not the most efficient method, and not\n
+ * the least efficient method, but it will always work).\n
+ *\n
+ * Hack -- make sure everything stays the same for each saved game\n
+ * This is accomplished by the use of a saved "random seed", as in\n
+ * "town_gen()".  Since no other functions are called while the special\n
+ * seed is in effect, so this function is pretty "safe".\n
+ *\n
+ * Note that the "hacked seed" may provide an RNG with alternating parity!\n
  */
 void flavor_init(void)
 {
@@ -358,9 +361,14 @@ void flavor_init(void)
 }
 
 
-/*
- * Print a char "c" into a string "t", as if by sprintf(t, "%c", c),
- * and return a pointer to the terminator (t + 1).
+/*!
+ * @brief ÂоÝʸ»úÇÛÎó¤Ë°ìʸ»ú¤À¤±¤ò¥³¥Ô¡¼¤¹¤ë¡£
+ * @param t ÊÝ´ÉÀèʸ»úÎó¥Ý¥¤¥ó¥¿
+ * @param c Êݴɤ·¤¿¤¤1ʸ»ú
+ * @return ¤Ê¤·
+ * @details
+ * Print a char "c" into a string "t", as if by sprintf(t, "%c", c),\n
+ * and return a pointer to the terminator (t + 1).\n
  */
 static char *object_desc_chr(char *t, char c)
 {
@@ -374,8 +382,12 @@ static char *object_desc_chr(char *t, char c)
        return (t);
 }
 
-
-/*
+/*!
+ * @brief ÂоÝʸ»úÇÛÎó¤Ëʸ»úÎó¤ò¥³¥Ô¡¼¤¹¤ë¡£
+ * @param t ÊÝ´ÉÀèʸ»úÎó¥Ý¥¤¥ó¥¿
+ * @param c ¥³¥Ô¡¼¤·¤¿¤¤Ê¸»úÎó¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ * @details
  * Print a string "s" into a string "t", as if by strcpy(t, s),
  * and return a pointer to the terminator.
  */
@@ -391,9 +403,12 @@ static char *object_desc_str(char *t, cptr s)
        return (t);
 }
 
-
-
-/*
+/*!
+ * @brief ÂоÝʸ»úÇÛÎó¤ËÉä¹æ¤Ê¤·À°¿ôÃͤò¥³¥Ô¡¼¤¹¤ë¡£
+ * @param t ÊÝ´ÉÀèʸ»úÎó¥Ý¥¤¥ó¥¿
+ * @param n ¥³¥Ô¡¼¤·¤¿¤¤¿ôÃÍ
+ * @return ¤Ê¤·
+ * @details
  * Print an unsigned number "n" into a string "t", as if by
  * sprintf(t, "%u", n), and return a pointer to the terminator.
  */
@@ -428,11 +443,14 @@ static char *object_desc_num(char *t, uint n)
 
 
 #ifdef JP
-/*
- * ÆüËܸì¤Î¸Ä¿ôɽ¼¨¥ë¡¼¥Á¥ó
- *¡Êcmd1.c ¤ÇήÍѤ¹¤ë¤¿¤á¤Ë object_desc_japanese ¤«¤é°ÜÆ°¤·¤¿¡£¡Ë
+/*!
+ * @brief ÆüËܸì¤Î¸Ä¿ôɽ¼¨¥ë¡¼¥Á¥ó
+ * @param t ÊÝ´ÉÀèʸ»úÎó¥Ý¥¤¥ó¥¿
+ * @param o_ptr µ­½Ò¤·¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ * @details
+ * cmd1.c ¤ÇήÍѤ¹¤ë¤¿¤á¤Ë object_desc_japanese ¤«¤é°ÜÆ°¤·¤¿¡£
  */
-
 char *object_desc_kosuu(char *t, object_type *o_ptr)
 {
     t = object_desc_num(t, o_ptr->number);
@@ -528,7 +546,12 @@ char *object_desc_kosuu(char *t, object_type *o_ptr)
 }
 #endif
 
-/*
+/*!
+ * @brief ÂоÝʸ»úÇÛÎó¤ËÉä¹æ¤¢¤êÀ°¿ôÃͤò¥³¥Ô¡¼¤¹¤ë¡£
+ * @param t ÊÝ´ÉÀèʸ»úÎó¥Ý¥¤¥ó¥¿
+ * @param n ¥³¥Ô¡¼¤·¤¿¤¤¿ôÃÍ
+ * @return ¤Ê¤·
+ * @details
  * Print an signed number "v" into a string "t", as if by
  * sprintf(t, "%+d", n), and return a pointer to the terminator.
  * Note that we always print a sign, either "+" or "-".
@@ -581,10 +604,9 @@ static char *object_desc_int(char *t, sint v)
 }
 
 
-/*
- * Structs and tables for Auto Inscription for flags
+/*!
+ * ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤Î¹½Â¤ÂΠ/ Structs and tables for Auto Inscription for flags
  */
-
 typedef struct flag_insc_table
 {
 #ifdef JP
@@ -596,6 +618,7 @@ typedef struct flag_insc_table
 } flag_insc_table;
 
 #ifdef JP
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(pvalÍ×ÁÇ) */
 static flag_insc_table flag_insc_plus[] =
 {
        { "¹¶", "At", TR_BLOWS, -1 },
@@ -614,6 +637,7 @@ static flag_insc_table flag_insc_plus[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(ÌȱÖ) */
 static flag_insc_table flag_insc_immune[] =
 {
        { "»À", "Ac", TR_IM_ACID, -1 },
@@ -623,6 +647,7 @@ static flag_insc_table flag_insc_immune[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(ÂÑÀ­) */
 static flag_insc_table flag_insc_resistance[] =
 {
        { "»À", "Ac", TR_RES_ACID, TR_IM_ACID },
@@ -644,6 +669,7 @@ static flag_insc_table flag_insc_resistance[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(¤½¤Î¾ÆÃÀ­) */
 static flag_insc_table flag_insc_misc[] =
 {
        { "°×", "Es", TR_EASY_SPELL, -1 },
@@ -674,6 +700,7 @@ static flag_insc_table flag_insc_misc[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(¥ª¡¼¥é) */
 static flag_insc_table flag_insc_aura[] =
 {
        { "±ê", "F", TR_SH_FIRE, -1 },
@@ -684,6 +711,7 @@ static flag_insc_table flag_insc_aura[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(°À­¥¹¥ì¥¤) */
 static flag_insc_table flag_insc_brand[] =
 {
        { "»À", "A", TR_BRAND_ACID, -1 },
@@ -699,6 +727,7 @@ static flag_insc_table flag_insc_brand[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(¼ï²¥¹¥ì¥¤) */
 static flag_insc_table flag_insc_kill[] =
 {
        { "¼Ù", "*", TR_KILL_EVIL, -1 },
@@ -713,6 +742,7 @@ static flag_insc_table flag_insc_kill[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(¼ï²*¥¹¥ì¥¤*) */
 static flag_insc_table flag_insc_slay[] =
 {
        { "¼Ù", "*", TR_SLAY_EVIL, TR_KILL_EVIL },
@@ -727,6 +757,7 @@ static flag_insc_table flag_insc_slay[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(ESP1) */
 static flag_insc_table flag_insc_esp1[] =
 {
        { "´¶", "Tele", TR_TELEPATHY, -1 },
@@ -737,6 +768,7 @@ static flag_insc_table flag_insc_esp1[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(ESP2) */
 static flag_insc_table flag_insc_esp2[] =
 {
        { "¿Í", "p", TR_ESP_HUMAN, -1 },
@@ -750,6 +782,7 @@ static flag_insc_table flag_insc_esp2[] =
        { NULL, NULL, 0, -1 }
 };
 
+/*! ¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆÃÀ­É½¼¨µ­¹æ¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ(ǽÎÏ°Ý»ý) */
 static flag_insc_table flag_insc_sust[] =
 {
        { "ÏÓ", "St", TR_SUST_STR, -1 },