OSDN Git Service

[Refactor] #38997 get_rep_dir() にplayer_type * 引数を追加 / Added player_type * argument...
[hengband/hengband.git] / src / cmd / cmd-basic.c
index b6d7f9a..2729b93 100644 (file)
@@ -830,7 +830,7 @@ void do_cmd_open(player_type *creature_ptr)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir, TRUE))
+       if (get_rep_dir(creature_ptr, &dir, TRUE))
        {
                FEAT_IDX feat;
                grid_type *g_ptr;
@@ -973,7 +973,7 @@ void do_cmd_close(player_type *creature_ptr)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir, FALSE))
+       if (get_rep_dir(creature_ptr, &dir, FALSE))
        {
                grid_type *g_ptr;
                FEAT_IDX feat;
@@ -1209,7 +1209,7 @@ void do_cmd_tunnel(player_type *creature_ptr)
        }
 
        /* Get a direction to tunnel, or Abort */
-       if (get_rep_dir(&dir,FALSE))
+       if (get_rep_dir(creature_ptr, &dir,FALSE))
        {
                /* Get location */
                y = creature_ptr->y + ddy[dir];
@@ -1563,7 +1563,7 @@ void do_cmd_disarm(player_type *creature_ptr)
        }
 
        /* Get a direction (or abort) */
-       if (get_rep_dir(&dir,TRUE))
+       if (get_rep_dir(creature_ptr, &dir,TRUE))
        {
                grid_type *g_ptr;
                FEAT_IDX feat;
@@ -1745,7 +1745,7 @@ void do_cmd_bash(player_type *creature_ptr)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir,FALSE))
+       if (get_rep_dir(creature_ptr, &dir,FALSE))
        {
                FEAT_IDX feat;
 
@@ -1827,7 +1827,7 @@ void do_cmd_alter(player_type *creature_ptr)
        }
 
        /* Get a direction */
-       if (get_rep_dir(&dir,TRUE))
+       if (get_rep_dir(creature_ptr, &dir,TRUE))
        {
                FEAT_IDX feat;
                feature_type *f_ptr;
@@ -1946,7 +1946,7 @@ void do_cmd_spike(player_type *creature_ptr)
        }
 
        /* Get a "repeated" direction */
-       if (!get_rep_dir(&dir, FALSE)) return;
+       if (!get_rep_dir(creature_ptr, &dir, FALSE)) return;
 
        POSITION y = creature_ptr->y + ddy[dir];
        POSITION x = creature_ptr->x + ddx[dir];
@@ -2017,7 +2017,7 @@ void do_cmd_walk(player_type *creature_ptr, bool pickup)
        /* Get a "repeated" direction */
        bool more = FALSE;
        DIRECTION dir;
-       if (get_rep_dir(&dir, FALSE))
+       if (get_rep_dir(creature_ptr, &dir, FALSE))
        {
                take_turn(creature_ptr, 100);
 
@@ -2081,13 +2081,13 @@ void do_cmd_run(player_type *creature_ptr)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir,FALSE))
+       if (get_rep_dir(creature_ptr, &dir,FALSE))
        {
                /* Hack -- Set the run counter */
                creature_ptr->running = (command_arg ? command_arg : 1000);
 
                /* First step */
-               run_step(dir);
+               run_step(creature_ptr, dir);
        }
 }
 
@@ -2441,14 +2441,14 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
                project_length = tdis + 1;
 
                /* Get a direction (or cancel) */
-               if (!get_aim_dir(&dir)) return FALSE;
+               if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
 
                /* Predict the "target" location */
                tx = creature_ptr->x + 99 * ddx[dir];
                ty = creature_ptr->y + 99 * ddy[dir];
 
                /* Check for "target request" */
-               if ((dir == 5) && target_okay())
+               if ((dir == 5) && target_okay(creature_ptr))
                {
                        tx = target_col;
                        ty = target_row;
@@ -2588,8 +2588,8 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
 
                                        if (m_ptr->ml)
                                        {
-                                               if (!creature_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-                                               health_track(g_ptr->m_idx);
+                                               if (!creature_ptr->image) monster_race_track(creature_ptr, m_ptr->ap_r_idx);
+                                               health_track(creature_ptr, g_ptr->m_idx);
                                        }
                                }
 
@@ -2629,13 +2629,13 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
                                if (tdam < 0) tdam = 0;
 
                                /* Modify the damage */
-                               tdam = mon_damage_mod(m_ptr, tdam, FALSE);
+                               tdam = mon_damage_mod(creature_ptr, m_ptr, tdam, FALSE);
 
                                msg_format_wizard(CHEAT_MONSTER, _("%dのダメージを与えた。(残りHP %d/%d(%d))", "You do %d damage. (left HP %d/%d(%d))"),
                                        tdam, m_ptr->hp - tdam, m_ptr->maxhp, m_ptr->max_maxhp);
 
                                /* Hit the monster, check for death */
-                               if (mon_take_hit(g_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_idx(m_ptr))))
+                               if (mon_take_hit(creature_ptr, g_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_idx(m_ptr))))
                                {
                                        /* Dead monster */
                                }
@@ -2749,7 +2749,7 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
                        {
                                if (item >= 0)
                                {
-                                       msg_format(_("%sを受け損ねた!", "%s backs, but you can't catch!"), o2_name);
+                                       msg_format(_("%sを受け損ねた!", "%s comes backs, but you can't catch!"), o2_name);
                                }
                                else
                                {
@@ -2761,7 +2761,7 @@ bool do_cmd_throw(player_type *creature_ptr, int mult, bool boomerang, OBJECT_ID
                }
                else
                {
-                       msg_format(_("%sが返ってこなかった!", "%s doesn't back!"), o2_name);
+                       msg_format(_("%sが返ってこなかった!", "%s doesn't come back!"), o2_name);
                }
        }