From 09eaca24db28f6182de334fe46267a485812ff58 Mon Sep 17 00:00:00 2001 From: deskull Date: Fri, 27 Dec 2013 13:56:38 +0000 Subject: [PATCH] Add Doxygen comment to bldg.c. --- src/bldg.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 18 deletions(-) diff --git a/src/bldg.c b/src/bldg.c index 11829a9c2..fe2e57449 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -576,7 +576,7 @@ static void display_fruit(int row, int col, int fruit) } } -/* +/*! @note * kpoker no (tyuto-hannpa na)pakuri desu... * joker ha shineru node haitte masen. * @@ -591,12 +591,18 @@ static void display_fruit(int row, int col, int fruit) * 9/13/2000 --Koka * 9/15/2000 joker wo jissou. soreto, code wo sukosi kakikae. --Habu */ -#define SUIT_OF(card) ((card) / 13) -#define NUM_OF(card) ((card) % 13) -#define IS_JOKER(card) ((card) == 52) -static int cards[5]; /* tefuda no card */ +#define SUIT_OF(card) ((card) / 13) /*!< ¥È¥é¥ó¥×¥«¡¼¥É¤Î¥¹¡¼¥È¤òÊÖ¤¹ */ +#define NUM_OF(card) ((card) % 13) /*!< ¥È¥é¥ó¥×¥«¡¼¥É¤ÎÈÖ¹æ¤òÊÖ¤¹ */ +#define IS_JOKER(card) ((card) == 52) /*!< ¥È¥é¥ó¥×¥«¡¼¥É¤¬¥¸¥ç¡¼¥«¡¼¤«¤É¤¦¤«¤òÊÖ¤¹ */ + +static int cards[5]; /*!< ¥Ý¡¼¥«¡¼¤Î¸½ºß¤Î¼ê»¥ID */ +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î»³»¥¤òÀڤ롣 + * @param ¤Ê¤· + * @return ¤Ê¤· + */ static void reset_deck(int deck[]) { int i; @@ -611,6 +617,11 @@ static void reset_deck(int deck[]) } } +/*! + * @brief ¥Ý¡¼¥«¡¼¥×¥ì¥¤Ãæ¤Ë¥¸¥ç¡¼¥«¡¼¤ò»ý¤Ã¤Æ¤¤¤ë¤«¤ÎȽÄê¤òÊÖ¤¹¡£ + * @param ¤Ê¤· + * @return ¥¸¥ç¡¼¥«¡¼¤ò»ý¤Ã¤Æ¤¤¤ë¤«¡£ + */ static bool have_joker(void) { int i; @@ -621,6 +632,11 @@ static bool have_joker(void) return FALSE; } +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¼ê»¥¤Ë³ºÅö¤ÎÈÖ¹æ¤Î»¥¤¬¤¢¤ë¤«¤òÊÖ¤¹¡£ + * @param õ¤·¤¿¤¤¥«¡¼¥É¤ÎÈֹ档 + * @return ³ºÅö¤ÎÈֹ椬¼ê»¥¤Ë¤¢¤ë¤«¡£ + */ static bool find_card_num(int num) { int i; @@ -629,6 +645,11 @@ static bool find_card_num(int num) return FALSE; } +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¼ê»¥¤¬¥Õ¥é¥Ã¥·¥åÌò¤òÆÀ¤Æ¤¤¤ë¤«¤òµ¢¤¹¡£ + * @param ¤Ê¤· + * @return Ìò¤ÎȽÄê·ë²Ì + */ static bool yaku_check_flush(void) { int i, suit; @@ -647,6 +668,11 @@ static bool yaku_check_flush(void) return TRUE; } +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¼ê»¥¤¬¥¹¥È¥ì¡¼¥ÈÌò¤òÆÀ¤Æ¤¤¤ë¤«¤òµ¢¤¹¡£ + * @param ¤Ê¤· + * @return Ìò¤ÎȽÄê·ë²Ì + */ static int yaku_check_straight(void) { int i, lowest = 99; @@ -700,8 +726,10 @@ static int yaku_check_straight(void) return 1; } -/* - * 0:nopair 1:1 pair 2:2 pair 3:3 cards 4:full house 6:4cards +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¥Ú¥¢Ìò¤Î¾õÂÖ¤òÊÖ¤¹¡£ + * @param ¤Ê¤· + * @return 0:nopair 1:1 pair 2:2 pair 3:3 cards 4:full house 6:4cards */ static int yaku_check_pair(void) { @@ -743,17 +771,22 @@ static int yaku_check_pair(void) return matching; } -#define ODDS_5A 3000 -#define ODDS_5C 400 -#define ODDS_RF 200 -#define ODDS_SF 80 -#define ODDS_4C 16 -#define ODDS_FH 12 -#define ODDS_FL 8 -#define ODDS_ST 4 -#define ODDS_3C 1 -#define ODDS_2P 1 +#define ODDS_5A 3000 /*!< ¥Õ¥¡¥¤¥Ö¥¨¡¼¥¹¤ÎÌòÇÜΨ */ +#define ODDS_5C 400 /*!< ¥Õ¥¡¥¤¥Ö¥«¡¼¥É¤ÎÌòÇÜΨ */ +#define ODDS_RF 200 /*!< ¥í¥¤¥ä¥ë¥¹¥È¥ì¡¼¥È¥Õ¥é¥Ã¥·¥å¤ÎÌòÇÜΨ */ +#define ODDS_SF 80 /*!< ¥¹¥È¥ì¡¼¥È¥Õ¥é¥Ã¥·¥å¤ÎÌòÇÜΨ */ +#define ODDS_4C 16 /*!< ¥Õ¥©¥¢¥«¡¼¥É¤ÎÌòÇÜΨ */ +#define ODDS_FH 12 /*!< ¥Õ¥ë¥Ï¥¦¥¹¤ÎÌòÇÜΨ */ +#define ODDS_FL 8 /*!< ¥Õ¥é¥Ã¥·¥å¤ÎÌòÇÜΨ */ +#define ODDS_ST 4 /*!< ¥¹¥È¥ì¡¼¥È¤ÎÌòÇÜΨ */ +#define ODDS_3C 1 /*!< ¥¹¥ê¡¼¥«¡¼¥É¤ÎÌòÇÜΨ */ +#define ODDS_2P 1 /*!< ¥Ä¡¼¥Ú¥¢¤ÎÌòÇÜΨ */ +/*! + * @brief ¥Ý¡¼¥«¡¼¤ÎÌò¤ò¥Á¥§¥Ã¥¯¤·¡¢¤½¤Î·ë²Ì¤ò²èÌ̤Ëɽ¼¨¤·¤Ä¤Ä·ë²Ì¤òÊÖ¤¹¡£ + * @param ¤Ê¤· + * @return Ìò¤ÎID + */ static int yaku_check(void) { prt(" ", 4, 3); @@ -858,6 +891,12 @@ static int yaku_check(void) return 0; } +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¼Î¤Æ¤ë/»Ä¤¹¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤Îɽ¼¨¤ò¹¹¿·¤¹¤ë¡£ + * @param hoge ¥«¡¼¥½¥ë¤Î¸½ºß°ÌÃÖ + * @param kaeruka ¥«¡¼¥É¤Î¼Î¤Æ¤ë/»Ä¤¹¥Õ¥é¥°ÇÛÎó + * @return ¤Ê¤· + */ static void display_kaeruka(int hoge, int kaeruka[]) { int i; @@ -892,7 +931,11 @@ static void display_kaeruka(int hoge, int kaeruka[]) else move_cursor(16, 38); } - +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î¼ê»¥¤òɽ¼¨¤¹¤ë¡£ + * @param ¤Ê¤· + * @return ¤Ê¤· + */ static void display_cards(void) { int i, j; @@ -1140,6 +1183,11 @@ static void display_cards(void) } } +/*! + * @brief ¥Ý¡¼¥«¡¼¤Î£±¥×¥ì¥¤¥ë¡¼¥Á¥ó¡£ + * @param ¤Ê¤· + * @return £±¥×¥ì¥¤¤ÎÌò¤Î·ë²Ì + */ static int do_poker(void) { int i, k = 2; -- 2.11.0