OSDN Git Service

#37287 (2.2.0.84) externs.h 中の警告を修正。 / Fix warnings of externs.h.
[hengband/hengband.git] / src / xtra1.c
index 40b99db..8c44f6b 100644 (file)
@@ -122,7 +122,7 @@ static void prt_field(cptr info, int row, int col)
 /*!
  * @brief ゲーム時間が日中かどうかを返す /
  * Whether daytime or not
- * @param 日中ならばTRUE、夜ならばFALSE
+ * @return 日中ならばTRUE、夜ならばFALSE
  */
 bool is_daytime(void)
 {
@@ -503,7 +503,7 @@ static struct {
 
 
 /*!
- * @param 下部に状態表示を行う / Show status bar
+ * @brief 下部に状態表示を行う / Show status bar
  * @return なし
  */
 static void prt_status(void)
@@ -736,7 +736,7 @@ static void prt_status(void)
 
 
 /*!
- * @param プレイヤーの称号を表示する / Prints "title", including "wizard" or "winner" as needed.
+ * @brief プレイヤーの称号を表示する / Prints "title", including "wizard" or "winner" as needed.
  * @return なし
  */
 static void prt_title(void)
@@ -791,7 +791,7 @@ static void prt_title(void)
 
 
 /*!
- * @param プレイヤーのレベルを表示する / Prints level
+ * @brief プレイヤーのレベルを表示する / Prints level
  * @return なし
  */
 static void prt_level(void)
@@ -826,7 +826,7 @@ static void prt_level(void)
 
 
 /*!
- * @param プレイヤーの経験値を表示する / Display the experience
+ * @brief プレイヤーの経験値を表示する / Display the experience
  * @return なし
  */
 static void prt_exp(void)
@@ -880,7 +880,7 @@ static void prt_exp(void)
 }
 
 /*!
- * @param プレイヤーの所持金を表示する / Prints current gold
+ * @brief プレイヤーの所持金を表示する / Prints current gold
  * @return なし
  */
 static void prt_gold(void)
@@ -893,7 +893,7 @@ static void prt_gold(void)
 
 
 /*!
- * @param プレイヤーのACを表示する / Prints current AC
+ * @brief プレイヤーのACを表示する / Prints current AC
  * @return なし
  */
 static void prt_ac(void)
@@ -915,7 +915,7 @@ static void prt_ac(void)
 
 
 /*!
- * @param プレイヤーのHPを表示する / Prints Cur/Max hit points
+ * @brief プレイヤーのHPを表示する / Prints Cur/Max hit points
  * @return なし
  */
 static void prt_hp(void)
@@ -960,7 +960,7 @@ static void prt_hp(void)
 
 
 /*!
- * @param プレイヤーのMPを表示する / Prints players max/cur spell points
+ * @brief プレイヤーのMPを表示する / Prints players max/cur spell points
  * @return なし
  */
 static void prt_sp(void)
@@ -1007,7 +1007,7 @@ static void prt_sp(void)
 
 
 /*!
- * @param 現在のフロアの深さを表示する / Prints depth in stat area
+ * @brief 現在のフロアの深さを表示する / Prints depth in stat area
  * @return なし
  */
 static void prt_depth(void)
@@ -1056,7 +1056,7 @@ static void prt_depth(void)
 
 
 /*!
- * @param プレイヤーの空腹状態を表示する / Prints status of hunger
+ * @brief プレイヤーの空腹状態を表示する / Prints status of hunger
  * @return なし
  */
 static void prt_hunger(void)
@@ -1102,7 +1102,7 @@ static void prt_hunger(void)
 
 
 /*!
- * @param プレイヤーの行動状態を表示する / Prints Searching, Resting, Paralysis, or 'count' status
+ * @brief プレイヤーの行動状態を表示する / Prints Searching, Resting, Paralysis, or 'count' status
  * @return なし
  * @details
  * Display is always exactly 10 characters wide (see below)
@@ -1256,7 +1256,7 @@ static void prt_state(void)
 
 
 /*!
- * @param プレイヤーの行動速度を表示する / Prints the speed of a character.                     -CJS-
+ * @brief プレイヤーの行動速度を表示する / Prints the speed of a character.                     -CJS-
  * @return なし
  */
 static void prt_speed(void)
@@ -1327,7 +1327,7 @@ static void prt_speed(void)
 
 
 /*!
- * @param プレイヤーの呪文学習可能状態を表示する
+ * @brief プレイヤーの呪文学習可能状態を表示する
  * @return なし
  */
 static void prt_study(void)
@@ -1350,7 +1350,7 @@ static void prt_study(void)
 
 
 /*!
- * @param プレイヤーのものまね可能状態を表示する
+ * @brief プレイヤーのものまね可能状態を表示する
  * @return なし
  */
 static void prt_imitation(void)
@@ -1378,7 +1378,7 @@ static void prt_imitation(void)
 }
 
 /*!
- * @param プレイヤーの負傷状態を表示する
+ * @brief プレイヤーの負傷状態を表示する
  * @return なし
  */
 static void prt_cut(void)
