* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(FEAT_IDX feat), bool under)
+static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(player_type*, FEAT_IDX feat), bool under)
{
/* Check around (and under) the character */
int count = 0;
feat = get_feat_mimic(g_ptr);
/* Not looking for this feature */
- if (!((*test)(feat))) continue;
+ if (!((*test)(creature_ptr, feat))) continue;
/* OK */
++count;
return more;
}
- s16b closed_feat = feat_state(old_feat, FF_CLOSE);
+ s16b closed_feat = feat_state(creature_ptr, old_feat, FF_CLOSE);
/* Hack -- object in the way */
if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) &&
}
}
- if (is_hidden_door(g_ptr))
+ if (is_hidden_door(creature_ptr, g_ptr))
{
/* Occasional Search XXX XXX */
if (randint0(100) < 25) search(creature_ptr);
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Must be a closed door */
- if (!is_closed_door(g_ptr->feat))
+ if (!is_closed_door(creature_ptr, g_ptr->feat))
{
return FALSE;
}
o_idx = chest_check(creature_ptr->current_floor_ptr, y, x, TRUE);
/* Disarm a trap */
- if (!is_trap(feat) && !o_idx)
+ if (!is_trap(creature_ptr, feat) && !o_idx)
{
msg_print(_("そこには解除するものが見当たらない。", "You see nothing there to disarm."));
}
sound(have_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
/* Break down the door */
- if ((randint0(100) < 50) || (feat_state(g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
+ if ((randint0(100) < 50) || (feat_state(creature_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
{
cave_alter_feat(creature_ptr, y, x, FF_BASH);
}