OSDN Git Service

[Refactor] #2712 Renamed feature_action_flags to terrain_action_flags
authorHourier <66951241+Hourier@users.noreply.github.com>
Fri, 14 Oct 2022 09:51:34 +0000 (18:51 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Fri, 14 Oct 2022 12:50:57 +0000 (21:50 +0900)
src/grid/feature-action-flags.cpp
src/grid/feature-action-flags.h
src/grid/grid.cpp

index 9533b9d..1935ae9 100644 (file)
@@ -4,7 +4,7 @@
  * @brief 地形状態フラグテーブル /
  * The table of features' actions
  */
-const byte feature_action_flags[FF_FLAG_MAX] = {
+const byte terrain_action_flags[FF_FLAG_MAX] = {
     0, /* LOS */
     0, /* PROJECT */
     0, /* MOVE */
index f272f56..357a908 100644 (file)
@@ -3,10 +3,10 @@
 #include "system/angband.h"
 
 /*
- * Feature action flags
+ * Terrain action flags
  */
 #define FAF_DESTROY 0x01
 #define FAF_NO_DROP 0x02
 #define FAF_CRASH_GLASS 0x04
 
-extern const byte feature_action_flags[FF_FLAG_MAX];
+extern const byte terrain_action_flags[FF_FLAG_MAX];
index 88d7bc4..2b96dbe 100644 (file)
@@ -782,7 +782,7 @@ FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, FloorFeatureType actio
         return feat;
     }
 
-    return (feature_action_flags[enum2i(action)] & FAF_DESTROY) ? conv_dungeon_feat(floor_ptr, f_ptr->destroyed) : feat;
+    return (terrain_action_flags[enum2i(action)] & FAF_DESTROY) ? conv_dungeon_feat(floor_ptr, f_ptr->destroyed) : feat;
 }
 
 /*
@@ -806,7 +806,7 @@ void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, FloorFeatur
     /* Set the new feature */
     cave_set_feat(player_ptr, y, x, newfeat);
 
-    if (!(feature_action_flags[enum2i(action)] & FAF_NO_DROP)) {
+    if (!(terrain_action_flags[enum2i(action)] & FAF_NO_DROP)) {
         terrain_type *old_f_ptr = &terrains_info[oldfeat];
         auto *f_ptr = &terrains_info[newfeat];
         bool found = false;
@@ -830,7 +830,7 @@ void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, FloorFeatur
         }
     }
 
-    if (feature_action_flags[enum2i(action)] & FAF_CRASH_GLASS) {
+    if (terrain_action_flags[enum2i(action)] & FAF_CRASH_GLASS) {
         terrain_type *old_f_ptr = &terrains_info[oldfeat];
 
         if (old_f_ptr->flags.has(FloorFeatureType::GLASS) && w_ptr->character_dungeon) {