@@ -1421,7 +1421,7 @@ static void prt_cut(void)
 
 
 /*!
- * @param プレイヤーの朦朧状態を表示する
+ * @brief プレイヤーの朦朧状態を表示する
  * @return なし
  */
 static void prt_stun(void)
@@ -1449,7 +1449,7 @@ static void prt_stun(void)
 
 
 /*!
- * @param モンスターの体力ゲージを表示する
+ * @brief モンスターの体力ゲージを表示する
  * @param riding TRUEならば騎乗中のモンスターの体力、FALSEならターゲットモンスターの体力を表示する。表示位置は固定。
  * @return なし
  * @details
@@ -1604,7 +1604,7 @@ static void health_redraw(bool riding)
 
 
 /*!
- * @param プレイヤーのステータスを一括表示する(左側部分) / Display basic info (mostly left of map)
+ * @brief プレイヤーのステータスを一括表示する(左側部分) / Display basic info (mostly left of map)
  * @return なし
  */
 static void prt_frame_basic(void)
@@ -1656,7 +1656,7 @@ static void prt_frame_basic(void)
 
 
 /*!
- * @param プレイヤーのステータスを一括表示する(下部分) / Display extra info (mostly below map)
+ * @brief プレイヤーのステータスを一括表示する(下部分) / Display extra info (mostly below map)
  * @return なし
  */
 static void prt_frame_extra(void)
@@ -1684,7 +1684,7 @@ static void prt_frame_extra(void)
 
 
 /*!
- * @param サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows
+ * @brief サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows
  * @return なし
  */
 static void fix_inven(void)
