リビジョン | 7f97b606d653a38b01c3c70560a4a76260218736 (tree) |
---|---|
日時 | 2014-01-16 19:57:29 |
作者 | deskull <deskull@0568...> |
コミッター | deskull |
Fix Doxygen warning in mspell3.c.
@@ -1,19 +1,25 @@ | ||
1 | -/* File: mspells3.c */ | |
2 | - | |
3 | -/* | |
4 | - * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke | |
5 | - * | |
6 | - * This software may be copied and distributed for educational, research, | |
7 | - * and not for profit purposes provided that this copyright and statement | |
8 | - * are included in all such copies. Other copyrights may also apply. | |
1 | +/*! | |
2 | + * @file mspells3.c | |
3 | + * @brief 青魔法の処理実装 / Blue magic | |
4 | + * @date 2014/01/15 | |
5 | + * @author | |
6 | + * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n | |
7 | + * This software may be copied and distributed for educational, research,\n | |
8 | + * and not for profit purposes provided that this copyright and statement\n | |
9 | + * are included in all such copies. Other copyrights may also apply.\n | |
10 | + * 2014 Deskull rearranged comment for Doxygen.\n | |
9 | 11 | */ |
10 | 12 | |
11 | -/* Purpose: Imitation code */ | |
12 | - | |
13 | 13 | #include "angband.h" |
14 | 14 | |
15 | -#define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) | |
15 | +#define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< モンスター魔法をプレイヤーが使用する場合の換算レベル */ | |
16 | 16 | |
17 | +/*! | |
18 | + * @brief 受け取ったモンスター魔法のIDに応じて青魔法の効果情報をまとめたフォーマットを返す | |
19 | + * @param p 情報を返す文字列参照ポインタ | |
20 | + * @param power モンスター魔法のID | |
21 | + * @return なし | |
22 | + */ | |
17 | 23 | static void learned_info(char *p, int power) |
18 | 24 | { |
19 | 25 | int plev = pseudo_plev(); |
@@ -235,19 +241,22 @@ static void learned_info(char *p, int power) | ||
235 | 241 | } |
236 | 242 | |
237 | 243 | |
238 | -/* | |
244 | +/*! | |
245 | + * @brief 使用可能な青魔法を選択する / | |
239 | 246 | * Allow user to choose a imitation. |
240 | - * | |
241 | - * If a valid spell is chosen, saves it in '*sn' and returns TRUE | |
242 | - * If the user hits escape, returns FALSE, and set '*sn' to -1 | |
243 | - * If there are no legal choices, returns FALSE, and sets '*sn' to -2 | |
244 | - * | |
245 | - * The "prompt" should be "cast", "recite", or "study" | |
246 | - * The "known" should be TRUE for cast/pray, FALSE for study | |
247 | - * | |
248 | - * nb: This function has a (trivial) display bug which will be obvious | |
249 | - * when you run it. It's probably easy to fix but I haven't tried, | |
250 | - * sorry. | |
247 | + * @param sn 選択したモンスター攻撃ID、キャンセルの場合-1、不正な選択の場合-2を返す | |
248 | + * @return 発動可能な魔法を選択した場合TRUE、キャンセル処理か不正な選択が行われた場合FALSEを返す。 | |
249 | + * @details | |
250 | + * If a valid spell is chosen, saves it in '*sn' and returns TRUE\n | |
251 | + * If the user hits escape, returns FALSE, and set '*sn' to -1\n | |
252 | + * If there are no legal choices, returns FALSE, and sets '*sn' to -2\n | |
253 | + *\n | |
254 | + * The "prompt" should be "cast", "recite", or "study"\n | |
255 | + * The "known" should be TRUE for cast/pray, FALSE for study\n | |
256 | + *\n | |
257 | + * nb: This function has a (trivial) display bug which will be obvious\n | |
258 | + * when you run it. It's probably easy to fix but I haven't tried,\n | |
259 | + * sorry.\n | |
251 | 260 | */ |
252 | 261 | static int get_learned_power(int *sn) |
253 | 262 | { |
@@ -680,9 +689,12 @@ put_str("MP | ||
680 | 689 | } |
681 | 690 | |
682 | 691 | |
683 | -/* | |
684 | - * do_cmd_cast calls this function if the player's class | |
685 | - * is 'imitator'. | |
692 | +/*! | |
693 | + * @brief 青魔法の発動 / | |
694 | + * do_cmd_cast calls this function if the player's class is 'blue-mage'. | |
695 | + * @param spell 発動するモンスター攻撃のID | |
696 | + * @param success TRUEは成功時、FALSEは失敗時の処理を行う | |
697 | + * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。 | |
686 | 698 | */ |
687 | 699 | static bool cast_learned_spell(int spell, bool success) |
688 | 700 | { |
@@ -1887,10 +1899,10 @@ msg_print("No one have appeared."); | ||
1887 | 1899 | return TRUE; |
1888 | 1900 | } |
1889 | 1901 | |
1890 | - | |
1891 | -/* | |
1892 | - * do_cmd_cast calls this function if the player's class | |
1893 | - * is 'Blue-Mage'. | |
1902 | +/*! | |
1903 | + * @brief 青魔法コマンドのメインルーチン / | |
1904 | + * do_cmd_cast calls this function if the player's class is 'Blue-Mage'. | |
1905 | + * @return 処理を実行したらTRUE、キャンセルした場合FALSEを返す。 | |
1894 | 1906 | */ |
1895 | 1907 | bool do_cmd_cast_learned(void) |
1896 | 1908 | { |
@@ -2059,6 +2071,11 @@ msg_print(" | ||
2059 | 2071 | return TRUE; |
2060 | 2072 | } |
2061 | 2073 | |
2074 | +/*! | |
2075 | + * @brief 青魔法のラーニング判定と成功した場合のラーニング処理 | |
2076 | + * @param monspell ラーニングを試みるモンスター攻撃のID | |
2077 | + * @return なし | |
2078 | + */ | |
2062 | 2079 | void learn_spell(int monspell) |
2063 | 2080 | { |
2064 | 2081 | if (p_ptr->action != ACTION_LEARN) return; |
@@ -2084,8 +2101,16 @@ void learn_spell(int monspell) | ||
2084 | 2101 | } |
2085 | 2102 | |
2086 | 2103 | |
2087 | -/* | |
2104 | +/*! | |
2105 | + * @brief モンスター特殊能力のフラグ配列から特定条件の魔法だけを抜き出す処理 | |
2088 | 2106 | * Extract monster spells mask for the given mode |
2107 | + * @param f4 モンスター特殊能力の4番目のフラグ配列 | |
2108 | + * @param f5 モンスター特殊能力の5番目のフラグ配列 | |
2109 | + * @param f6 モンスター特殊能力の6番目のフラグ配列 | |
2110 | + * @param mode 抜き出したい条件 | |
2111 | + * @return なし | |
2112 | + */ | |
2113 | +/* | |
2089 | 2114 | */ |
2090 | 2115 | void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode) |
2091 | 2116 | { |