OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / xtra1.c
index bbd3172..55b12e8 100644 (file)
@@ -1707,8 +1707,6 @@ static void fix_inven(void)
 
                /* Display inventory */
                display_inven();
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -1866,8 +1864,6 @@ static void fix_monster_list(void)
 
                target_set_prepare_look();//モンスター一覧を生成,ソート
                print_monster_list(0, 0, h);
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -1902,8 +1898,6 @@ static void fix_equip(void)
 
                /* Display equipment */
                display_equip();
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -1937,8 +1931,6 @@ static void fix_spell(void)
 
                /* Display spell list */
                display_spell_list();
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -1974,8 +1966,6 @@ static void fix_player(void)
 
                /* Display player */
                display_player(0);
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -1986,7 +1976,7 @@ static void fix_player(void)
 /*!
  * @brief ゲームメッセージ履歴をサブウィンドウに表示する / 
  * Hack -- display recent messages in sub-windows
- * XXX XXX XXX Adjust for width and split messages
+ * Adjust for width and split messages
  * @return なし
  */
 static void fix_message(void)
@@ -2009,7 +1999,6 @@ static void fix_message(void)
                /* Activate */
                Term_activate(angband_term[j]);
 
-               /* Get size */
                Term_get_size(&w, &h);
 
                /* Dump messages */
@@ -2024,8 +2013,6 @@ static void fix_message(void)
                        /* Clear to end of line */
                        Term_erase(x, y, 255);
                }
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -2037,7 +2024,7 @@ static void fix_message(void)
 /*!
  * @brief 簡易マップをサブウィンドウに表示する / 
  * Hack -- display overhead view in sub-windows
- * XXX XXX XXX Adjust for width and split messages
+ * Adjust for width and split messages
  * @return なし
  * @details
  * Note that the "player" symbol does NOT appear on the map.
@@ -2069,8 +2056,6 @@ static void fix_overhead(void)
                {
                        /* Redraw map */
                        display_map(&cy, &cx);
-
-                       /* Fresh */
                        Term_fresh();
                }
 
@@ -2105,8 +2090,6 @@ static void fix_dungeon(void)
 
                /* Redraw dungeon view */
                display_dungeon();
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -2140,8 +2123,6 @@ static void fix_monster(void)
 
                /* Display monster race info */
                if (p_ptr->monster_race_idx) display_roff(p_ptr->monster_race_idx);
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -2175,8 +2156,6 @@ static void fix_object(void)
 
                /* Display monster race info */
                if (p_ptr->object_kind_idx) display_koff(p_ptr->object_kind_idx);
-
-               /* Fresh */
                Term_fresh();
 
                /* Restore */
@@ -2329,7 +2308,6 @@ static void calc_spells(void)
                                which = p_ptr->realm2;
                        }
 
-                       /* Message */
 #ifdef JP
                        msg_format("%sの%sを忘れてしまった。", do_spell(which, j%32, SPELL_NAME), p );
 #else
@@ -2387,7 +2365,6 @@ static void calc_spells(void)
                                which = p_ptr->realm2;
                        }
 
-                       /* Message */
 #ifdef JP
                        msg_format("%sの%sを忘れてしまった。",
                                   do_spell(which, j%32, SPELL_NAME), p );
@@ -2463,7 +2440,6 @@ static void calc_spells(void)
                                which = p_ptr->realm2;
                        }
 
-                       /* Message */
 #ifdef JP
                        msg_format("%sの%sを思い出した。", do_spell(which, j%32, SPELL_NAME), p );
 #else
