OSDN Git Service

地形フラグ参照に関して, have_flag(f_flags_*(), フラグ)として使われて
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 14 Dec 2003 13:16:42 +0000 (13:16 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 14 Dec 2003 13:16:42 +0000 (13:16 +0000)
いた部分をcave_have_flag_*()としてまとめた. この過程でf_flags_*()は不
要になったため削除.

23 files changed:
src/artifact.c
src/bldg.c
src/cave.c
src/cmd1.c
src/cmd2.c
src/cmd5.c
src/cmd6.c
src/defines.h
src/generate.c
src/hissatsu.c
src/melee2.c
src/mind.c
src/monster2.c
src/mspells1.c
src/mspells2.c
src/object2.c
src/racial.c
src/rooms.c
src/spells1.c
src/spells2.c
src/spells3.c
src/store.c
src/wild.c

index 21bc098..0c7e6e7 100644 (file)
@@ -2252,7 +2252,7 @@ bool activate_random_artifact(object_type * o_ptr)
                                        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);
                                }
                        }
index bd60535..44d4463 100644 (file)
@@ -4848,7 +4848,7 @@ void do_cmd_quest(void)
 {
        energy_use = 100;
 
-       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("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
@@ -4897,7 +4897,7 @@ void do_cmd_bldg(void)
 
        energy_use = 100;
 
-       if (!have_flag(f_flags_bold(py, px), FF_BLDG))
+       if (!cave_have_flag_bold(py, px, FF_BLDG))
        {
 #ifdef JP
                msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
index 39fd50e..7c42482 100644 (file)
@@ -73,7 +73,7 @@ bool is_trap(int feat)
  */
 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;
@@ -97,7 +97,7 @@ bool is_closed_door(int feat)
  */
 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
@@ -1757,7 +1757,7 @@ void prt_path(int y, int x)
                }
 
                /* Known Wall */
-               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;
@@ -4151,7 +4151,7 @@ void update_flow(void)
                        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;
@@ -4242,7 +4242,7 @@ void update_smell(void)
                        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;
index a098563..e874ca1 100644 (file)
@@ -4481,7 +4481,7 @@ static void run_init(int 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];
index 36e886e..837925a 100644 (file)
@@ -1482,7 +1482,7 @@ static bool do_cmd_tunnel_test(int y, int x)
        }
 
        /* 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
@@ -2728,7 +2728,7 @@ void do_cmd_walk(bool pickup)
        }
 
        /* 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) 
@@ -3514,7 +3514,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                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++;
@@ -4087,7 +4087,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
                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;
index 27a63fb..2e7d443 100644 (file)
@@ -1480,7 +1480,7 @@ msg_print("
                                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);
                        }
                }
@@ -4107,7 +4107,7 @@ msg_print("
                                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;
@@ -5527,12 +5527,12 @@ bool rakuba(int dam, bool force)
                        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 (have_flag(f_flags_grid(c_ptr), FF_PATTERN)) continue;
+                       if (cave_have_flag_grid(c_ptr, FF_PATTERN)) continue;
 
                        /* Count "safe" grids */
                        sn++;
index 3b8be6c..8261ab1 100644 (file)
@@ -2431,7 +2431,7 @@ static int staff_effect(int sval, bool *use_charge, bool magic, bool known)
                                {
                                        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;
                                }
@@ -4401,7 +4401,7 @@ msg_print("
                                        {
                                                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;
                                        }
@@ -5407,7 +5407,7 @@ msg_print("
                                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("¤½¤³¤Ï¿åÊդǤϤʤ¤¡£");
index 6864772..cfd2b7c 100644 (file)
        ((C) == &cave[py][px])
 
 
-#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) \
-       (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))
 
  * 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))
 
 
  * 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))
 
  */
 #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) \
-       (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) \
-       (have_flag(f_flags_grid(C), FF_PLACE) && \
+       (cave_have_flag_grid((C), FF_PLACE) && \
         !((C)->m_idx) && \
         !player_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) \
-       (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) \
-       (!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)))
 
 
 /*
index 240d5b7..74049cf 100644 (file)
@@ -128,10 +128,10 @@ static int next_to_walls(int y, int x)
 {
        int     k = 0;
 
-       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++;
 
        return (k);
 }
@@ -346,7 +346,7 @@ static int next_to_corr(int y1, int x1)
                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))
@@ -376,15 +376,15 @@ static bool possible_doorway(int y, int x)
        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 */
