OSDN Git Service

[Refactor] #38997 monster_can_*()にplayer_type * 引数を追加 / Added player_type * argument...
[hengband/hengband.git] / src / floor-generate.c
index d37ba8e..f0bb28b 100644 (file)
@@ -287,7 +287,7 @@ static bool alloc_stairs(player_type *owner_ptr, FEAT_IDX feat, int num, int wal
                        g_ptr->mimic = 0;
 
                        /* Clear previous contents, add stairs */
-                       g_ptr->feat = (i < shaft_num) ? feat_state(feat, FF_SHAFT) : feat;
+                       g_ptr->feat = (i < shaft_num) ? feat_state(owner_ptr, feat, FF_SHAFT) : feat;
 
                        /* No longer "FLOOR" */
                        g_ptr->info &= ~(CAVE_FLOOR);
@@ -377,7 +377,7 @@ static void alloc_object(player_type *owner_ptr, int set, EFFECT_ID typ, int num
 
                        case ALLOC_TYP_GOLD:
                        {
-                               place_gold(floor_ptr, y, x);
+                               place_gold(owner_ptr, y, x);
                                break;
                        }
 
@@ -454,7 +454,7 @@ bool place_quest_monsters(player_type *creature_ptr)
                                        f_ptr = &f_info[g_ptr->feat];
 
                                        if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) continue;
-                                       if (!monster_can_enter(y, x, r_ptr, 0)) continue;
+                                       if (!monster_can_enter(creature_ptr, y, x, r_ptr, 0)) continue;
                                        if (distance(y, x, creature_ptr->y, creature_ptr->x) < 10) continue;
                                        if (g_ptr->info & CAVE_ICKY) continue;
                                        else break;
@@ -1020,35 +1020,35 @@ static void build_arena(player_type *player_ptr, POSITION *start_y, POSITION *st
        for (i = y_height; i <= y_height + 5; i++)
                for (j = x_left; j <= x_right; j++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (i = y_depth; i >= y_depth - 5; i--)
                for (j = x_left; j <= x_right; j++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (j = x_left; j <= x_left + 17; j++)
                for (i = y_height; i <= y_depth; i++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (j = x_right; j >= x_right - 17; j--)
                for (i = y_height; i <= y_depth; i++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
 
-       place_extra_perm_bold(player_ptr, y_height + 6, x_left + 18);
+       place_bold(player_ptr, y_height + 6, x_left + 18, extra_perm);
        floor_ptr->grid_array[y_height + 6][x_left + 18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_depth - 6, x_left + 18);
+       place_bold(player_ptr, y_depth - 6, x_left + 18, extra_perm);
        floor_ptr->grid_array[y_depth - 6][x_left + 18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_height + 6, x_right - 18);
+       place_bold(player_ptr, y_height + 6, x_right - 18, extra_perm);
        floor_ptr->grid_array[y_height + 6][x_right - 18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_depth - 6, x_right - 18);
+       place_bold(player_ptr, y_depth - 6, x_right - 18, extra_perm);
        floor_ptr->grid_array[y_depth - 6][x_right - 18].info |= (CAVE_GLOW | CAVE_MARK);
 
        *start_y = y_height + 5;
@@ -1078,7 +1078,7 @@ static void generate_challenge_arena(player_type *challanger_ptr)
                for (x = 0; x < MAX_WID; x++)
                {
                        /* Create "solid" perma-wall */
-                       place_solid_perm_bold(challanger_ptr, y, x);
+                       place_bold(challanger_ptr, y, x, solid_perm);
 
                        /* Illuminate and memorize the walls */
                        floor_ptr->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
@@ -1128,35 +1128,35 @@ static void build_battle(player_type *player_ptr, POSITION *y, POSITION *x)
        for (i = y_height; i <= y_height + 5; i++)
                for (j = x_left; j <= x_right; j++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (i = y_depth; i >= y_depth - 3; i--)
                for (j = x_left; j <= x_right; j++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (j = x_left; j <= x_left + 17; j++)
                for (i = y_height; i <= y_depth; i++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
        for (j = x_right; j >= x_right - 17; j--)
                for (i = y_height; i <= y_depth; i++)
                {
-                       place_extra_perm_bold(player_ptr, i, j);
+                       place_bold(player_ptr, i, j, extra_perm);
                        floor_ptr->grid_array[i][j].info |= (CAVE_GLOW | CAVE_MARK);
                }
 
-       place_extra_perm_bold(player_ptr, y_height+6, x_left+18);
+       place_bold(player_ptr, y_height+6, x_left+18, extra_perm);
        floor_ptr->grid_array[y_height+6][x_left+18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_depth-4, x_left+18);
+       place_bold(player_ptr, y_depth-4, x_left+18, extra_perm);
        floor_ptr->grid_array[y_depth-4][x_left+18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_height+6, x_right-18);
+       place_bold(player_ptr, y_height+6, x_right-18, extra_perm);
        floor_ptr->grid_array[y_height+6][x_right-18].info |= (CAVE_GLOW | CAVE_MARK);
-       place_extra_perm_bold(player_ptr, y_depth-4, x_right-18);
+       place_bold(player_ptr, y_depth-4, x_right-18, extra_perm);
        floor_ptr->grid_array[y_depth-4][x_right-18].info |= (CAVE_GLOW | CAVE_MARK);
 
        for (i = y_height + 1; i <= y_height + 5; i++)
@@ -1192,7 +1192,7 @@ static void generate_gambling_arena(player_type *creature_ptr)
                for (x = 0; x < MAX_WID; x++)
                {
                        /* Create "solid" perma-wall */
-                       place_solid_perm_bold(creature_ptr, y, x);
+                       place_bold(creature_ptr, y, x, solid_perm);
 
                        /* Illuminate and memorize the walls */
                        floor_ptr->grid_array[y][x].info |= (CAVE_GLOW | CAVE_MARK);
@@ -1244,7 +1244,7 @@ static void generate_fixed_floor(player_type *player_ptr)
        {
                for (x = 0; x < floor_ptr->width; x++)
                {
-                       place_solid_perm_bold(player_ptr, y, x);
+                       place_bold(player_ptr, y, x, solid_perm);
                }
        }
 
@@ -1687,7 +1687,7 @@ bool build_tunnel(player_type *player_ptr, POSITION row1, POSITION col1, POSITIO
                                        if (is_outer_bold(floor_ptr, y, x))
                                        {
                                                /* Change the wall to a "solid" wall */
-                                               place_solid_noperm_bold(player_ptr, y, x);
+                                               place_bold(player_ptr, y, x, solid_noperm);
                                        }
                                }
                        }
@@ -1838,7 +1838,7 @@ static bool set_tunnel(player_type *player_ptr, POSITION *x, POSITION *y, bool a
                                if (is_outer_bold(floor_ptr, j, i))
                                {
                                        /* Change the wall to a "solid" wall */
-                                       place_solid_noperm_bold(player_ptr, j, i);
+                                       place_bold(player_ptr, j, i, solid_noperm);
                                }
                        }
                }
@@ -2136,7 +2136,7 @@ bool build_tunnel2(player_type *player_ptr, POSITION x1, POSITION y1, POSITION x
                        if (i == 0)
                        {
                                /* Failed for some reason: hack - ignore the solidness */
-                               place_outer_bold(player_ptr, y3, x3);
+                               place_bold(player_ptr, y3, x3, outer);
                                dx = 0;
                                dy = 0;
                        }