@@ -2514,7 +2490,6 @@ static void calc_spells(void)
                /* Message if needed */
                if (p_ptr->new_spells)
                {
-                       /* Message */
 #ifdef JP
                        if( p_ptr->new_spells < 10 ){
                                msg_format("あと %d つの%sを学べる。", p_ptr->new_spells, p);
@@ -2606,7 +2581,7 @@ static void calc_mana(void)
        /* Only mages are affected */
        if (mp_ptr->spell_xtra & MAGIC_GLOVE_REDUCE_MANA)
        {
-               u32b flgs[TR_FLAG_SIZE];
+               BIT_FLAGS flgs[TR_FLAG_SIZE];
 
                /* Assume player is not encumbered by gloves */
                p_ptr->cumber_glove = FALSE;
@@ -2812,7 +2787,6 @@ static void calc_mana(void)
                /* Display mana later */
                p_ptr->redraw |= (PR_MANA);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER);
                p_ptr->window |= (PW_SPELL);
        }
@@ -2824,7 +2798,6 @@ static void calc_mana(void)
        /* Take note when "glove state" changes */
        if (p_ptr->old_cumber_glove != p_ptr->cumber_glove)
        {
-               /* Message */
                if (p_ptr->cumber_glove)
                {
                        msg_print(_("手が覆われて呪文が唱えにくい感じがする。", "Your covered hands feel unsuitable for spellcasting."));
@@ -2842,7 +2815,6 @@ static void calc_mana(void)
        /* Take note when "armor state" changes */
        if (p_ptr->old_cumber_armor != p_ptr->cumber_armor)
        {
-               /* Message */
                if (p_ptr->cumber_armor)
                {
                        msg_print(_("装備の重さで動きが鈍くなってしまっている。", "The weight of your equipment encumbers your movement."));
@@ -2937,7 +2909,6 @@ static void calc_hitpoints(void)
                /* Display hitpoints (later) */
                p_ptr->redraw |= (PR_HP);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER);
        }
 }
@@ -2952,7 +2923,7 @@ static void calc_torch(void)
 {
        int i, rad;
        object_type *o_ptr;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
 
        /* Assume no light */
        p_ptr->cur_lite = 0;
@@ -3010,7 +2981,6 @@ static void calc_torch(void)
        /* Notice changes in the "lite radius" */
        if (p_ptr->old_lite != p_ptr->cur_lite)
        {
-               /* Update stuff */
                /* Hack -- PU_MON_LITE for monsters' darkness */
                p_ptr->update |= (PU_LITE | PU_MON_LITE | PU_MONSTERS);
 
@@ -3112,7 +3082,7 @@ s16b calc_num_fire(object_type *o_ptr)
        int num = 0;
        OBJECT_TYPE_VALUE tval_ammo = bow_tval_ammo(o_ptr);
        object_type *q_ptr;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        
        /* Scan the usable inventory */
        for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
@@ -3213,7 +3183,7 @@ void calc_bonuses(void)
        int             empty_hands_status = empty_hands(TRUE);
        int             extra_blows[2];
        object_type     *o_ptr;
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        bool            omoi = FALSE;
        bool            yoiyami = FALSE;
        bool            down_saving = FALSE;
@@ -3223,7 +3193,7 @@ void calc_bonuses(void)
        bool            have_sw = FALSE, have_kabe = FALSE;
        bool            easy_2weapon = FALSE;
        bool            riding_levitation = FALSE;
-       s16b this_o_idx, next_o_idx = 0;
+       OBJECT_IDX this_o_idx, next_o_idx = 0;
        const player_race *tmp_rp_ptr;
 
        /* Save the old vision stuff */
@@ -4524,7 +4494,7 @@ void calc_bonuses(void)
                }
                for (i = INVEN_RARM; i <= INVEN_FEET; i++)
                {
-                       int ac = 0;
+                       ARMOUR_CLASS ac = 0;
                        o_ptr = &inventory[i];
                        if (!o_ptr->k_idx) continue;
                        if (!object_is_armour(o_ptr)) continue;
@@ -4554,7 +4524,6 @@ void calc_bonuses(void)
                        /* Redisplay the stats later */
                        p_ptr->redraw |= (PR_STATS);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
                }
 
@@ -4580,7 +4549,6 @@ void calc_bonuses(void)
                        /* Redisplay the stats later */
                        p_ptr->redraw |= (PR_STATS);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
                }
 
@@ -4633,7 +4601,6 @@ void calc_bonuses(void)
                                }
                        }
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
                }
        }
@@ -4934,7 +4901,7 @@ void calc_bonuses(void)
                i = 1500 + riding_r_ptr->level * 25;
        }
 
-       /* XXX XXX XXX Apply "encumbrance" from weight */
+       /* Apply "encumbrance" from weight */
        if (j > i) new_speed -= ((j - i) / (i / 5));
 
        /* Searching slows the player down */
@@ -5483,7 +5450,6 @@ void calc_bonuses(void)
                /* Redraw */
                p_ptr->redraw |= (PR_ARMOR);
 
-               /* Window stuff */
                p_ptr->window |= (PW_PLAYER);
        }
 
@@ -5619,7 +5585,6 @@ void calc_bonuses(void)
        /* Take note when "heavy bow" changes */
        if (p_ptr->old_heavy_shoot != p_ptr->heavy_shoot)
        {
-               /* Message */
                if (p_ptr->heavy_shoot)
                {
                        msg_print(_("こんな重い弓を装備しているのは大変だ。", "You have trouble wielding such a heavy bow."));
@@ -5642,7 +5607,6 @@ void calc_bonuses(void)
                /* Take note when "heavy weapon" changes */
                if (p_ptr->old_heavy_wield[i] != p_ptr->heavy_wield[i])
                {
-                       /* Message */
                        if (p_ptr->heavy_wield[i])
                        {
                                msg_print(_("こんな重い武器を装備しているのは大変だ。", "You have trouble wielding such a heavy weapon."));
@@ -5667,7 +5631,6 @@ void calc_bonuses(void)
                /* Take note when "heavy weapon" changes */
                if (p_ptr->old_riding_wield[i] != p_ptr->riding_wield[i])
                {
-                       /* Message */
                        if (p_ptr->riding_wield[i])
                        {
                                msg_print(_("この武器は乗馬中に使うにはむかないようだ。", "This weapon is not suitable for use while riding."));
@@ -5687,7 +5650,6 @@ void calc_bonuses(void)
                /* Take note when "illegal weapon" changes */
                if (p_ptr->old_icky_wield[i] != p_ptr->icky_wield[i])
                {
-                       /* Message */
                        if (p_ptr->icky_wield[i])
                        {
                                msg_print(_("今の装備はどうも自分にふさわしくない気がする。", "You do not feel comfortable with your weapon."));
@@ -5712,7 +5674,6 @@ void calc_bonuses(void)
 
        if (p_ptr->riding && (p_ptr->old_riding_ryoute != p_ptr->riding_ryoute))
        {
-               /* Message */
                if (p_ptr->riding_ryoute)
                {
 #ifdef JP
@@ -5847,7 +5808,6 @@ void notice_stuff(void)
  */
 void update_stuff(void)
 {
-       /* Update stuff */
        if (!p_ptr->update) return;
 
 
@@ -6258,13 +6218,11 @@ void window_stuff(void)
  */
 void handle_stuff(void)
 {
-       /* Update stuff */
        if (p_ptr->update) update_stuff();
 
        /* Redraw stuff */
        if (p_ptr->redraw) redraw_stuff();
 
-       /* Window stuff */
        if (p_ptr->window) window_stuff();
 }