}
/* 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;
}
/* 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;
}
/* 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];
}
/* 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;
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(creature_ptr, &dir,FALSE))
{
FEAT_IDX feat;
}
/* Get a direction */
- if (get_rep_dir(&dir,TRUE))
+ if (get_rep_dir(creature_ptr, &dir,TRUE))
{
FEAT_IDX feat;
feature_type *f_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];
/* 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);
}
/* 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);
{
POSITION x, y;
- if (!get_rep_dir(&dir, FALSE)) return NULL;
+ if (!get_rep_dir(caster_ptr, &dir, FALSE)) return NULL;
y = caster_ptr->y + ddy[dir];
x = caster_ptr->x + ddx[dir];
DIRECTION dir;
grid_type *g_ptr;
- if (!get_rep_dir(&dir, FALSE)) return FALSE;
+ if (!get_rep_dir(creature_ptr, &dir, FALSE)) return FALSE;
y = creature_ptr->y + ddy[dir];
x = creature_ptr->x + ddx[dir];
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
bool double_attack(player_type *creature_ptr)
{
DIRECTION dir;
- if (!get_rep_dir(&dir, FALSE)) return FALSE;
+ if (!get_rep_dir(creature_ptr, &dir, FALSE)) return FALSE;
POSITION y = creature_ptr->y + ddy[dir];
POSITION x = creature_ptr->x + ddx[dir];
if (!creature_ptr->current_floor_ptr->grid_array[y][x].m_idx)
* This function tracks and uses the "global direction", and uses
* that as the "desired direction", to which "confusion" is applied.
*/
-bool get_rep_dir(DIRECTION *dp, bool under)
+bool get_rep_dir(player_type *creature_ptr, DIRECTION *dp, bool under)
{
DIRECTION dir;
concptr prompt;
command_dir = dir;
/* Apply "confusion" */
- if (p_ptr->confused)
+ if (creature_ptr->confused)
{
/* Standard confusion */
if (randint0(100) < 75)
dir = ddd[randint0(8)];
}
}
- else if (p_ptr->riding)
+ else if (creature_ptr->riding)
{
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[p_ptr->riding];
+ monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (MON_CONFUSED(m_ptr))
/* Notice confusion */
if (command_dir != dir)
{
- if (p_ptr->confused)
+ if (creature_ptr->confused)
{
/* Warn the user */
msg_print(_("あなたは混乱している。", "You are confused."));
else
{
GAME_TEXT m_name[MAX_NLEN];
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[p_ptr->riding];
+ monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
monster_desc(m_name, m_ptr, 0);
if (MON_CONFUSED(m_ptr))
extern bool get_aim_dir(player_type *creature_ptr, DIRECTION *dp);
extern bool get_hack_dir(player_type *creature_ptr, DIRECTION *dp);
extern bool get_direction(player_type *creature_ptr, DIRECTION *dp, bool allow_under, bool with_steed);
-extern bool get_rep_dir(DIRECTION *dp, bool under);
+extern bool get_rep_dir(player_type *creature_ptr, DIRECTION *dp, bool under);
extern bool tgt_pt(player_type *creature_ptr, POSITION *x, POSITION *y);