OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
[hengband/hengband.git] / src / cmd1.c
index e6b7e67..65c9f1d 100644 (file)
@@ -279,7 +279,7 @@ static MULTIPLY mult_brand(MULTIPLY mult, const BIT_FLAGS* flgs, const monster_t
  * Note that most brands and slays are x3, except Slay Animal (x2),\n
  * Slay Evil (x2), and Kill dragon (x5).\n
  */
-s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
+HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
 {
        MULTIPLY mult = 10;
 
@@ -368,7 +368,6 @@ static void discover_hidden_things(POSITION y, POSITION x)
                /* Pick a trap */
                disclose_grid(y, x);
 
-               /* Message */
                msg_print(_("トラップを発見した。", "You have found a trap."));
 
                /* Disturb */
@@ -378,7 +377,6 @@ static void discover_hidden_things(POSITION y, POSITION x)
        /* Secret door */
        if (is_hidden_door(c_ptr))
        {
-               /* Message */
                msg_print(_("隠しドアを発見した。", "You have found a secret door."));
 
                /* Disclose */
@@ -408,7 +406,6 @@ static void discover_hidden_things(POSITION y, POSITION x)
                /* Identify once */
                if (!object_is_known(o_ptr))
                {
-                       /* Message */
                        msg_print(_("箱に仕掛けられたトラップを発見した!", "You have discovered a trap on the chest!"));
 
                        /* Know the trap */
@@ -508,7 +505,6 @@ void py_pickup_aux(OBJECT_IDX o_idx)
        /* Describe the object */
        object_desc(o_name, o_ptr, 0);
 
-       /* Message */
 #ifdef JP
        if ((o_ptr->name1 == ART_CRIMSON) && (p_ptr->pseikaku == SEIKAKU_COMBAT))
        {
@@ -557,20 +553,18 @@ void carry(bool pickup)
 {
        cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
 
-       s16b this_o_idx, next_o_idx = 0;
+       OBJECT_IDX this_o_idx, next_o_idx = 0;
 
        char    o_name[MAX_NLEN];
 
        /* Recenter the map around the player */
        verify_panel();
 
-       /* Update stuff */
        p_ptr->update |= (PU_MONSTERS);
 
        /* Redraw map */
        p_ptr->redraw |= (PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD);
 
        /* Handle stuff */
@@ -626,7 +620,6 @@ void carry(bool pickup)
                        /* Delete the gold */
                        delete_object_idx(this_o_idx);
 
-                       /* Message */
                        msg_format(_(" $%ld の価値がある%sを見つけた。", "You collect %ld gold pieces worth of %s."),
                           (long)value, o_name);
 
@@ -638,7 +631,6 @@ void carry(bool pickup)
                        /* Redraw gold */
                        p_ptr->redraw |= (PR_GOLD);
 
-                       /* Window stuff */
                        p_ptr->window |= (PW_PLAYER);
                }
 
@@ -853,7 +845,7 @@ bool player_can_enter(s16b feature, u16b mode)
  * @param mpe_mode 移動オプションフラグ
  * @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
  */
-bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
+bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
 {
        cave_type *c_ptr = &cave[ny][nx];
        feature_type *f_ptr = &f_info[c_ptr->feat];
@@ -914,10 +906,8 @@ bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
                        p_ptr->redraw |= (PR_MAP);
                }
 
-               /* Update stuff */
                p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_DISTANCE);
 
-               /* Window stuff */
                p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
                /* Remove "unsafe" flag */
@@ -1032,7 +1022,6 @@ bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
                /* Hidden trap */
                if (c_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
                {
-                       /* Message */
                        msg_print(_("トラップだ!", "You found a trap!"));
 
                        /* Pick a trap */
@@ -1804,7 +1793,7 @@ static bool run_test(void)
        int         i, max, inv;
        int         option = 0, option2 = 0;
        cave_type   *c_ptr;
-       s16b        feat;
+       FEAT_IDX feat;
        feature_type *f_ptr;
 
        /* Where we came from */
@@ -1840,7 +1829,7 @@ static bool run_test(void)
        /* Look at every newly adjacent square. */
        for (i = -max; i <= max; i++)
        {
-               s16b this_o_idx, next_o_idx = 0;
+               OBJECT_IDX this_o_idx, next_o_idx = 0;
 
                /* New direction */
                new_dir = cycle[chome[prev_dir] + i];
@@ -2147,13 +2136,11 @@ void run_step(DIRECTION dir)
                {
                        sound(SOUND_HITWALL);
 
-                       /* Message */
                        msg_print(_("その方向には走れません。", "You cannot run in that direction."));
 
                        /* Disturb */
                        disturb(0, 0);
 
-                       /* Done */
                        return;
                }
 
@@ -2170,7 +2157,6 @@ void run_step(DIRECTION dir)
                        /* Disturb */
                        disturb(0, 0);
 
-                       /* Done */
                        return;
                }
        }