@@ -1718,7 +1718,7 @@ static void fix_inven(void)
 
 
 /*!
- * @briefs モンスターの現在数を一行で表現する / Print monster info in line
+ * @brief モンスターの現在数を一行で表現する / Print monster info in line
  * @param x 表示列
  * @param y 表示行
  * @param m_ptr 思い出を表示するモンスター情報の参照ポインタ
@@ -1775,7 +1775,7 @@ static void print_monster_line(int x, int y, monster_type* m_ptr, int n_same){
 }
 
 /*!
- * @briefs モンスターの出現リストを表示する / Print monster info in line
+ * @brief モンスターの出現リストを表示する / Print monster info in line
  * @param x 表示列
  * @param y 表示行
  * @param max_lines 最大何行描画するか
@@ -1838,8 +1838,9 @@ void print_monster_list(int x, int y, int max_lines){
        }
 }
 
-/*
- * Hack -- display monster list in sub-windows
+/*!
+ * @brief 出現中モンスターのリストをサブウィンドウに表示する / Hack -- display monster list in sub-windows
+ * @return なし
  */
 static void fix_monster_list(void)
 {
@@ -1863,7 +1864,7 @@ static void fix_monster_list(void)
 
                Term_clear();
 
-               target_set_prepare_look();//モンスター一覧を生成,ソート
+               target_set_prepare_look(); //モンスター一覧を生成,ソート
                print_monster_list(0, 0, h);
 
                /* Fresh */
@@ -1876,9 +1877,10 @@ static void fix_monster_list(void)
 
 
 
-
-/*
+/*!
+ * @brief 現在の装備品をサブウィンドウに表示する / 
  * Hack -- display equipment in sub-windows
+ * @return なし
  */
 static void fix_equip(void)
 {
@@ -1910,8 +1912,10 @@ static void fix_equip(void)
 }
 
 
-/*
- * Hack -- display equipment in sub-windows
+/*!
+ * @brief 現在の習得済魔法をサブウィンドウに表示する / 
+ * Hack -- display spells in sub-windows
+ * @return なし
  */
 static void fix_spell(void)
 {
@@ -1943,8 +1947,10 @@ static void fix_spell(void)
 }
 
 
-/*
+/*!
+ * @brief 現在のプレイヤーステータスをサブウィンドウに表示する / 
  * Hack -- display character in sub-windows
+ * @return なし
  */
 static void fix_player(void)
 {
@@ -1977,12 +1983,11 @@ static void fix_player(void)
        }
 }
 
-
-
-/*
+/*!
+ * @brief ゲームメッセージ履歴をサブウィンドウに表示する / 
  * Hack -- display recent messages in sub-windows
- *
  * XXX XXX XXX Adjust for width and split messages
+ * @return なし
  */
 static void fix_message(void)
 {
@@ -2029,9 +2034,12 @@ static void fix_message(void)
 }
 
 
-/*
+/*!
+ * @brief 簡易マップをサブウィンドウに表示する / 
  * Hack -- display overhead view in sub-windows
- *
+ * XXX XXX XXX Adjust for width and split messages
+ * @return なし
+ * @details
  * Note that the "player" symbol does NOT appear on the map.
  */
 static void fix_overhead(void)
@@ -2072,8 +2080,10 @@ static void fix_overhead(void)
 }
 
 
-/*
+/*!
+ * @brief ダンジョンの地形をサブウィンドウに表示する / 
  * Hack -- display dungeon view in sub-windows
+ * @return なし
  */
 static void fix_dungeon(void)
 {
@@ -2105,8 +2115,10 @@ static void fix_dungeon(void)
 }
 
 
-/*
- * Hack -- display monster recall in sub-windows
+/*!
+ * @brief モンスターの思い出をサブウィンドウに表示する / 
+ * Hack -- display dungeon view in sub-windows
+ * @return なし
  */
 static void fix_monster(void)
 {
@@ -2138,8 +2150,10 @@ static void fix_monster(void)
 }
 
 
-/*
+/*!
+ * @brief ベースアイテム情報をサブウィンドウに表示する / 
  * Hack -- display object recall in sub-windows
+ * @return なし
  */
 static void fix_object(void)
 {
@@ -2171,10 +2185,13 @@ static void fix_object(void)
 }
 
 
-/*
+
+/*!
+ * @brief プレイヤーの現在学習可能な魔法数を計算し、増減に応じて魔法の忘却、再学習を処置する。 /
  * Calculate number of spells player should have, and forget,
  * or remember, spells until that number is properly reflected.
- *
+ * @return なし
+ * @details
  * Note that this function induces various "status" messages,
  * which must be bypasses until the character is created.
  */
@@ -2523,11 +2540,12 @@ static void calc_spells(void)
        }
 }
 
-
-/*
+/*!
+ * @brief プレイヤーの最大MPを計算する /
  * Calculate maximum mana.  You do not need to know any spells.
  * Note that mana is lowered by heavy (or inappropriate) armor.
- *
+ * @return なし
+ * @details
  * This function induces status messages.
  */
 static void calc_mana(void)
@@ -2842,9 +2860,12 @@ static void calc_mana(void)
 
 
 
