• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiona89bf32eb87531922c74fd931a5f1f47479c54d8 (tree)
Time2019-02-05 13:32:41
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 後で同名の構造体を作り、feat_*と命名を一致させるため floor_type を feat_ground_type に改名。 / Rename floor_type to feat_ground_type for new structure and consistent naming with feat_*.

Change Summary

Incremental Difference

--- a/src/cave.c
+++ b/src/cave.c
@@ -4598,7 +4598,7 @@ FEAT_IDX conv_dungeon_feat(FEAT_IDX newfeat)
45984598 switch (f_ptr->subtype)
45994599 {
46004600 case CONVERT_TYPE_FLOOR:
4601- return floor_type[randint0(100)];
4601+ return feat_ground_type[randint0(100)];
46024602 case CONVERT_TYPE_WALL:
46034603 return fill_type[randint0(100)];
46044604 case CONVERT_TYPE_INNER:
--- a/src/externs.h
+++ b/src/externs.h
@@ -445,7 +445,7 @@ extern DEPTH *max_dlv;
445445 extern FEAT_IDX feat_wall_outer;
446446 extern FEAT_IDX feat_wall_inner;
447447 extern FEAT_IDX feat_wall_solid;
448-extern FEAT_IDX floor_type[100], fill_type[100];
448+extern FEAT_IDX feat_ground_type[100], fill_type[100];
449449 extern bool now_damaged;
450450 extern COMMAND_CODE now_message;
451451 extern bool use_menu;
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -1140,7 +1140,7 @@ void change_floor(void)
11401140 if (change_floor_mode & (CFM_DOWN | CFM_UP))
11411141 {
11421142 /* Reset to floor */
1143- c_ptr->feat = floor_type[randint0(100)];
1143+ c_ptr->feat = feat_ground_type[randint0(100)];
11441144 }
11451145
11461146 c_ptr->special = 0;
@@ -1483,7 +1483,7 @@ void stair_creation(void)
14831483
14841484 /* Remove old stairs */
14851485 c_ptr->special = 0;
1486- cave_set_feat(y, x, floor_type[randint0(100)]);
1486+ cave_set_feat(y, x, feat_ground_type[randint0(100)]);
14871487 }
14881488 }
14891489 }
--- a/src/grid.c
+++ b/src/grid.c
@@ -182,7 +182,7 @@ void place_random_door(POSITION y, POSITION x, bool room)
182182 {
183183 if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY))
184184 {
185- c_ptr->feat = one_in_(2) ? c_ptr->mimic : floor_type[randint0(100)];
185+ c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)];
186186 }
187187 c_ptr->mimic = 0;
188188 }
@@ -320,7 +320,7 @@ void place_secret_door(POSITION y, POSITION x, int type)
320320 {
321321 if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY))
322322 {
323- c_ptr->feat = one_in_(2) ? c_ptr->mimic : floor_type[randint0(100)];
323+ c_ptr->feat = one_in_(2) ? c_ptr->mimic : feat_ground_type[randint0(100)];
324324 }
325325 c_ptr->mimic = 0;
326326 }
--- a/src/grid.h
+++ b/src/grid.h
@@ -65,7 +65,7 @@
6565
6666 #define place_floor_bold(Y, X) \
6767 { \
68- set_cave_feat(Y,X,floor_type[randint0(100)]); \
68+ set_cave_feat(Y,X,feat_ground_type[randint0(100)]); \
6969 cave[Y][X].info &= ~(CAVE_MASK); \
7070 add_cave_info(Y,X,CAVE_FLOOR); \
7171 delete_monster(Y, X); \
@@ -73,7 +73,7 @@
7373
7474 #define place_floor_grid(C) \
7575 { \
76- (C)->feat = floor_type[randint0(100)]; \
76+ (C)->feat = feat_ground_type[randint0(100)]; \
7777 (C)->info &= ~(CAVE_MASK); \
7878 (C)->info |= CAVE_FLOOR; \
7979 if ((C)->m_idx) delete_monster_idx((C)->m_idx); \
--- a/src/rooms.c
+++ b/src/rooms.c
@@ -968,9 +968,9 @@ bool generate_fracave(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize,
968968 fill_data.c3 = 0;
969969
970970 /* features to fill with */
971- fill_data.feat1 = floor_type[randint0(100)];
972- fill_data.feat2 = floor_type[randint0(100)];
973- fill_data.feat3 = floor_type[randint0(100)];
971+ fill_data.feat1 = feat_ground_type[randint0(100)];
972+ fill_data.feat2 = feat_ground_type[randint0(100)];
973+ fill_data.feat3 = feat_ground_type[randint0(100)];
974974
975975 fill_data.info1 = CAVE_FLOOR;
976976 fill_data.info2 = CAVE_FLOOR;
@@ -1189,21 +1189,21 @@ bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int
11891189 case LAKE_T_LAVA: /* Lava */
11901190 feat1 = feat_deep_lava;
11911191 feat2 = feat_shallow_lava;
1192- feat3 = floor_type[randint0(100)];
1192+ feat3 = feat_ground_type[randint0(100)];
11931193 break;
11941194 case LAKE_T_WATER: /* Water */
11951195 feat1 = feat_deep_water;
11961196 feat2 = feat_shallow_water;
1197- feat3 = floor_type[randint0(100)];
1197+ feat3 = feat_ground_type[randint0(100)];
11981198 break;
11991199 case LAKE_T_CAVE: /* Collapsed cave */
1200- feat1 = floor_type[randint0(100)];
1201- feat2 = floor_type[randint0(100)];
1200+ feat1 = feat_ground_type[randint0(100)];
1201+ feat2 = feat_ground_type[randint0(100)];
12021202 feat3 = feat_rubble;
12031203 break;
12041204 case LAKE_T_EARTH_VAULT: /* Earth vault */
12051205 feat1 = feat_rubble;
1206- feat2 = floor_type[randint0(100)];
1206+ feat2 = feat_ground_type[randint0(100)];
12071207 feat3 = feat_rubble;
12081208 break;
12091209 case LAKE_T_AIR_VAULT: /* Air vault */
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -1542,7 +1542,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
15421542 else
15431543 {
15441544 /* Create floor */
1545- cave_set_feat(y, x, floor_type[randint0(100)]);
1545+ cave_set_feat(y, x, feat_ground_type[randint0(100)]);
15461546 }
15471547 }
15481548 else /* In generation */
@@ -2040,7 +2040,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
20402040 else
20412041 {
20422042 /* Create floor */
2043- cave_set_feat(yy, xx, floor_type[randint0(100)]);
2043+ cave_set_feat(yy, xx, feat_ground_type[randint0(100)]);
20442044 }
20452045 }
20462046 }
--- a/src/variable.c
+++ b/src/variable.c
@@ -956,7 +956,7 @@ DEPTH *max_dlv;
956956 FEAT_IDX feat_wall_outer;
957957 FEAT_IDX feat_wall_inner;
958958 FEAT_IDX feat_wall_solid;
959-FEAT_IDX floor_type[100], fill_type[100];
959+FEAT_IDX feat_ground_type[100], fill_type[100];
960960
961961 bool now_damaged;
962962 COMMAND_CODE now_message;
--- a/src/wild.c
+++ b/src/wild.c
@@ -56,7 +56,7 @@ void set_floor_and_wall(DUNGEON_IDX type)
5656 cur_type = type;
5757 d_ptr = &d_info[type];
5858
59- set_floor_and_wall_aux(floor_type, d_ptr->floor);
59+ set_floor_and_wall_aux(feat_ground_type, d_ptr->floor);
6060 set_floor_and_wall_aux(fill_type, d_ptr->fill);
6161
6262 feat_wall_outer = d_ptr->outer_wall;
Show on old repository browser