OSDN Git Service

Add Doxygen comment to cmd2.c.
authordeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 22 Jan 2014 11:19:06 +0000 (11:19 +0000)
committerdeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 22 Jan 2014 11:19:06 +0000 (11:19 +0000)
src/cmd2.c

index b97e258..3ae85c9 100644 (file)
@@ -1450,6 +1450,8 @@ static bool do_cmd_close_aux(int y, int x)
 /*!
  * @brief ¡ÖÊĤ¸¤ë¡×¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Close an open door.
+ * @param y Âоݤò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x Âоݤò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
  * @return ¤Ê¤·
  * @details
  * Unlocking a locked door/chest is worth one experience point.
@@ -1549,8 +1551,12 @@ void do_cmd_close(void)
 }
 
 
-/*
+/*!
+ * @brief ¡Ö·¡¤ë¡×¥³¥Þ¥ó¥É¤ò³ºÅö¤Î¥Þ¥¹¤Ë¹Ô¤¨¤ë¤«¤ÎȽÄê¤È·ë²Ì¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨ /
  * Determine if a given grid may be "tunneled"
+ * @param y Âоݤò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x Âоݤò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
+ * @return 
  */
 static bool do_cmd_tunnel_test(int y, int x)
 {
@@ -1589,13 +1595,15 @@ static bool do_cmd_tunnel_test(int y, int x)
 }
 
 
-/*
+/*!
+ * @brief ¡Ö·¡¤ë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
  * Perform the basic "tunnel" command
- *
+ * @param y Âоݤò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x Âоݤò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
+ * @return ¼ÂºÝ¤Ë½èÍý¤¬¹Ô¤ï¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
  * Assumes that no monster is blocking the destination
- *
  * Do not use twall anymore
- *
  * Returns TRUE if repeated commands may continue
  */
 static bool do_cmd_tunnel_aux(int y, int x)
@@ -1752,14 +1760,18 @@ static bool do_cmd_tunnel_aux(int y, int x)
 }
 
 
