OSDN Git Service

[Refactor] #38997 place_solid_noperm_bold() を削除し、place_grid() に統合 / Removed place_sol...
authorHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 11:00:00 +0000 (20:00 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sat, 18 Jan 2020 14:01:53 +0000 (23:01 +0900)
src/floor-generate.c
src/grid.c
src/grid.h

index 3d0f1de..eaa5fe7 100644 (file)
@@ -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);
                                }
                        }
                }
index 24df711..92efe83 100644 (file)
@@ -1273,6 +1273,11 @@ void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type gb_typ
                g_ptr->info |= CAVE_SOLID;
                break;
        }
+       case solid_noperm:
+       {
+               // No such grid
+               return;
+       }
        default:
                return;
        }
@@ -1295,18 +1300,6 @@ bool darkened_grid(player_type *player_ptr, grid_type *g_ptr)
 }
 
 
-void place_solid_noperm_bold(player_type *player_ptr, POSITION y, POSITION x)
-{
-       feature_type *f_ptr = &f_info[feat_wall_solid];
-       floor_type *floor_ptr = player_ptr->current_floor_ptr;
-       if ((floor_ptr->grid_array[y][x].info & CAVE_VAULT) && permanent_wall(f_ptr))
-               set_cave_feat(floor_ptr, y, x, feat_state(feat_wall_solid, FF_UNPERM));
-       else set_cave_feat(floor_ptr, y, x, feat_wall_solid);
-       floor_ptr->grid_array[y][x].info &= ~(CAVE_MASK);
-       add_cave_info(floor_ptr, y, x, CAVE_SOLID);
-       delete_monster(player_ptr, y, x);
-}
-
 void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gb_type)
 {
        floor_type *floor_ptr = player_ptr->current_floor_ptr;
index 3a37182..d2a5fe8 100644 (file)
@@ -211,14 +211,14 @@ typedef enum grid_bold_type
        outer,
        outer_noperm,
        solid,
-       solid_perm
+       solid_perm,
+       solid_noperm
 } grid_bold_type;
 
 extern void place_grid(player_type *player_ptr, grid_type *g_ptr, grid_bold_type pg_type);
 extern bool darkened_grid(player_type *player_ptr, grid_type *g_ptr);
 extern void delete_monster(player_type *player_ptr, POSITION y, POSITION x);
 extern void place_bold(player_type *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
-void place_solid_noperm_bold(player_type *player_ptr, POSITION y, POSITION x);
 
 /*
  * Get feature mimic from f_info[] (applying "mimic" field)