いた部分をcave_have_flag_*()としてまとめた. この過程でf_flags_*()は不
要になったため削除.
23 files changed:
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || have_flag(f_flags_bold(y, x), FF_PROJECT)))
+ if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
- if (!have_flag(f_flags_bold(py, px), FF_QUEST_ENTER))
+ if (!cave_have_flag_bold(py, px, FF_QUEST_ENTER))
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
- if (!have_flag(f_flags_bold(py, px), FF_BLDG))
+ if (!cave_have_flag_bold(py, px, FF_BLDG))
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
*/
bool is_known_trap(cave_type *c_ptr)
{
*/
bool is_known_trap(cave_type *c_ptr)
{
- if (!c_ptr->mimic && !have_flag(f_flags_grid(c_ptr), FF_SECRET) &&
+ if (!c_ptr->mimic && !cave_have_flag_grid(c_ptr, FF_SECRET) &&
is_trap(c_ptr->feat)) return TRUE;
else
return FALSE;
is_trap(c_ptr->feat)) return TRUE;
else
return FALSE;
*/
bool is_hidden_door(cave_type *c_ptr)
{
*/
bool is_hidden_door(cave_type *c_ptr)
{
- if ((c_ptr->mimic || have_flag(f_flags_grid(c_ptr), FF_SECRET)) &&
+ if ((c_ptr->mimic || cave_have_flag_grid(c_ptr, FF_SECRET)) &&
is_closed_door(c_ptr->feat))
return TRUE;
else
is_closed_door(c_ptr->feat))
return TRUE;
else
- if ((c_ptr->info & CAVE_MARK) && !have_flag(f_flags_grid(c_ptr), FF_PROJECT)) break;
+ if ((c_ptr->info & CAVE_MARK) && !cave_have_flag_grid(c_ptr, FF_PROJECT)) break;
/* Change color */
if (nx == x && ny == y) default_color = TERM_L_DARK;
/* Change color */
if (nx == x && ny == y) default_color = TERM_L_DARK;
if (c_ptr->dist != 0 && c_ptr->dist <= n && c_ptr->cost <= m) continue;
/* Ignore "walls" and "rubble" */
if (c_ptr->dist != 0 && c_ptr->dist <= n && c_ptr->cost <= m) continue;
/* Ignore "walls" and "rubble" */
- if (!have_flag(f_flags_grid(c_ptr), FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
+ if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
/* Save the flow cost */
if (c_ptr->cost == 0 || c_ptr->cost > m) c_ptr->cost = m;
/* Save the flow cost */
if (c_ptr->cost == 0 || c_ptr->cost > m) c_ptr->cost = m;
c_ptr = &cave[y][x];
/* Walls, water, and lava cannot hold scent. */
c_ptr = &cave[y][x];
/* Walls, water, and lava cannot hold scent. */
- if (!have_flag(f_flags_grid(c_ptr), FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
+ if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !is_closed_door(c_ptr->feat)) continue;
/* Grid must not be blocked by walls from the character */
if (!player_has_los_bold(y, x)) continue;
/* Grid must not be blocked by walls from the character */
if (!player_has_los_bold(y, x)) continue;
row = py + ddy[dir];
col = px + ddx[dir];
row = py + ddy[dir];
col = px + ddx[dir];
- ignore_avoid_run = have_flag(f_flags_bold(row, col), FF_AVOID_RUN);
+ ignore_avoid_run = cave_have_flag_bold(row, col, FF_AVOID_RUN);
/* Extract cycle index */
i = chome[dir];
/* Extract cycle index */
i = chome[dir];
}
/* Must be a wall/door/etc */
}
/* Must be a wall/door/etc */
- if (!have_flag(f_flags_grid(c_ptr), FF_TUNNEL))
+ if (!cave_have_flag_grid(c_ptr, FF_TUNNEL))
{
/* Message */
#ifdef JP
{
/* Message */
#ifdef JP
}
/* Hack again -- Is there a special encounter ??? */
}
/* Hack again -- Is there a special encounter ??? */
- if (p_ptr->wild_mode && !have_flag(f_flags_bold(py, px), FF_TOWN))
+ if (p_ptr->wild_mode && !cave_have_flag_bold(py, px, FF_TOWN))
{
int tmp = 120 + p_ptr->lev*10 - wilderness[py][px].level + 5;
if (tmp < 1)
{
int tmp = 120 + p_ptr->lev*10 - wilderness[py][px].level + 5;
if (tmp < 1)
mmove2(&ny, &nx, py, px, ty, tx);
/* Stopped by walls/doors */
mmove2(&ny, &nx, py, px, ty, tx);
/* Stopped by walls/doors */
- if (!have_flag(f_flags_bold(ny, nx), FF_PROJECT) && !cave[ny][nx].m_idx) break;
+ if (!cave_have_flag_bold(ny, nx, FF_PROJECT) && !cave[ny][nx].m_idx) break;
/* Advance the distance */
cur_dis++;
/* Advance the distance */
cur_dis++;
mmove2(&ny[cur_dis], &nx[cur_dis], py, px, ty, tx);
/* Stopped by walls/doors */
mmove2(&ny[cur_dis], &nx[cur_dis], py, px, ty, tx);
/* Stopped by walls/doors */
- if (!have_flag(f_flags_bold(ny[cur_dis], nx[cur_dis]), FF_PROJECT))
+ if (!cave_have_flag_bold(ny[cur_dis], nx[cur_dis], FF_PROJECT))
{
hit_wall = TRUE;
break;
{
hit_wall = TRUE;
break;
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || have_flag(f_flags_bold(y, x), FF_PROJECT)))
+ if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
if (MAX_RANGE <= distance(py, px, ny, nx)) break;
/* Stopped by walls/doors */
if (MAX_RANGE <= distance(py, px, ny, nx)) break;
/* Stopped by walls/doors */
- if (!have_flag(f_flags_bold(ny, nx), FF_PROJECT)) break;
+ if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
/* Stopped by monsters */
if ((dir != 5) && cave[ny][nx].m_idx != 0) break;
/* Stopped by monsters */
if ((dir != 5) && cave[ny][nx].m_idx != 0) break;
if (c_ptr->m_idx) continue;
/* Skip non-empty grids */
if (c_ptr->m_idx) continue;
/* Skip non-empty grids */
- if (!have_flag(f_flags_grid(c_ptr), FF_MOVE) && !have_flag(f_flags_grid(c_ptr), FF_CAN_FLY))
+ if (!cave_have_flag_grid(c_ptr, FF_MOVE) && !cave_have_flag_grid(c_ptr, FF_CAN_FLY))
{
if (!player_can_ride_aux(c_ptr, FALSE)) continue;
}
{
if (!player_can_ride_aux(c_ptr, FALSE)) continue;
}
- if (have_flag(f_flags_grid(c_ptr), FF_PATTERN)) continue;
+ if (cave_have_flag_grid(c_ptr, FF_PATTERN)) continue;
/* Count "safe" grids */
sn++;
/* Count "safe" grids */
sn++;
{
scatter(&y, &x, py, px, 4, 0);
{
scatter(&y, &x, py, px, 4, 0);
- if (!have_flag(f_flags_bold(y, x), FF_PROJECT)) continue;
+ if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
if (!player_bold(y, x)) break;
}
if (!player_bold(y, x)) break;
}
{
scatter(&y, &x, py, px, 4, 0);
{
scatter(&y, &x, py, px, 4, 0);
- if (!have_flag(f_flags_bold(y, x), FF_PROJECT)) continue;
+ if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
if (!player_bold(y, x)) break;
}
if (!player_bold(y, x)) break;
}
y = py+ddy[dir];
x = px+ddx[dir];
tsuri_dir = dir;
y = py+ddy[dir];
x = px+ddx[dir];
tsuri_dir = dir;
- if (!have_flag(f_flags_bold(y, x), FF_WATER))
+ if (!cave_have_flag_bold(y, x, FF_WATER))
{
#ifdef JP
msg_print("¤½¤³¤Ï¿åÊդǤϤʤ¤¡£");
{
#ifdef JP
msg_print("¤½¤³¤Ï¿åÊդǤϤʤ¤¡£");
-#define f_flags_bold(Y,X) \
- (f_info[cave[(Y)][(X)].feat].flags)
+#define cave_have_flag_bold(Y,X,INDEX) \
+ (have_flag(f_info[cave[(Y)][(X)].feat].flags, (INDEX)))
-#define f_flags_grid(C) \
- (f_info[(C)->feat].flags)
+#define cave_have_flag_grid(C,INDEX) \
+ (have_flag(f_info[(C)->feat].flags, (INDEX)))
* Line 3 -- forbid normal objects
*/
#define cave_clean_bold(Y,X) \
* Line 3 -- forbid normal objects
*/
#define cave_clean_bold(Y,X) \
- (have_flag(f_flags_bold((Y), (X)), FF_FLOOR) && \
+ (cave_have_flag_bold((Y), (X), FF_FLOOR) && \
!(cave[Y][X].info & CAVE_OBJECT) && \
(cave[Y][X].o_idx == 0))
!(cave[Y][X].info & CAVE_OBJECT) && \
(cave[Y][X].o_idx == 0))
* Line 2 -- forbid object terrains
*/
#define cave_drop_bold(Y,X) \
* Line 2 -- forbid object terrains
*/
#define cave_drop_bold(Y,X) \
- (have_flag(f_flags_bold((Y), (X)), FF_DROP) && \
+ (cave_have_flag_bold((Y), (X), FF_DROP) && \
!(cave[Y][X].info & CAVE_OBJECT))
!(cave[Y][X].info & CAVE_OBJECT))
* Line 3 -- forbid the player
*/
#define cave_empty_bold(Y,X) \
* Line 3 -- forbid the player
*/
#define cave_empty_bold(Y,X) \
- (have_flag(f_flags_bold((Y), (X)), FF_PLACE) && \
+ (cave_have_flag_bold((Y), (X), FF_PLACE) && \
!(cave[Y][X].m_idx) && \
!player_bold(Y,X))
!(cave[Y][X].m_idx) && \
!player_bold(Y,X))
*/
#define cave_empty_bold2(Y,X) \
(cave_empty_bold(Y,X) && \
*/
#define cave_empty_bold2(Y,X) \
(cave_empty_bold(Y,X) && \
- (character_dungeon || !have_flag(f_flags_bold((Y), (X)), FF_TREE)))
+ (character_dungeon || !cave_have_flag_bold((Y), (X), FF_TREE)))
* Line 1 -- permanent flag
*/
#define cave_perma_bold(Y,X) \
* Line 1 -- permanent flag
*/
#define cave_perma_bold(Y,X) \
- (have_flag(f_flags_bold((Y), (X)), FF_PERMANENT))
+ (cave_have_flag_bold((Y), (X), FF_PERMANENT))
/*
* Grid based version of "cave_empty_bold()"
*/
#define cave_empty_grid(C) \
/*
* Grid based version of "cave_empty_bold()"
*/
#define cave_empty_grid(C) \
- (have_flag(f_flags_grid(C), FF_PLACE) && \
+ (cave_have_flag_grid((C), FF_PLACE) && \
!((C)->m_idx) && \
!player_grid(C))
!((C)->m_idx) && \
!player_grid(C))
* Grid based version of "cave_perma_bold()"
*/
#define cave_perma_grid(C) \
* Grid based version of "cave_perma_bold()"
*/
#define cave_perma_grid(C) \
- (have_flag(f_flags_grid(C), FF_PERMANENT))
+ (cave_have_flag_grid((C), FF_PERMANENT))
#define pattern_tile(Y,X) \
#define pattern_tile(Y,X) \
- (have_flag(f_flags_bold((Y), (X)), FF_PATTERN))
+ (cave_have_flag_bold((Y), (X), FF_PATTERN))
/*
* Does the grid stop disintegration?
*/
#define cave_stop_disintegration(Y,X) \
/*
* Does the grid stop disintegration?
*/
#define cave_stop_disintegration(Y,X) \
- (!have_flag(f_flags_bold((Y), (X)), FF_PROJECT) && \
- (!have_flag(f_flags_bold((Y), (X)), FF_HURT_DISI) || \
- have_flag(f_flags_bold((Y), (X)), FF_PERMANENT)))
+ (!cave_have_flag_bold((Y), (X), FF_PROJECT) && \
+ (!cave_have_flag_bold((Y), (X), FF_HURT_DISI) || \
+ cave_have_flag_bold((Y), (X), FF_PERMANENT)))
- if (have_flag(f_flags_bold(y + 1, x), FF_WALL)) k++;
- if (have_flag(f_flags_bold(y - 1, x), FF_WALL)) k++;
- if (have_flag(f_flags_bold(y, x + 1), FF_WALL)) k++;
- if (have_flag(f_flags_bold(y, x - 1), FF_WALL)) k++;
+ if (cave_have_flag_bold(y + 1, x, FF_WALL)) k++;
+ if (cave_have_flag_bold(y - 1, x, FF_WALL)) k++;
+ if (cave_have_flag_bold(y, x + 1, FF_WALL)) k++;
+ if (cave_have_flag_bold(y, x - 1, FF_WALL)) k++;
c_ptr = &cave[y][x];
/* Skip non floors */
c_ptr = &cave[y][x];
/* Skip non floors */
- if (have_flag(f_flags_grid(c_ptr), FF_WALL)) continue;
+ if (cave_have_flag_grid(c_ptr, FF_WALL)) continue;
/* Skip non "empty floor" grids */
if (!is_floor_grid(c_ptr))
/* Skip non "empty floor" grids */
if (!is_floor_grid(c_ptr))
if (next_to_corr(y, x) >= 2)
{
/* Check Vertical */
if (next_to_corr(y, x) >= 2)
{
/* Check Vertical */
- if (have_flag(f_flags_bold(y - 1, x), FF_WALL) &&
- have_flag(f_flags_bold(y + 1, x), FF_WALL))
+ if (cave_have_flag_bold(y - 1, x, FF_WALL) &&
+ cave_have_flag_bold(y + 1, x, FF_WALL))
{
return (TRUE);
}
/* Check Horizontal */
{
return (TRUE);
}
/* Check Horizontal */
- if (have_flag(f_flags_bold(y, x - 1), FF_WALL) &&
- have_flag(f_flags_bold(y, x + 1), FF_WALL))
+ if (cave_have_flag_bold(y, x - 1, FF_WALL) &&
+ cave_have_flag_bold(y, x + 1, FF_WALL))
if (!in_bounds(y, x)) return;
/* Ignore walls */
if (!in_bounds(y, x)) return;
/* Ignore walls */
- if (have_flag(f_flags_bold(y, x), FF_WALL)) return;
+ if (cave_have_flag_bold(y, x, FF_WALL)) return;
/* Ignore room grids */
if (cave[y][x].info & (CAVE_ROOM)) return;
/* Ignore room grids */
if (cave[y][x].info & (CAVE_ROOM)) return;
if (cave[y][x].m_idx)
py_attack(y, x, HISSATSU_HAGAN);
if (cave[y][x].m_idx)
py_attack(y, x, HISSATSU_HAGAN);
- if (!have_flag(f_flags_bold(y, x), FF_HURT_ROCK)) break;
+ if (!cave_have_flag_bold(y, x, FF_HURT_ROCK)) break;
/* Destroy the feature */
cave_alter_feat(y, x, FF_HURT_ROCK);
/* Destroy the feature */
cave_alter_feat(y, x, FF_HURT_ROCK);
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || have_flag(f_flags_bold(y, x), FF_PROJECT)))
+ if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
{
if (!monster_living(&r_info[m_ptr->r_idx]))
{
{
if (!monster_living(&r_info[m_ptr->r_idx]))
{
damage *= p_ptr->num_blow[i];
total_damage += (damage / 100);
}
damage *= p_ptr->num_blow[i];
total_damage += (damage / 100);
}
- project(0, (have_flag(f_flags_bold(y, x), FF_PROJECT) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
+ project(0, (cave_have_flag_bold(y, x, FF_PROJECT) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
/* Hack -- Monsters can "smell" the player from far away */
/* Note that most monsters have "aaf" of "20" or so */
else if (!(m_ptr->mflag2 & MFLAG2_NOFLOW) &&
/* Hack -- Monsters can "smell" the player from far away */
/* Note that most monsters have "aaf" of "20" or so */
else if (!(m_ptr->mflag2 & MFLAG2_NOFLOW) &&
- have_flag(f_flags_bold(py, px), FF_MOVE) &&
+ cave_have_flag_bold(py, px, FF_MOVE) &&
(cave[py][px].when == cave[fy][fx].when) &&
(cave[fy][fx].dist < MONSTER_FLOW_DEPTH) &&
(cave[fy][fx].dist < r_ptr->aaf))
(cave[py][px].when == cave[fy][fx].when) &&
(cave[fy][fx].dist < MONSTER_FLOW_DEPTH) &&
(cave[fy][fx].dist < r_ptr->aaf))
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
m_ptr = &m_list[c_ptr->m_idx];
/* Hack -- attack monsters */
- if (c_ptr->m_idx && (m_ptr->ml || have_flag(f_flags_bold(y, x), FF_PROJECT)))
+ if (c_ptr->m_idx && (m_ptr->ml || cave_have_flag_bold(y, x, FF_PROJECT)))
py_attack(y, x, 0);
}
break;
py_attack(y, x, 0);
}
break;
- if (!cave_empty_bold2(y, x) && !have_flag(f_flags_bold(y, x), FF_MOUNTAIN)) continue;
+ if (!cave_empty_bold2(y, x) && !cave_have_flag_bold(y, x, FF_MOUNTAIN)) continue;
}
/* Accept far away grids */
}
/* Accept far away grids */
c_ptr = &cave[next_y][next_x];
/* Skip door, rubble, wall, tree, mountain, etc. */
c_ptr = &cave[next_y][next_x];
/* Skip door, rubble, wall, tree, mountain, etc. */
- if (!have_flag(f_flags_grid(c_ptr), FF_PROJECT)) continue;
+ if (!cave_have_flag_grid(c_ptr, FF_PROJECT)) continue;
if (projectable(m_ptr->fy, m_ptr->fx, next_y, next_x))
{
if (projectable(m_ptr->fy, m_ptr->fx, next_y, next_x))
{
else
{
/* Hack -- Balls explode before reaching walls */
else
{
/* Hack -- Balls explode before reaching walls */
- if (!have_flag(f_flags_bold(ny, nx), FF_PROJECT)) break;
+ if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
}
/* Save the "blast epicenter" */
}
/* Save the "blast epicenter" */
sx = GRID_X(path_g[i]);
/* Hack -- Balls explode before reaching walls */
sx = GRID_X(path_g[i]);
/* Hack -- Balls explode before reaching walls */
- if (!have_flag(f_flags_bold(sy, sx), FF_PROJECT)) break;
+ if (!cave_have_flag_bold(sy, sx, FF_PROJECT)) break;
{
cave_type *c_ptr = &cave[y][x];
{
cave_type *c_ptr = &cave[y][x];
- if (have_flag(f_flags_grid(c_ptr), FF_SECRET))
+ if (cave_have_flag_grid(c_ptr, FF_SECRET))
{
/* No longer hidden */
cave_alter_feat(y, x, FF_SECRET);
{
/* No longer hidden */
cave_alter_feat(y, x, FF_SECRET);
- else if (!have_flag(f_flags_grid(c_ptr), FF_CAN_DIG) || !have_flag(f_flags_grid(c_ptr), FF_HURT_ROCK))
+ else if (!cave_have_flag_grid(c_ptr, FF_CAN_DIG) || !cave_have_flag_grid(c_ptr, FF_HURT_ROCK))
{
#ifdef JP
msg_print("¹Å¤¹¤®¤ÆÊø¤»¤Ê¤«¤Ã¤¿¡£");
{
#ifdef JP
msg_print("¹Å¤¹¤®¤ÆÊø¤»¤Ê¤«¤Ã¤¿¡£");
cave[y0 + y - yhsize][x0 + x - xhsize].info &= ~(CAVE_ICKY | CAVE_ROOM);
/* Light lava */
cave[y0 + y - yhsize][x0 + x - xhsize].info &= ~(CAVE_ICKY | CAVE_ROOM);
/* Light lava */
- if (have_flag(f_flags_bold(y0 + y - yhsize, x0 + x - xhsize), FF_LAVA))
+ if (cave_have_flag_bold(y0 + y - yhsize, x0 + x - xhsize, FF_LAVA))
{
if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS)) cave[y0 + y - yhsize][x0 + x - xhsize].info |= CAVE_GLOW;
}
{
if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS)) cave[y0 + y - yhsize][x0 + x - xhsize].info |= CAVE_GLOW;
}
/* if floor, shallow water and lava */
if (is_floor_bold(y, x) ||
/* if floor, shallow water and lava */
if (is_floor_bold(y, x) ||
- (have_flag(f_flags_bold(y, x), FF_PLACE) && have_flag(f_flags_bold(y, x), FF_DROP)))
+ (cave_have_flag_bold(y, x, FF_PLACE) && cave_have_flag_bold(y, x, FF_DROP)))
{
/* The smaller 'value' is, the better the stuff */
if (value < 0)
{
/* The smaller 'value' is, the better the stuff */
if (value < 0)
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
- if ((n > 0) && !have_flag(f_flags_bold(y, x), FF_PROJECT)) break;
+ if ((n > 0) && !cave_have_flag_bold(y, x, FF_PROJECT)) break;
}
/* Sometimes stop at non-initial monsters/players */
}
/* Sometimes stop at non-initial monsters/players */
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
- if ((n > 0) && !have_flag(f_flags_bold(y, x), FF_PROJECT)) break;
+ if ((n > 0) && !cave_have_flag_bold(y, x, FF_PROJECT)) break;
}
/* Sometimes stop at non-initial monsters/players */
}
/* Sometimes stop at non-initial monsters/players */
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
else if (!(flg & (PROJECT_PATH)))
{
/* Always stop at non-initial wall grids */
- if ((n > 0) && !have_flag(f_flags_bold(y, x), FF_PROJECT)) break;
+ if ((n > 0) && !cave_have_flag_bold(y, x, FF_PROJECT)) break;
}
/* Sometimes stop at non-initial monsters/players */
}
/* Sometimes stop at non-initial monsters/players */
if (cave_perma_bold(y, x)) break;
/* Ignore grid without enough space */
if (cave_perma_bold(y, x)) break;
/* Ignore grid without enough space */
- if (!have_flag(f_flags_bold(y, x), FF_FLOOR)) break;
+ if (!cave_have_flag_bold(y, x, FF_FLOOR)) break;
/* Place a shallow lava */
cave_set_feat(y, x, FEAT_SHAL_LAVA);
/* Place a shallow lava */
cave_set_feat(y, x, FEAT_SHAL_LAVA);
if (cave_perma_bold(y, x)) break;
/* Ignore grid without enough space */
if (cave_perma_bold(y, x)) break;
/* Ignore grid without enough space */
- if (!have_flag(f_flags_bold(y, x), FF_FLOOR)) break;
+ if (!cave_have_flag_bold(y, x, FF_FLOOR)) break;
/* Place a shallow lava */
cave_set_feat(y, x, FEAT_SHAL_WATER);
/* Place a shallow lava */
cave_set_feat(y, x, FEAT_SHAL_WATER);
}
}
if(project_o(0,0,y,x,dam,GF_SUPER_RAY) )notice=TRUE;
}
}
if(project_o(0,0,y,x,dam,GF_SUPER_RAY) )notice=TRUE;
- if (!have_flag(f_flags_bold(y, x), FF_PROJECT))
+ if (!cave_have_flag_bold(y, x, FF_PROJECT))
{
if( second_step )continue;
break;
{
if( second_step )continue;
break;
else
{
/* Hack -- Balls explode before reaching walls */
else
{
/* Hack -- Balls explode before reaching walls */
- if (!have_flag(f_flags_bold(ny, nx), FF_PROJECT) && (rad > 0)) break;
+ if (!cave_have_flag_bold(ny, nx, FF_PROJECT) && (rad > 0)) break;
- if (have_flag(f_flags_grid(c_ptr), flag))
+ if (cave_have_flag_grid(c_ptr, flag))
{
/* Detect secrets */
disclose_grid(y, x);
{
/* Detect secrets */
disclose_grid(y, x);
c_ptr->info &= ~CAVE_OBJECT;
/* Wall (or floor) type */
c_ptr->info &= ~CAVE_OBJECT;
/* Wall (or floor) type */
- t = have_flag(f_flags_bold(yy, xx), FF_PROJECT) ? randint0(100) : 200;
+ t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
/* Granite */
if (t < 20)
/* Granite */
if (t < 20)
*/
static bool cave_pass_dark_bold(int y, int x)
{
*/
static bool cave_pass_dark_bold(int y, int x)
{
- return have_flag(f_flags_bold(y, x), FF_PROJECT);
+ return cave_have_flag_bold(y, x, FF_PROJECT);
{
scatter(&y, &x, py, px, 4, 0);
{
scatter(&y, &x, py, px, 4, 0);
- if (!have_flag(f_flags_bold(y, x), FF_PROJECT)) continue;
+ if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
if (!player_bold(y, x)) break;
}
if (!player_bold(y, x)) break;
}
{
c_ptr = &cave[py + ddy_ddd[i]][px + ddx_ddd[i]];
{
c_ptr = &cave[py + ddy_ddd[i]][px + ddx_ddd[i]];
- if (!have_flag(f_flags_grid(c_ptr), FF_PROJECT))
+ if (!cave_have_flag_grid(c_ptr, FF_PROJECT))
{
if (!c_ptr->mimic || !have_flag(f_info[c_ptr->mimic].flags, FF_PROJECT) ||
!permanent_wall(&f_info[c_ptr->feat]))
{
if (!c_ptr->mimic || !have_flag(f_info[c_ptr->mimic].flags, FF_PROJECT) ||
!permanent_wall(&f_info[c_ptr->feat]))
c_ptr = &cave[ty][tx];
if ((distance(py, px, ty, tx) > MAX_RANGE) ||
c_ptr = &cave[ty][tx];
if ((distance(py, px, ty, tx) > MAX_RANGE) ||
- !have_flag(f_flags_bold(ty, tx), FF_PROJECT)) return;
+ !cave_have_flag_bold(ty, tx, FF_PROJECT)) return;
}
while (!c_ptr->o_idx);
}
}
while (!c_ptr->o_idx);
}
c_ptr = &cave[py][px];
/* Verify a store */
c_ptr = &cave[py][px];
/* Verify a store */
- if (!have_flag(f_flags_grid(c_ptr), FF_STORE))
+ if (!cave_have_flag_grid(c_ptr, FF_STORE))
{
#ifdef JP
msg_print("¤³¤³¤Ë¤ÏŹ¤¬¤¢¤ê¤Þ¤»¤ó¡£");
{
#ifdef JP
msg_print("¤³¤³¤Ë¤ÏŹ¤¬¤¢¤ê¤Þ¤»¤ó¡£");
/* Get the cave grid */
c_ptr = &cave[y][x];
/* Get the cave grid */
c_ptr = &cave[y][x];
- if (have_flag(f_flags_grid(c_ptr), FF_ENTRANCE))
+ if (cave_have_flag_grid(c_ptr, FF_ENTRANCE))
{
if (c_ptr->m_idx) delete_monster_idx(c_ptr->m_idx);
p_ptr->oldpy = y;
{
if (c_ptr->m_idx) delete_monster_idx(c_ptr->m_idx);
p_ptr->oldpy = y;