y = travel.y;
x = travel.x;
}
- else if (!tgt_pt(&x, &y)) return;
+ else if (!tgt_pt(creature_ptr, &x, &y)) return;
if ((x == creature_ptr->x) && (y == creature_ptr->y))
{
for (i = 0; i < 3; i++)
{
- if (!tgt_pt(&x, &y)) return FALSE;
+ if (!tgt_pt(caster_ptr, &x, &y)) return FALSE;
flag = FALSE;
{
POSITION y, x;
- if (!tgt_pt(&x, &y)) return NULL;
+ if (!tgt_pt(caster_ptr, &x, &y)) return NULL;
if (!cave_player_teleportable_bold(y, x, 0L) ||
(distance(y, x, caster_ptr->y, caster_ptr->x) > MAX_SIGHT / 2) ||
DEPTH x = 0, y = 0;
/* Rerutn FALSE if cancelled */
- if (!tgt_pt(&x, &y)) return FALSE;
+ if (!tgt_pt(p_ptr, &x, &y)) return FALSE;
if (dimension_door_aux(p_ptr, x, y)) return TRUE;
POSITION x = 0, y = 0;
/* Rerutn FALSE if cancelled */
- if (!tgt_pt(&x, &y)) return FALSE;
+ if (!tgt_pt(p_ptr, &x, &y)) return FALSE;
if (dimension_door_aux(p_ptr, x, y)) return TRUE;
/*
* old -- from PsiAngband.
*/
-bool tgt_pt(POSITION *x_ptr, POSITION *y_ptr)
+bool tgt_pt(player_type *creature_ptr, POSITION *x_ptr, POSITION *y_ptr)
{
char ch = 0;
int d, n = 0;
get_screen_size(&wid, &hgt);
- x = p_ptr->x;
- y = p_ptr->y;
+ x = creature_ptr->x;
+ y = creature_ptr->y;
if (expand_list)
{
case '5':
case '0':
/* illegal place */
- if (player_bold(p_ptr, y, x)) ch = 0;
+ if (player_bold(creature_ptr, y, x)) ch = 0;
/* okay place */
else success = TRUE;
/* Skip stairs which have defferent distance */
for (; n < tmp_pos.n; ++ n)
{
- grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[tmp_pos.y[n]][tmp_pos.x[n]];
+ grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[tmp_pos.y[n]][tmp_pos.x[n]];
if (cave_have_flag_grid(g_ptr, FF_STAIRS) &&
cave_have_flag_grid(g_ptr, ch == '>' ? FF_MORE : FF_LESS))
if (n == tmp_pos.n) /* Loop out taget list */
{
n = 0;
- y = p_ptr->y;
- x = p_ptr->x;
+ y = creature_ptr->y;
+ x = creature_ptr->x;
verify_panel(); /* Move cursor to player */
- p_ptr->update |= (PU_MONSTERS);
+ creature_ptr->update |= (PU_MONSTERS);
- p_ptr->redraw |= (PR_MAP);
+ creature_ptr->redraw |= (PR_MAP);
- p_ptr->window |= (PW_OVERHEAD);
+ creature_ptr->window |= (PW_OVERHEAD);
handle_stuff();
}
else /* move cursor to next stair and change panel */
}
/* Slide into legality */
- if (x >= p_ptr->current_floor_ptr->width-1) x = p_ptr->current_floor_ptr->width - 2;
+ if (x >= creature_ptr->current_floor_ptr->width-1) x = creature_ptr->current_floor_ptr->width - 2;
else if (x <= 0) x = 1;
/* Slide into legality */
- if (y >= p_ptr->current_floor_ptr->height-1) y = p_ptr->current_floor_ptr->height- 2;
+ if (y >= creature_ptr->current_floor_ptr->height-1) y = creature_ptr->current_floor_ptr->height- 2;
else if (y <= 0) y = 1;
}
/* Recenter the map around the player */
verify_panel();
- p_ptr->update |= (PU_MONSTERS);
+ creature_ptr->update |= (PU_MONSTERS);
- p_ptr->redraw |= (PR_MAP);
+ creature_ptr->redraw |= (PR_MAP);
- p_ptr->window |= (PW_OVERHEAD);
+ creature_ptr->window |= (PW_OVERHEAD);
handle_stuff();
*x_ptr = x;
extern bool get_hack_dir(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 tgt_pt(POSITION *x, POSITION *y);
+extern bool tgt_pt(player_type *creature_ptr, POSITION *x, POSITION *y);
* List "player traits" altered by an artifact's pval. These include stats,
* speed, infravision, tunneling, stealth, searching, and extra attacks.
* @param o_ptr オブジェクト構造体の参照ポインタ
- * @param p_ptr pval修正構造体の参照ポインタ
+ * @param pi_ptr pval修正構造体の参照ポインタ
* @return なし
*/
static void analyze_pval(object_type *o_ptr, pval_info_type *pi_ptr)
static bool wiz_dimension_door(void)
{
POSITION x = 0, y = 0;
- if (!tgt_pt(&x, &y)) return FALSE;
+ if (!tgt_pt(p_ptr, &x, &y)) return FALSE;
teleport_player_to(p_ptr, y, x, TELEPORT_NONMAGICAL);
return (TRUE);
}
FEAT_IDX tmp_feat, tmp_mimic;
POSITION y, x;
- if (!tgt_pt(&x, &y)) return;
+ if (!tgt_pt(creature_ptr, &x, &y)) return;
g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];