From a89bf32eb87531922c74fd931a5f1f47479c54d8 Mon Sep 17 00:00:00 2001 From: Deskull Date: Tue, 5 Feb 2019 13:32:16 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E5=BE=8C=E3=81=A7?= =?utf8?q?=E5=90=8C=E5=90=8D=E3=81=AE=E6=A7=8B=E9=80=A0=E4=BD=93=E3=82=92?= =?utf8?q?=E4=BD=9C=E3=82=8A=E3=80=81feat=5F*=E3=81=A8=E5=91=BD=E5=90=8D?= =?utf8?q?=E3=82=92=E4=B8=80=E8=87=B4=E3=81=95=E3=81=9B=E3=82=8B=E3=81=9F?= =?utf8?q?=E3=82=81=20floor=5Ftype=20=E3=82=92=20feat=5Fground=5Ftype=20?= =?utf8?q?=E3=81=AB=E6=94=B9=E5=90=8D=E3=80=82=20/=20Rename=20floor=5Ftype?= =?utf8?q?=20to=20feat=5Fground=5Ftype=20for=20new=20structure=20and=20con?= =?utf8?q?sistent=20naming=20with=20feat=5F*.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cave.c | 2 +- src/externs.h | 2 +- src/floor-save.c | 4 ++-- src/grid.c | 4 ++-- src/grid.h | 4 ++-- src/rooms.c | 16 ++++++++-------- src/spells2.c | 4 ++-- src/variable.c | 2 +- src/wild.c | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/cave.c b/src/cave.c index 755036583..ba2162acc 100644 --- a/src/cave.c +++ b/src/cave.c @@ -4598,7 +4598,7 @@ FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat) switch (f_ptr->subtype) { case CONVERT_TYPE_FLOOR: - return floor_type[randint0(100)]; + return feat_ground_type[randint0(100)]; case CONVERT_TYPE_WALL: return fill_type[randint0(100)]; case CONVERT_TYPE_INNER: diff --git a/src/externs.h b/src/externs.h index 06535bd36..dbc539b2e 100644 --- a/src/externs.h +++ b/src/externs.h @@ -445,7 +445,7 @@ extern DEPTH *max_dlv; extern FEAT_IDX feat_wall_outer; extern FEAT_IDX feat_wall_inner; extern FEAT_IDX feat_wall_solid; -extern FEAT_IDX floor_type[100], fill_type[100]; +extern FEAT_IDX feat_ground_type[100], fill_type[100]; extern bool now_damaged; extern COMMAND_CODE now_message; extern bool use_menu; diff --git a/src/floor-save.c b/src/floor-save.c index 76a8a7fad..9997eff28 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -1140,7 +1140,7 @@ void change_floor(void) if (change_floor_mode & (CFM_DOWN | CFM_UP)) { /* Reset to floor */ - c_ptr->feat = floor_type[randint0(100)]; + c_ptr->feat = feat_ground_type[randint0(100)]; } c_ptr->special = 0; @@ -1483,7 +1483,7 @@ void stair_creation(void) /* Remove old stairs */ c_ptr->special = 0; - cave_set_feat(y, x, floor_type[randint0(100)]); + cave_set_feat(y, x, feat_ground_type[randint0(100)]); } } } diff --git a/src/grid.c b/src/grid.c index acd325d46..f6d09cdd9 100644 --- a/src/grid.c +++ b/src/grid.c @@ -182,7 +182,7 @@ void place_random_door(POSITION y, POSITION x, bool room) { if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY)) { - c_ptr->feat = one_in_(2) ? c_ptr->mimic : floor_type[randint0(100)]; + c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)]; } c_ptr->mimic = 0; } @@ -320,7 +320,7 @@ void place_secret_door(POSITION y, POSITION x, int type) { if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY)) { - c_ptr->feat = one_in_(2) ? c_ptr->mimic : floor_type[randint0(100)]; + c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)]; } c_ptr->mimic = 0; } diff --git a/src/grid.h b/src/grid.h index 3268555be..16f670221 100644 --- a/src/grid.h +++ b/src/grid.h @@ -65,7 +65,7 @@ #define place_floor_bold(Y, X) \ { \ - set_cave_feat(Y,X,floor_type[randint0(100)]); \ + set_cave_feat(Y,X,feat_ground_type[randint0(100)]); \ cave[Y][X].info &= ~(CAVE_MASK); \ add_cave_info(Y,X,CAVE_FLOOR); \ delete_monster(Y, X); \ @@ -73,7 +73,7 @@ #define place_floor_grid(C) \ { \ - (C)->feat = floor_type[randint0(100)]; \ + (C)->feat = feat_ground_type[randint0(100)]; \ (C)->info &= ~(CAVE_MASK); \ (C)->info |= CAVE_FLOOR; \ if ((C)->m_idx) delete_monster_idx((C)->m_idx); \ diff --git a/src/rooms.c b/src/rooms.c index 5135bfa4f..2a4391e82 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -968,9 +968,9 @@ bool generate_fracave(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, fill_data.c3 = 0; /* features to fill with */ - fill_data.feat1 = floor_type[randint0(100)]; - fill_data.feat2 = floor_type[randint0(100)]; - fill_data.feat3 = floor_type[randint0(100)]; + fill_data.feat1 = feat_ground_type[randint0(100)]; + fill_data.feat2 = feat_ground_type[randint0(100)]; + fill_data.feat3 = feat_ground_type[randint0(100)]; fill_data.info1 = CAVE_FLOOR; fill_data.info2 = CAVE_FLOOR; @@ -1189,21 +1189,21 @@ bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int case LAKE_T_LAVA: /* Lava */ feat1 = feat_deep_lava; feat2 = feat_shallow_lava; - feat3 = floor_type[randint0(100)]; + feat3 = feat_ground_type[randint0(100)]; break; case LAKE_T_WATER: /* Water */ feat1 = feat_deep_water; feat2 = feat_shallow_water; - feat3 = floor_type[randint0(100)]; + feat3 = feat_ground_type[randint0(100)]; break; case LAKE_T_CAVE: /* Collapsed cave */ - feat1 = floor_type[randint0(100)]; - feat2 = floor_type[randint0(100)]; + feat1 = feat_ground_type[randint0(100)]; + feat2 = feat_ground_type[randint0(100)]; feat3 = feat_rubble; break; case LAKE_T_EARTH_VAULT: /* Earth vault */ feat1 = feat_rubble; - feat2 = floor_type[randint0(100)]; + feat2 = feat_ground_type[randint0(100)]; feat3 = feat_rubble; break; case LAKE_T_AIR_VAULT: /* Air vault */ diff --git a/src/spells2.c b/src/spells2.c index 62904f6f3..f0d77339c 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -1542,7 +1542,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) else { /* Create floor */ - cave_set_feat(y, x, floor_type[randint0(100)]); + cave_set_feat(y, x, feat_ground_type[randint0(100)]); } } else /* In generation */ @@ -2040,7 +2040,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) else { /* Create floor */ - cave_set_feat(yy, xx, floor_type[randint0(100)]); + cave_set_feat(yy, xx, feat_ground_type[randint0(100)]); } } } diff --git a/src/variable.c b/src/variable.c index f85e0deeb..d471056f3 100644 --- a/src/variable.c +++ b/src/variable.c @@ -956,7 +956,7 @@ DEPTH *max_dlv; FEAT_IDX feat_wall_outer; FEAT_IDX feat_wall_inner; FEAT_IDX feat_wall_solid; -FEAT_IDX floor_type[100], fill_type[100]; +FEAT_IDX feat_ground_type[100], fill_type[100]; bool now_damaged; COMMAND_CODE now_message; diff --git a/src/wild.c b/src/wild.c index e3dd6c9b0..08dacb9c1 100644 --- a/src/wild.c +++ b/src/wild.c @@ -56,7 +56,7 @@ void set_floor_and_wall(DUNGEON_IDX type) cur_type = type; d_ptr = &d_info[type]; - set_floor_and_wall_aux(floor_type, d_ptr->floor); + set_floor_and_wall_aux(feat_ground_type, d_ptr->floor); set_floor_and_wall_aux(fill_type, d_ptr->fill); feat_wall_outer = d_ptr->outer_wall; -- 2.11.0