From: Hourier Date: Sat, 18 Jan 2020 11:00:00 +0000 (+0900) Subject: [Refactor] #38997 place_solid_noperm_bold() を削除し、place_grid() に統合 / Removed place_sol... X-Git-Tag: vmacos3.0.0-alpha52~1903^2~15 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9c559064dd7917552874a256eab24cbd4fd4632c;p=hengbandforosx%2Fhengbandosx.git [Refactor] #38997 place_solid_noperm_bold() を削除し、place_grid() に統合 / Removed place_solid_noperm_bold() and unified into place_bold() --- diff --git a/src/floor-generate.c b/src/floor-generate.c index 3d0f1de0f..eaa5fe773 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -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); } } } diff --git a/src/grid.c b/src/grid.c index 24df7110f..92efe8388 100644 --- a/src/grid.c +++ b/src/grid.c @@ -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; diff --git a/src/grid.h b/src/grid.h index 3a3718222..d2a5fe8f4 100644 --- a/src/grid.h +++ b/src/grid.h @@ -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)