bool player_can_see_bold(int y, int x)
{
cave_type *c_ptr;
- s16b feat;
/* Blind players see nothing */
if (p_ptr->blind) return FALSE;
if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) return FALSE;
/* Feature code (applying "mimic" field) */
- feat = get_feat_mimic(c_ptr);
-
/* Floors are simple */
- if (feat_supports_los(feat)) return TRUE;
+ if (feat_supports_los(get_feat_mimic(c_ptr))) return TRUE;
/* Check for "local" illumination */
return check_local_illumination(y, x);
*/
#define darkened_grid_hack() \
{ \
- if (feat_supports_los(feat)) \
+ if (have_flag(f_ptr->flags, FF_LOS)) \
{ \
/* Unsafe cave grid -- idea borrowed from Unangband */ \
if (view_unsafe_grids && (c_ptr->info & CAVE_UNSAFE)) \
}
/* Not glowing correctly */
- else if (!feat_supports_los(feat) && !check_local_illumination(y, x))
+ else if (!have_flag(f_ptr->flags, FF_LOS) && !check_local_illumination(y, x))
{
/* Use a darkened colour/tile */
a = f_ptr->x_attr[F_LIT_DARK];
if (!(c_ptr->info & (CAVE_MARK)))
{
/* Feature code (applying "mimic" field) */
- s16b feat = get_feat_mimic(c_ptr);
+ feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
/* Memorize some "boring" grids */
- if (!have_flag(f_info[feat].flags, FF_REMEMBER))
+ if (!have_flag(f_ptr->flags, FF_REMEMBER))
{
/* Option -- memorize all torch-lit floors */
if (view_torch_grids &&
}
/* Memorize normal grids */
- else if (feat_supports_los(feat))
+ else if (have_flag(f_ptr->flags, FF_LOS))
{
/* Memorize */
c_ptr->info |= (CAVE_MARK);
f_ptr = &f_info[c_ptr->feat];
/* Get back to old saved floor? */
- if (c_ptr->special && !feat_uses_special(c_ptr->feat) && get_sf_ptr(c_ptr->special))
+ if (c_ptr->special && !have_flag(f_ptr->flags, FF_SPECIAL) && get_sf_ptr(c_ptr->special))
{
/* Saved floor is exist. Use it. */
new_floor_id = c_ptr->special;
/* Check path */
if (projectable(m_ptr->fy, m_ptr->fx, y, x))
{
- if (!have_flag(f_flags_bold(y, x), FF_PROJECT))
+ feature_type *f_ptr = &f_info[cave[y][x].feat];
+
+ if (!have_flag(f_ptr->flags, FF_PROJECT))
{
/* Breath disintegration to the wall if possible */
- if ((f4 & RF4_BR_DISI) && have_flag(f_flags_bold(y, x), FF_HURT_DISI) && one_in_(2)) do_spell = DO_SPELL_BR_DISI;
+ if ((f4 & RF4_BR_DISI) && have_flag(f_ptr->flags, FF_HURT_DISI) && one_in_(2)) do_spell = DO_SPELL_BR_DISI;
/* Breath lite to the transparent wall if possible */
- else if ((f4 & RF4_BR_LITE) && cave_los_bold(y, x) && one_in_(2)) do_spell = DO_SPELL_BR_LITE;
+ else if ((f4 & RF4_BR_LITE) && have_flag(f_ptr->flags, FF_LOS) && one_in_(2)) do_spell = DO_SPELL_BR_LITE;
}
}