-/*
+/*!
+ * @brief プレイヤーの最大HPを計算する /
  * Calculate the players (maximal) hit points
  * Adjust current hitpoints if necessary
+ * @return なし
+ * @details
  */
 static void calc_hitpoints(void)
 {
@@ -2923,13 +2944,11 @@ static void calc_hitpoints(void)
        }
 }
 
-
-
-/*
- * Extract and set the current "lite radius"
- *
+/*!
+ * @brief プレイヤーの光源半径を計算する / Extract and set the current "lite radius"
+ * @return なし
+ * @details
  * SWD: Experimental modification: multiple light sources have additive effect.
- *
  */
 static void calc_torch(void)
 {
@@ -3006,9 +3025,10 @@ static void calc_torch(void)
 }
 
 
-
-/*
+/*!
+ * @brief プレイヤーの所持重量制限を計算する /
  * Computes current weight limit.
+ * @return 制限重量(ポンド)
  */
 u32b weight_limit(void)
 {
@@ -3022,12 +3042,21 @@ u32b weight_limit(void)
        return i;
 }
 
-
+/*!
+ * @brief プレイヤーが現在右手/左手に武器を持っているか判定する /
+ * @param i 判定する手のID(右手:0 左手:1)
+ * @return 持っているならばTRUE
+ */
 bool buki_motteruka(int i)
 {
        return ((inventory[i].k_idx && object_is_melee_weapon(&inventory[i])) ? TRUE : FALSE);
 }
 
+/*!
+ * @brief 射撃武器がプレイヤーにとって重すぎるかどうかの判定 /
+ * @param o_ptr 判定する射撃武器のアイテム情報参照ポインタ
+ * @return 重すぎるならばTRUE
+ */
 bool is_heavy_shoot(object_type *o_ptr)
 {
        int hold = adj_str_hold[p_ptr->stat_ind[A_STR]];
@@ -3035,6 +3064,11 @@ bool is_heavy_shoot(object_type *o_ptr)
        return (hold < o_ptr->weight / 10);
 }
 
+/*!
+ * @brief 射撃武器に対応する矢/弾薬のベースアイテムIDを返す /
+ * @param o_ptr 判定する射撃武器のアイテム情報参照ポインタ
+ * @return 対応する矢/弾薬のベースアイテムID
+ */
 int bow_tval_ammo(object_type *o_ptr)
 {
        /* Analyze the launcher */
@@ -3058,6 +3092,7 @@ int bow_tval_ammo(object_type *o_ptr)
                        return TV_BOLT;
                }
                case SV_CRIMSON:
+               case SV_HARP:
                {
                        return TV_NO_AMMO;
                }
@@ -3066,7 +3101,12 @@ int bow_tval_ammo(object_type *o_ptr)
        return 0;
 }
 
-/* calcurate the fire rate of target object */
+/*!
+ * @brief 装備中の射撃武器の威力倍率を返す /
+ * calcurate the fire rate of target object
+ * @param o_ptr 計算する射撃武器のアイテム情報参照ポインタ
+ * @return 射撃倍率の値(100で1.00倍)
+ */
 s16b calc_num_fire(object_type *o_ptr)
 {
        int extra_shots = 0;
@@ -3143,11 +3183,14 @@ s16b calc_num_fire(object_type *o_ptr)
        return num;
 }
 
-/*
+/*!
+ * @brief プレイヤーの全ステータスを更新する / 
  * Calculate the players current "state", taking into account
  * not only race/class intrinsics, but also objects being worn
  * and temporary spell effects.
- *
+ * @return なし
+ * @details
+ * <pre>
  * See also calc_mana() and calc_hitpoints().
  *
  * Take note of the new "speed code", in particular, a very strong
@@ -3162,6 +3205,7 @@ s16b calc_num_fire(object_type *o_ptr)
  * are actually added in later, at the appropriate place.
  *
  * This function induces various "status" messages.
+ * </pre>
  */
 void calc_bonuses(void)
 {
@@ -4961,8 +5005,7 @@ void calc_bonuses(void)
                }
        }
 