-/*
+/*!
+ * @brief ¡Ö·¡¤ë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Tunnels through "walls" (including rubble and closed doors)
- *
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * Note that you must tunnel in order to hit invisible monsters
  * in walls, though moving into walls still takes a turn anyway.
  *
  * Digging is very difficult without a "digger" weapon, but can be
  * accomplished by strong players using heavy weapons.
+ * </pre>
  */
 void do_cmd_tunnel(void)
 {
@@ -1855,15 +1867,19 @@ void do_cmd_tunnel(void)
 
 #ifdef ALLOW_EASY_OPEN /* TNB */
 
-/*
+/*!
+ * @brief °ÜÆ°½èÍý¤Ë¤è¤ë´Ê°×¤Ê¡Ö³«¤¯¡×½èÍý /
  * easy_open_door --
- *
+ * @return ³«¤¯½èÍý¤¬¼ÂºÝ¤Ë»î¤ß¤é¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @details
+ * <pre>
  *     If there is a jammed/closed/locked door at the given location,
  *     then attempt to unlock/open it. Return TRUE if an attempt was
  *     made (successful or not), otherwise return FALSE.
  *
  *     The code here should be nearly identical to that in
  *     do_cmd_open_test() and do_cmd_open_aux().
+ * </pre>
  */
 bool easy_open_door(int y, int x)
 {
@@ -1963,14 +1979,19 @@ bool easy_open_door(int y, int x)
 #endif /* ALLOW_EASY_OPEN -- TNB */
 
 
-/*
+/*!
+ * @brief È¢¤Î¥È¥é¥Ã¥×¤ò²ò½ü¤¹¤ë¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Perform the basic "disarm" command
- *
+ * @param y ²ò½ü¤ò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x ²ò½ü¤ò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
+ * @param o_idx È¢¤Î¥ª¥Ö¥¸¥§¥¯¥ÈID
+ * @return ¥¿¡¼¥ó¤ò¾ÃÈñ¤¹¤ë½èÍý¤¬¹Ô¤ï¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @details
+ * <pre>
  * Assume destination is a visible trap
- *
  * Assume there is no monster blocking the destination
- *
  * Returns TRUE if repeated commands may continue
+ * </pre>
  */
 static bool do_cmd_disarm_chest(int y, int x, s16b o_idx)
 {
@@ -2075,14 +2096,19 @@ static bool do_cmd_disarm_chest(int y, int x, s16b o_idx)
 }
 
 
-/*
+/*!
+ * @brief È¢¤Î¥È¥é¥Ã¥×¤ò²ò½ü¤¹¤ë¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
  * Perform the basic "disarm" command
- *
+ * @param y ²ò½ü¤ò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x ²ò½ü¤ò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
+ * @param dir ¥×¥ì¥¤¥ä¡¼¤«¤é¤ß¤¿Êý¸þID
+ * @return ¥¿¡¼¥ó¤ò¾ÃÈñ¤¹¤ë½èÍý¤¬¹Ô¤ï¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ * @details
+ * <pre>
  * Assume destination is a visible trap
- *
  * Assume there is no monster blocking the destination
- *
  * Returns TRUE if repeated commands may continue
+ * </pre>
  */
 #ifdef ALLOW_EASY_DISARM /* TNB */
 
@@ -2200,8 +2226,10 @@ static bool do_cmd_disarm_aux(int y, int x, int dir)
 }
 
 
-/*
+/*!
+ * @brief È¢¡¢¾²¤Î¥È¥é¥Ã¥×²ò½ü½èÍýÁÐÊý¤ÎÅý¹ç¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Disarms a trap, or chest
+ * @return ¤Ê¤·
  */
 void do_cmd_disarm(void)
 {
@@ -2319,14 +2347,19 @@ void do_cmd_disarm(void)
 }
 
 
-/*
+/*!
+ * @brief ¡ÖÂǤÁÇˤë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
  * Perform the basic "bash" command
- *
+ * @param y Âоݤò¹Ô¤¦¥Þ¥¹¤ÎYºÂɸ
+ * @param x Âоݤò¹Ô¤¦¥Þ¥¹¤ÎXºÂɸ
+ * @param dir ¥×¥ì¥¤¥ä¡¼¤«¤é¸«¤¿¥¿¡¼¥²¥Ã¥È¤ÎÊý³ÑID
+ * @return ¼ÂºÝ¤Ë½èÍý¤¬¹Ô¤ï¤ì¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
+ * <pre>
  * Assume destination is a closed/locked/jammed door
- *
  * Assume there is no monster blocking the destination
- *
  * Returns TRUE if repeated commands may continue
+ * </pre>
  */
 static bool do_cmd_bash_aux(int y, int x, int dir)
 {
@@ -2430,9 +2463,12 @@ static bool do_cmd_bash_aux(int y, int x, int dir)
 }
 
 
-/*
+/*!
+ * @brief ¡ÖÂǤÁÇˤë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Bash open a door, success based on character strength
- *
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * For a closed door, pval is positive if locked; negative if stuck.
  *
  * For an open door, pval is positive for a broken door.
@@ -2443,6 +2479,7 @@ static bool do_cmd_bash_aux(int y, int x, int dir)
  * be bashed. A closed door can be jammed (see do_cmd_spike()).
  *
  * Creatures can also open or bash doors, see elsewhere.
+ * </pre>
  */
 void do_cmd_bash(void)
 {
@@ -2529,7 +2566,11 @@ void do_cmd_bash(void)
 }
 
 
-/*
+/*!
+ * @brief ÆÃÄê¤Î¥Þ¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¤¿¤á¤ÎÈÆÍÑŪ¥³¥Þ¥ó¥É
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * Manipulate an adjacent grid in some way
  *
  * Attack monsters, tunnel through walls, disarm traps, open doors.
@@ -2538,6 +2579,7 @@ void do_cmd_bash(void)
  *
  * This command must always take a turn, to prevent free detection
  * of invisible monsters.
+ * </pre>
  */
 void do_cmd_alter(void)
 {
@@ -2641,10 +2683,16 @@ void do_cmd_alter(void)
 }
 
 
-/*
+
+/*!
+ * @brief ¡Ö¤¯¤µ¤Ó¤òÂǤġפ¿¤á¤ËɬÍפʥª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¤«¤É¤¦¤«¤ÎȽÄê¤òÊÖ¤¹ /
  * Find the index of some "spikes", if possible.
- *
+ * @param ip ¤¯¤µ¤Ó¤È¤·¤ÆÂǤƤ륪¥Ö¥¸¥§¥¯¥È¤ÎID
+ * @return ¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ë¾ì¹çTRUE¤òÊÖ¤¹
+ * @details
+ * <pre>
  * XXX XXX XXX Let user choose a pile of spikes, perhaps?
+ * </pre>
  */
 static bool get_spike(int *ip)
 {
@@ -2674,10 +2722,14 @@ static bool get_spike(int *ip)
 }
 
 
-/*
+/*!
+ * @brief ¡Ö¤¯¤µ¤Ó¤òÂǤġ×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Jam a closed door with a spike
- *
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
  * This command may NOT be repeated
+ * </pre>
  */
 void do_cmd_spike(void)
 {
@@ -2770,8 +2822,11 @@ void do_cmd_spike(void)
 
 
 
-/*
+/*!
+ * @brief ¡ÖÊ⤯¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Support code for the "Walk" and "Jump" commands
+ * @param pickup ¥¢¥¤¥Æ¥à¤Î¼«Æ°½¦¤¤¤ò¹Ô¤¦¤Ê¤éTRUE
+ * @return ¤Ê¤·
  */
 void do_cmd_walk(bool pickup)
 {
@@ -2848,9 +2903,10 @@ void do_cmd_walk(bool pickup)
 }
 
 
-
-/*
+/*!
+ * @brief ¡ÖÁö¤ë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Start running.
+ * @return ¤Ê¤·
  */
 void do_cmd_run(void)
 {
@@ -2885,10 +2941,12 @@ void do_cmd_run(void)
 }
 
 
-
-/*
+/*!
+ * @brief ¡Öα¤Þ¤ë¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Stay still.  Search.  Enter stores.
  * Pick up treasure if "pickup" is true.
+ * @param pickup ¥¢¥¤¥Æ¥à¤Î¼«Æ°½¦¤¤¤ò¹Ô¤¦¤Ê¤éTRUE
+ * @return ¤Ê¤·
  */
 void do_cmd_stay(bool pickup)
 {
@@ -2916,8 +2974,10 @@ void do_cmd_stay(bool pickup)
 
 
 
-/*
+/*!
+ * @brief ¡ÖµÙ¤à¡×Æ°ºî¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
  * Resting allows a player to safely restore his hp    -RAK-
+ * @return ¤Ê¤·
  */
 void do_cmd_rest(void)
 {