-               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))
                {
                        return (TRUE);
                }
@@ -404,7 +404,7 @@ static void try_door(int y, int x)
        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;
index dc2d201..bcbc98b 100644 (file)
@@ -632,7 +632,7 @@ static bool cast_hissatsu_spell(int spell)
                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);
@@ -761,7 +761,7 @@ static bool cast_hissatsu_spell(int spell)
                        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]))
                                {
@@ -1086,7 +1086,7 @@ msg_print("
                        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);
                break;
        }
        case 30:
index d038388..5d512de 100644 (file)
@@ -3716,7 +3716,7 @@ void process_monsters(void)
                /* 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))
index 6097965..98f2d78 100644 (file)
@@ -1531,7 +1531,7 @@ static bool cast_berserk_spell(int spell)
                        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;
index 6979431..b3accf6 100644 (file)
@@ -3851,7 +3851,7 @@ bool alloc_monster(int dis, u32b mode)
                }
                else
                {
-                       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 */
index 90f59f8..56a1b22 100644 (file)
@@ -1393,7 +1393,7 @@ bool make_attack_spell(int m_idx)
                                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))
                                {
index ce37643..70f0449 100644 (file)
@@ -171,7 +171,7 @@ static bool breath_direct(int y1, int x1, int y2, int x2, int rad, int typ, bool
                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" */
@@ -240,7 +240,7 @@ void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
                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;
 
                *ty = sy;
                *tx = sx;
index 108e843..9a968a8 100644 (file)
@@ -5301,7 +5301,7 @@ void disclose_grid(int y, int 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);
index 02c42f4..d40f8db 100644 (file)
@@ -124,7 +124,7 @@ static bool do_cmd_archer(void)
 #endif
                        return FALSE;
                }
-               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("¹Å¤¹¤®¤ÆÊø¤»¤Ê¤«¤Ã¤¿¡£");
index e2c046d..4892fae 100644 (file)
@@ -3906,7 +3906,7 @@ static bool generate_lake(int y0, int x0, int xsize, int ysize, int c1, int c2,
                        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;
                        }
@@ -4052,7 +4052,7 @@ static void fill_treasure(int x1, int x2, int y1, int y2, int difficulty)
 
                         /* 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)
index 46decc3..1eaf7cf 100644 (file)
@@ -375,7 +375,7 @@ sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg)
                        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 */
@@ -464,7 +464,7 @@ sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg)
                        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 */
@@ -535,7 +535,7 @@ sint project_path(u16b *gp, int range, int y1, int x1, int y2, int x2, int flg)
                        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 */
@@ -989,7 +989,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                                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);
@@ -1015,7 +1015,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                                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);
@@ -8617,7 +8617,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                }
                        }
                        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;
@@ -8691,7 +8691,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                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;
                }
 
                /* Advance */
index 2985da1..afa4fae 100644 (file)
@@ -3535,7 +3535,7 @@ static bool detect_feat_flag(int range, int flag, bool known)
                        }
 
                        /* Detect flags */
-                       if (have_flag(f_flags_grid(c_ptr), flag))
+                       if (cave_have_flag_grid(c_ptr, flag))
                        {
                                /* Detect secrets */
                                disclose_grid(y, x);
@@ -5860,7 +5860,7 @@ msg_format("%^s
                                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)
@@ -6279,7 +6279,7 @@ static void cave_temp_lite_room_aux(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);
 }
 
 /*
@@ -7292,7 +7292,7 @@ void wall_breaker(void)
                {
                        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;
                }
index d435b92..776d2a7 100644 (file)
@@ -1611,7 +1611,7 @@ void call_the_(void)
        {
                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]))
@@ -1800,7 +1800,7 @@ msg_print("
                        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);
        }
index 0587a54..a35e5a5 100644 (file)
@@ -4501,7 +4501,7 @@ void do_cmd_store(void)
        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("¤³¤³¤Ë¤ÏŹ¤¬¤¢¤ê¤Þ¤»¤ó¡£");
index 713e219..e5d41f2 100644 (file)
@@ -874,7 +874,7 @@ void wilderness_gen(void)
                                /* 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;