-       if (p_ptr->ryoute)
-               hold *= 2;
+       if (p_ptr->ryoute) hold *= 2;
 
        for(i = 0 ; i < 2 ; i++)
        {
@@ -5719,10 +5762,9 @@ void calc_bonuses(void)
                if ((inventory[i].tval == TV_NATURE_BOOK) && (inventory[i].sval == 2)) have_sw = TRUE;
                if ((inventory[i].tval == TV_CRAFT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
        }
-       for (this_o_idx = cave[py][px].o_idx; this_o_idx; this_o_idx = next_o_idx)
-       {
-               object_type *o_ptr;
 
+       for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
+       {
                /* Acquire object */
                o_ptr = &o_list[this_o_idx];
 
@@ -5766,8 +5808,10 @@ void calc_bonuses(void)
 
 
 
-/*
- * Handle "p_ptr->notice"
+/*! 
+ * @brief p_ptr->notice のフラグに応じた更新をまとめて行う / Handle "p_ptr->notice"
+ * @return なし
+ * @details 更新処理の対象はアイテムの自動破壊/アイテムの結合/アイテムの並び替え。
  */
 void notice_stuff(void)
 {
@@ -5798,8 +5842,10 @@ void notice_stuff(void)
 }
 
 
-/*
- * Handle "p_ptr->update"
+/*! 
+ * @brief p_ptr->update のフラグに応じた更新をまとめて行う / Handle "p_ptr->update"
+ * @return なし
+ * @details 更新処理の対象はプレイヤーの能力修正/光源寿命/HP/MP/魔法の学習状態、他多数の外界の状態判定。
  */
 void update_stuff(void)
 {
@@ -5911,8 +5957,10 @@ void update_stuff(void)
 }
 
 
-/*
- * Handle "p_ptr->redraw"
+/*! 
+ * @brief p_ptr->redraw のフラグに応じた更新をまとめて行う / Handle "p_ptr->redraw"
+ * @return なし
+ * @details 更新処理の対象はゲーム中の全描画処理
  */
 void redraw_stuff(void)
 {
@@ -6104,8 +6152,10 @@ void redraw_stuff(void)
 }
 
 
-/*
- * Handle "p_ptr->window"
+/*! 
+ * @brief p_ptr->window のフラグに応じた更新をまとめて行う / Handle "p_ptr->window"
+ * @return なし
+ * @details 更新処理の対象はサブウィンドウ全般
  */
 void window_stuff(void)
 {
@@ -6203,8 +6253,10 @@ void window_stuff(void)
 }
 
 
-/*
+/*!
+ * @brief 全更新処理をチェックして処理していく
  * Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window"
+ * @return なし
  */
 void handle_stuff(void)
 {
@@ -6218,7 +6270,11 @@ void handle_stuff(void)
        if (p_ptr->window) window_stuff();
 }
 
-
+/*!
+ * @brief プレイヤーの現在開いている手の状態を返す
+ * @param riding_control 乗馬中により片手を必要としている状態ならばTRUEを返す。
+ * @return 開いている手のビットフラグ
+ */
 s16b empty_hands(bool riding_control)
 {
        s16b status = EMPTY_HAND_NONE;
@@ -6236,6 +6292,10 @@ s16b empty_hands(bool riding_control)
 }
 
 
+/*!
+ * @brief プレイヤーが防具重量制限のある職業時にペナルティを受ける状態にあるかどうかを返す。
+ * @return ペナルティが適用されるならばTRUE。
+ */
 bool heavy_armor(void)
 {
        u16b monk_arm_wgt = 0;
@@ -6254,6 +6314,9 @@ bool heavy_armor(void)
        return (monk_arm_wgt > (100 + (p_ptr->lev * 4)));
 }
 
+/*!
+ * @brief 実ゲームプレイ時間を更新する
+ */
 void update_playtime(void)
 {
        /* Check if the game has started */