OSDN Git Service

[Refactor] #2738 struct floor_type をclass FloorType に変えた
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 05:56:22 +0000 (14:56 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 29 Oct 2022 05:56:22 +0000 (14:56 +0900)
70 files changed:
src/action/open-util.cpp
src/action/open-util.h
src/action/travel-execution.cpp
src/action/travel-execution.h
src/action/tunnel-execution.cpp
src/core/object-compressor.cpp
src/floor/cave-generator.cpp
src/floor/cave.cpp
src/floor/cave.h
src/floor/fixed-map-generator.cpp
src/floor/floor-changer.cpp
src/floor/floor-events.cpp
src/floor/floor-events.h
src/floor/floor-generator.cpp
src/floor/floor-generator.h
src/floor/floor-leaver.cpp
src/floor/floor-object.cpp
src/floor/floor-object.h
src/floor/floor-streams.cpp
src/floor/floor-streams.h
src/floor/floor-util.cpp
src/floor/floor-util.h
src/floor/object-allocator.cpp
src/floor/object-scanner.cpp
src/floor/wild.cpp
src/grid/feature-generator.cpp
src/grid/feature.cpp
src/grid/feature.h
src/grid/grid.cpp
src/grid/grid.h
src/grid/stair.cpp
src/grid/stair.h
src/info-reader/general-parser.cpp
src/info-reader/general-parser.h
src/inventory/inventory-util.cpp
src/inventory/inventory-util.h
src/mind/mind-elementalist.cpp
src/mind/mind-mirror-master.cpp
src/monster-floor/monster-lite.cpp
src/monster-floor/monster-lite.h
src/monster/monster-list.cpp
src/monster/monster-list.h
src/monster/monster-status-setter.cpp
src/monster/monster-status.cpp
src/monster/monster-status.h
src/monster/monster-util.cpp
src/mspell/mspell-lite.cpp
src/mspell/mspell-summon.cpp
src/mspell/mspell-util.cpp
src/mspell/mspell-util.h
src/object/object-index-list.cpp
src/object/object-index-list.h
src/room/cave-filler.cpp
src/room/cave-filler.h
src/room/rooms-pit-nest.cpp
src/room/space-finder.cpp
src/specific-object/torch.cpp
src/spell-kind/spells-lite.cpp
src/spell/range-calc.cpp
src/spell/range-calc.h
src/system/floor-type-definition.cpp
src/system/floor-type-definition.h
src/system/monster-type-definition.h
src/system/player-type-definition.h
src/view/display-map.cpp
src/window/display-sub-windows.cpp
src/window/display-sub-windows.h
src/wizard/wizard-spells.h
src/world/world-object.cpp
src/world/world-object.h

index ad20489..e0120d4 100644 (file)
@@ -20,7 +20,7 @@
  * @param trapped TRUEならばトラップが存在する箱のみ、FALSEならば空でない箱全てを対象にする
  * @return 箱が存在する場合そのオブジェクトID、存在しない場合0を返す。
  */
-OBJECT_IDX chest_check(floor_type *floor_ptr, POSITION y, POSITION x, bool trapped)
+OBJECT_IDX chest_check(FloorType *floor_ptr, POSITION y, POSITION x, bool trapped)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     for (const auto this_o_idx : g_ptr->o_idx_list) {
index cc6adf3..3d60a67 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
-OBJECT_IDX chest_check(floor_type *floor_ptr, POSITION y, POSITION x, bool trapped);
+OBJECT_IDX chest_check(FloorType *floor_ptr, POSITION y, POSITION x, bool trapped);
 int count_chests(PlayerType *player_ptr, POSITION *y, POSITION *x, bool trapped);
index aec13e9..8fb636a 100644 (file)
@@ -129,7 +129,7 @@ void travel_step(PlayerType *player_ptr)
  * @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information
  * @param player_ptr   プレイヤーへの参照ポインタ
  */
-void forget_travel_flow(floor_type *floor_ptr)
+void forget_travel_flow(FloorType *floor_ptr)
 {
     for (POSITION y = 0; y < floor_ptr->height; y++) {
         for (POSITION x = 0; x < floor_ptr->width; x++) {
index d3a173c..e38d07b 100644 (file)
@@ -18,7 +18,7 @@ struct travel_type {
 
 extern travel_type travel;
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 void travel_step(PlayerType *player_ptr);
-void forget_travel_flow(floor_type *floor_ptr);
+void forget_travel_flow(FloorType *floor_ptr);
index 5cad63b..3b0b89c 100644 (file)
@@ -26,7 +26,7 @@
  * @param x 対象を行うマスのX座標
  * @return
  */
-static bool do_cmd_tunnel_test(floor_type *floor_ptr, POSITION y, POSITION x)
+static bool do_cmd_tunnel_test(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     if (!g_ptr->is_mark()) {
index 6d17960..6c52654 100644 (file)
@@ -19,7 +19,7 @@
  * @param i1 オブジェクト移動元の要素番号
  * @param i2 オブジェクト移動先の要素番号
  */
-static void compact_objects_aux(floor_type *floor_ptr, OBJECT_IDX i1, OBJECT_IDX i2)
+static void compact_objects_aux(FloorType *floor_ptr, OBJECT_IDX i1, OBJECT_IDX i2)
 {
     if (i1 == i2) {
         return;
index 7213192..81d1b19 100644 (file)
@@ -31,7 +31,7 @@
 #include "util/bit-flags-calculator.h"
 #include "wizard/wizard-messages.h"
 
-static void reset_lite_area(floor_type *floor_ptr)
+static void reset_lite_area(FloorType *floor_ptr)
 {
     floor_ptr->lite_n = 0;
     floor_ptr->mon_lite_n = 0;
@@ -189,7 +189,7 @@ static void make_doors(PlayerType *player_ptr, dun_data_type *dd_ptr, dt_type *d
     }
 }
 
-static void make_only_tunnel_points(floor_type *floor_ptr, dun_data_type *dd_ptr)
+static void make_only_tunnel_points(FloorType *floor_ptr, dun_data_type *dd_ptr)
 {
     int point_num = (floor_ptr->width * floor_ptr->height) / 200 + randint1(3);
     dd_ptr->cent_n = point_num;
@@ -385,7 +385,7 @@ static bool allocate_dungeon_data(PlayerType *player_ptr, dun_data_type *dd_ptr,
     return false;
 }
 
-static void decide_grid_glowing(floor_type *floor_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
+static void decide_grid_glowing(FloorType *floor_ptr, dun_data_type *dd_ptr, dungeon_type *d_ptr)
 {
     bool is_empty_or_dark = dd_ptr->empty_level;
     is_empty_or_dark &= !one_in_(DARK_EMPTY) || (randint1(100) > floor_ptr->dun_level);
index df8a937..3ceb963 100644 (file)
@@ -18,7 +18,7 @@
 /*
  * Determines if a map location is fully inside the outer walls
  */
-bool in_bounds(floor_type *floor_ptr, POSITION y, POSITION x)
+bool in_bounds(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return (y > 0) && (x > 0) && (y < floor_ptr->height - 1) && (x < floor_ptr->width - 1);
 }
@@ -26,7 +26,7 @@ bool in_bounds(floor_type *floor_ptr, POSITION y, POSITION x)
 /*
  * Determines if a map location is on or inside the outer walls
  */
-bool in_bounds2(floor_type *floor_ptr, POSITION y, POSITION x)
+bool in_bounds2(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return (y >= 0) && (x >= 0) && (y < floor_ptr->height) && (x < floor_ptr->width);
 }
@@ -35,7 +35,7 @@ bool in_bounds2(floor_type *floor_ptr, POSITION y, POSITION x)
  * Determines if a map location is on or inside the outer walls
  * (unsigned version)
  */
-bool in_bounds2u(floor_type *floor_ptr, POSITION y, POSITION x)
+bool in_bounds2u(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return (y < floor_ptr->height) && (x < floor_ptr->width);
 }
@@ -71,7 +71,7 @@ bool is_cave_empty_bold2(PlayerType *player_ptr, POSITION y, POSITION x)
     return is_empty_grid;
 }
 
-bool cave_has_flag_bold(floor_type *floor_ptr, POSITION y, POSITION x, TerrainCharacteristics f_idx)
+bool cave_has_flag_bold(FloorType *floor_ptr, POSITION y, POSITION x, TerrainCharacteristics f_idx)
 {
     return terrains_info[floor_ptr->grid_array[y][x].feat].flags.has(f_idx);
 }
@@ -95,7 +95,7 @@ bool player_bold(PlayerType *player_ptr, POSITION y, POSITION x)
 /*
  * Does the grid stop disintegration?
  */
-bool cave_stop_disintegration(floor_type *floor_ptr, POSITION y, POSITION x)
+bool cave_stop_disintegration(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return !cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::PROJECT) && (!cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::HURT_DISI) || cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::PERMANENT));
 }
@@ -107,7 +107,7 @@ bool cave_stop_disintegration(floor_type *floor_ptr, POSITION y, POSITION x)
  * @param x 指定X座標
  * @return 光を通すならばtrueを返す。
  */
-bool cave_los_bold(floor_type *floor_ptr, POSITION y, POSITION x)
+bool cave_los_bold(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return feat_supports_los(floor_ptr->grid_array[y][x].feat);
 }
@@ -128,7 +128,7 @@ bool feat_supports_los(FEAT_IDX f_idx)
  * Line 2 -- forbid object terrains
  * Line 3 -- forbid normal objects
  */
-bool cave_clean_bold(floor_type *floor_ptr, POSITION y, POSITION x)
+bool cave_clean_bold(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::FLOOR) && ((floor_ptr->grid_array[y][x].is_object()) == 0) && floor_ptr->grid_array[y][x].o_idx_list.empty();
 }
@@ -139,12 +139,12 @@ bool cave_clean_bold(floor_type *floor_ptr, POSITION y, POSITION x)
  * Line 1 -- forbid non-drops
  * Line 2 -- forbid object terrains
  */
-bool cave_drop_bold(floor_type *floor_ptr, POSITION y, POSITION x)
+bool cave_drop_bold(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::DROP) && ((floor_ptr->grid_array[y][x].is_object()) == 0);
 }
 
-bool pattern_tile(floor_type *floor_ptr, POSITION y, POSITION x)
+bool pattern_tile(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::PATTERN);
 }
index 5304024..1f056d5 100644 (file)
@@ -2,21 +2,21 @@
 
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 struct grid_type;
 class PlayerType;
 enum class TerrainCharacteristics;
-bool in_bounds(floor_type *floor_ptr, POSITION y, POSITION x);
-bool in_bounds2(floor_type *floor_ptr, POSITION y, POSITION x);
-bool in_bounds2u(floor_type *floor_ptr, POSITION y, POSITION x);
+bool in_bounds(FloorType *floor_ptr, POSITION y, POSITION x);
+bool in_bounds2(FloorType *floor_ptr, POSITION y, POSITION x);
+bool in_bounds2u(FloorType *floor_ptr, POSITION y, POSITION x);
 bool is_cave_empty_bold(PlayerType *player_ptr, POSITION x, POSITION y);
 bool is_cave_empty_bold2(PlayerType *player_ptr, POSITION x, POSITION y);
-bool cave_has_flag_bold(floor_type *floor_ptr, POSITION y, POSITION x, TerrainCharacteristics f_idx);
+bool cave_has_flag_bold(FloorType *floor_ptr, POSITION y, POSITION x, TerrainCharacteristics f_idx);
 bool player_has_los_bold(PlayerType *player_ptr, POSITION y, POSITION x);
 bool player_bold(PlayerType *player_ptr, POSITION y, POSITION x);
-bool cave_stop_disintegration(floor_type *floor_ptr, POSITION y, POSITION x);
-bool cave_los_bold(floor_type *floor_ptr, POSITION y, POSITION x);
+bool cave_stop_disintegration(FloorType *floor_ptr, POSITION y, POSITION x);
+bool cave_los_bold(FloorType *floor_ptr, POSITION y, POSITION x);
 bool feat_supports_los(FEAT_IDX f_idx);
-bool cave_clean_bold(floor_type *floor_ptr, POSITION y, POSITION x);
-bool cave_drop_bold(floor_type *floor_ptr, POSITION y, POSITION x);
-bool pattern_tile(floor_type *floor_ptr, POSITION y, POSITION x);
+bool cave_clean_bold(FloorType *floor_ptr, POSITION y, POSITION x);
+bool cave_drop_bold(FloorType *floor_ptr, POSITION y, POSITION x);
+bool pattern_tile(FloorType *floor_ptr, POSITION y, POSITION x);
index e855562..9ac30d6 100644 (file)
@@ -62,7 +62,7 @@ qtwg_type *initialize_quest_generator_type(qtwg_type *qtwg_ptr, char *buf, int y
  * @param x 配置先X座標
  * @return エラーコード
  */
-static void drop_here(floor_type *floor_ptr, ObjectType *j_ptr, POSITION y, POSITION x)
+static void drop_here(FloorType *floor_ptr, ObjectType *j_ptr, POSITION y, POSITION x)
 {
     OBJECT_IDX o_idx = o_pop(floor_ptr);
     ObjectType *o_ptr;
index f1cc3aa..dab9d97 100644 (file)
@@ -177,7 +177,7 @@ static void place_pet(PlayerType *player_ptr)
  * while new floor creation since dungeons may be re-created by
  * auto-scum option.
  */
-static void update_unique_artifact(floor_type *floor_ptr, int16_t cur_floor_id)
+static void update_unique_artifact(FloorType *floor_ptr, int16_t cur_floor_id)
 {
     for (int i = 1; i < floor_ptr->m_max; i++) {
         const auto &m_ref = floor_ptr->m_list[i];
index 6ad998c..ab0bef9 100644 (file)
@@ -345,7 +345,7 @@ void glow_deep_lava_and_bldg(PlayerType *player_ptr)
 /*
  * Actually erase the entire "lite" array, redrawing every grid
  */
-void forget_lite(floor_type *floor_ptr)
+void forget_lite(FloorType *floor_ptr)
 {
     if (!floor_ptr->lite_n) {
         return;
@@ -363,7 +363,7 @@ void forget_lite(floor_type *floor_ptr)
 /*
  * Clear the viewable space
  */
-void forget_view(floor_type *floor_ptr)
+void forget_view(FloorType *floor_ptr)
 {
     if (!floor_ptr->view_n) {
         return;
index d056843..213b345 100644 (file)
@@ -1,10 +1,10 @@
 #pragma once
 
 class PlayerType;
-struct floor_type;
+class FloorType;
 void day_break(PlayerType *player_ptr);
 void night_falls(PlayerType *player_ptr);
 void update_dungeon_feeling(PlayerType *player_ptr);
 void glow_deep_lava_and_bldg(PlayerType *player_ptr);
-void forget_lite(floor_type *floor_ptr);
-void forget_view(floor_type *floor_ptr);
+void forget_lite(FloorType *floor_ptr);
+void forget_view(FloorType *floor_ptr);
index 6cd8e50..39a1d0e 100644 (file)
@@ -331,7 +331,7 @@ static bool level_gen(PlayerType *player_ptr, concptr *why)
 /*!
  * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after grid_array generation
  */
-void wipe_generate_random_floor_flags(floor_type *floor_ptr)
+void wipe_generate_random_floor_flags(FloorType *floor_ptr)
 {
     for (POSITION y = 0; y < floor_ptr->height; y++) {
         for (POSITION x = 0; x < floor_ptr->width; x++) {
@@ -391,17 +391,17 @@ void clear_cave(PlayerType *player_ptr)
     floor_ptr->object_level = floor_ptr->base_level;
 }
 
-typedef bool (*IsWallFunc)(const floor_type *, int, int);
+typedef bool (*IsWallFunc)(const FloorType *, int, int);
 
 // (y,x) がプレイヤーが通れない永久地形かどうかを返す。
-static bool is_permanent_blocker(const floor_type *const floor_ptr, const int y, const int x)
+static bool is_permanent_blocker(const FloorType *const floor_ptr, const int y, const int x)
 {
     const FEAT_IDX feat = floor_ptr->grid_array[y][x].feat;
     const auto &flags = terrains_info[feat].flags;
     return flags.has(TerrainCharacteristics::PERMANENT) && flags.has_not(TerrainCharacteristics::MOVE);
 }
 
-static void floor_is_connected_dfs(const floor_type *const floor_ptr, const IsWallFunc is_wall, const int y_start, const int x_start, bool *const visited)
+static void floor_is_connected_dfs(const FloorType *const floor_ptr, const IsWallFunc is_wall, const int y_start, const int x_start, bool *const visited)
 {
     // clang-format off
     static const int DY[8] = { -1, -1, -1,  0, 0,  1, 1, 1 };
@@ -449,7 +449,7 @@ static void floor_is_connected_dfs(const floor_type *const floor_ptr, const IsWa
 // 各セルの8近傍は互いに移動可能とし、is_wall が真を返すセルのみを壁とみなす。
 //
 // 連結成分数が 0 の場合、偽を返す。
-static bool floor_is_connected(const floor_type *const floor_ptr, const IsWallFunc is_wall)
+static bool floor_is_connected(const FloorType *const floor_ptr, const IsWallFunc is_wall)
 {
     static std::array<bool, MAX_HGT * MAX_WID> visited;
 
index b7e722e..0ec2e8d 100644 (file)
@@ -1,7 +1,7 @@
 #pragma once
 
-struct floor_type;
+class FloorType;
 class PlayerType;
-void wipe_generate_random_floor_flags(floor_type *floor_ptr);
+void wipe_generate_random_floor_flags(FloorType *floor_ptr);
 void clear_cave(PlayerType *player_ptr);
 void generate_floor(PlayerType *player_ptr);
index 173982e..d66fd67 100644 (file)
@@ -152,7 +152,7 @@ static void preserve_pet(PlayerType *player_ptr)
  * @brief 新フロアに移動元フロアに繋がる階段を配置する / Virtually teleport onto the stairs that is connecting between two floors.
  * @param sf_ptr 移動元の保存フロア構造体参照ポインタ
  */
-static void locate_connected_stairs(PlayerType *player_ptr, floor_type *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
+static void locate_connected_stairs(PlayerType *player_ptr, FloorType *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
 {
     POSITION sx = 0;
     POSITION sy = 0;
index bbcb6f2..a8f79b8 100644 (file)
@@ -81,7 +81,7 @@ static void object_mention(PlayerType *player_ptr, ObjectType *o_ptr)
     msg_format_wizard(player_ptr, CHEAT_OBJECT, _("%sを生成しました。", "%s was generated."), o_name);
 }
 
-static int get_base_floor(floor_type *floor_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level)
+static int get_base_floor(FloorType *floor_ptr, BIT_FLAGS mode, std::optional<int> rq_mon_level)
 {
     if (any_bits(mode, AM_GREAT)) {
         if (rq_mon_level.has_value()) {
@@ -290,7 +290,7 @@ void delete_object_idx(PlayerType *player_ptr, OBJECT_IDX o_idx)
  * @param floo_ptr 現在フロアへの参照ポインタ
  * @param o_idx 削除対象のオブジェクト構造体ポインタ
  */
-void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx)
+void excise_object_idx(FloorType *floor_ptr, OBJECT_IDX o_idx)
 {
     auto &list = get_o_idx_list_contains(floor_ptr, o_idx);
     list.remove(o_idx);
@@ -302,7 +302,7 @@ void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx)
  * @param o_idx 参照を得るリストに含まれるOBJECT_IDX
  * @return o_idxを含む ObjectIndexList への参照
  */
-ObjectIndexList &get_o_idx_list_contains(floor_type *floor_ptr, OBJECT_IDX o_idx)
+ObjectIndexList &get_o_idx_list_contains(FloorType *floor_ptr, OBJECT_IDX o_idx)
 {
     auto *o_ptr = &floor_ptr->o_list[o_idx];
 
@@ -575,7 +575,7 @@ OBJECT_IDX drop_near(PlayerType *player_ptr, ObjectType *j_ptr, PERCENTAGE chanc
  * @param floo_ptr 現在フロアへの参照ポインタ
  * @param item メッセージの対象にしたいアイテム所持スロット
  */
-void floor_item_charges(floor_type *floor_ptr, INVENTORY_IDX item)
+void floor_item_charges(FloorType *floor_ptr, INVENTORY_IDX item)
 {
     auto *o_ptr = &floor_ptr->o_list[item];
     if ((o_ptr->tval != ItemKindType::STAFF) && (o_ptr->tval != ItemKindType::WAND)) {
index ed026ef..3f59fa9 100644 (file)
@@ -6,7 +6,7 @@
 
 class ObjectIndexList;
 
-struct floor_type;
+class FloorType;
 class ObjectType;
 class PlayerType;
 class ItemTester;
@@ -16,9 +16,9 @@ void delete_all_items_from_floor(PlayerType *player_ptr, POSITION y, POSITION x)
 void floor_item_increase(PlayerType *player_ptr, INVENTORY_IDX item, ITEM_NUMBER num);
 void floor_item_optimize(PlayerType *player_ptr, INVENTORY_IDX item);
 void delete_object_idx(PlayerType *player_ptr, OBJECT_IDX o_idx);
-void excise_object_idx(floor_type *floor_ptr, OBJECT_IDX o_idx);
-ObjectIndexList &get_o_idx_list_contains(floor_type *floor_ptr, OBJECT_IDX o_idx);
+void excise_object_idx(FloorType *floor_ptr, OBJECT_IDX o_idx);
+ObjectIndexList &get_o_idx_list_contains(FloorType *floor_ptr, OBJECT_IDX o_idx);
 OBJECT_IDX drop_near(PlayerType *player_ptr, ObjectType *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
-void floor_item_charges(floor_type *player_ptr, INVENTORY_IDX item);
+void floor_item_charges(FloorType *player_ptr, INVENTORY_IDX item);
 void floor_item_describe(PlayerType *player_ptr, INVENTORY_IDX item);
 ObjectType *choose_object(PlayerType *player_ptr, OBJECT_IDX *idx, concptr q, concptr s, BIT_FLAGS option, const ItemTester &item_tester = AllMatchItemTester());
index 54f1c14..191432b 100644 (file)
@@ -54,7 +54,7 @@
  * @param feat2 境界部地形ID
  * @param width 基本幅
  */
-static void recursive_river(floor_type *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, FEAT_IDX feat1, FEAT_IDX feat2, POSITION width)
+static void recursive_river(FloorType *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, FEAT_IDX feat1, FEAT_IDX feat2, POSITION width)
 {
     POSITION dx, dy, length, l, x, y;
     POSITION changex, changey;
@@ -169,7 +169,7 @@ static void recursive_river(floor_type *floor_ptr, POSITION x1, POSITION y1, POS
  * @param feat1 中央部地形ID
  * @param feat2 境界部地形ID
  */
-void add_river(floor_type *floor_ptr, dun_data_type *dd_ptr)
+void add_river(FloorType *floor_ptr, dun_data_type *dd_ptr)
 {
     dungeon_type *dungeon_ptr;
     POSITION y2, x2;
index 34f6769..f81c864 100644 (file)
@@ -3,9 +3,9 @@
 #include "system/angband.h"
 
 struct dun_data_type;
-struct floor_type;
+class FloorType;
 class PlayerType;
-void add_river(floor_type *floor_ptr, dun_data_type *dd_ptr);
+void add_river(FloorType *floor_ptr, dun_data_type *dd_ptr);
 void build_streamer(PlayerType *player_ptr, FEAT_IDX feat, int chance);
 void place_trees(PlayerType *player_ptr, POSITION x, POSITION y);
 void destroy_level(PlayerType *player_ptr);
index a58780a..0da0a9b 100644 (file)
@@ -30,7 +30,7 @@
  * Not completely allocated, that would be inefficient
  * Not completely hardcoded, that would overflow memory
  */
-floor_type floor_info;
+FloorType floor_info;
 
 static int scent_when = 0;
 
@@ -50,7 +50,7 @@ static int scent_when = 0;
  * Whenever the age count loops, most of the scent trail is erased and
  * the age of the remainder is recalculated.
  */
-void update_smell(floor_type *floor_ptr, PlayerType *player_ptr)
+void update_smell(FloorType *floor_ptr, PlayerType *player_ptr)
 {
     /* Create a table that controls the spread of scent */
     const int scent_adjust[5][5] = {
@@ -100,7 +100,7 @@ void update_smell(floor_type *floor_ptr, PlayerType *player_ptr)
 /*
  * Hack -- forget the "flow" information
  */
-void forget_flow(floor_type *floor_ptr)
+void forget_flow(FloorType *floor_ptr)
 {
     for (POSITION y = 0; y < floor_ptr->height; y++) {
         for (POSITION x = 0; x < floor_ptr->width; x++) {
@@ -122,7 +122,7 @@ void forget_flow(floor_type *floor_ptr)
  * clear those fields for grids/monsters containing objects,
  * and we clear it once for every such object.
  */
-void wipe_o_list(floor_type *floor_ptr)
+void wipe_o_list(FloorType *floor_ptr)
 {
     for (OBJECT_IDX i = 1; i < floor_ptr->o_max; i++) {
         auto *o_ptr = &floor_ptr->o_list[i];
index a67c64f..2ff48d8 100644 (file)
@@ -2,12 +2,12 @@
 
 #include "system/angband.h"
 
-struct floor_type;
-extern floor_type floor_info;
+class FloorType;
+extern FloorType floor_info;
 
 class PlayerType;
-void update_smell(floor_type *floor_ptr, PlayerType *player_ptr);
-void forget_flow(floor_type *floor_ptr);
-void wipe_o_list(floor_type *floor_ptr);
+void update_smell(FloorType *floor_ptr, PlayerType *player_ptr);
+void forget_flow(FloorType *floor_ptr);
+void wipe_o_list(FloorType *floor_ptr);
 void scatter(PlayerType *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
 concptr map_name(PlayerType *player_ptr);
index 5982c66..418997c 100644 (file)
@@ -29,7 +29,7 @@
  * @note Assumes "in_bounds()"
  * @details We count only granite walls and permanent walls.
  */
-static int next_to_walls(floor_type *floor_ptr, POSITION y, POSITION x)
+static int next_to_walls(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     int k = 0;
     if (in_bounds(floor_ptr, y + 1, x) && floor_ptr->grid_array[y + 1][x].is_extra()) {
@@ -168,7 +168,7 @@ bool alloc_stairs(PlayerType *player_ptr, FEAT_IDX feat, int num, int walls)
  * @param Y 指定Y座標
  * @param X 指定X座標
  */
-static void place_rubble(floor_type *floor_ptr, POSITION y, POSITION x)
+static void place_rubble(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     set_cave_feat(floor_ptr, y, x, feat_rubble);
 }
index e15217d..cb82cff 100644 (file)
@@ -70,7 +70,7 @@ ITEM_NUMBER scan_floor_items(PlayerType *player_ptr, OBJECT_IDX *items, POSITION
  */
 /*
  */
-static void prepare_label_string_floor(floor_type *floor_ptr, char *label, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
+static void prepare_label_string_floor(FloorType *floor_ptr, char *label, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
 {
     concptr alphabet_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
     strcpy(label, alphabet_chars);
index 904e223..1258ae9 100644 (file)
@@ -128,7 +128,7 @@ void set_floor_and_wall(DUNGEON_IDX type)
  * @param depth_max 深みの最大値
  */
 static void perturb_point_mid(
-    floor_type *floor_ptr, FEAT_IDX x1, FEAT_IDX x2, FEAT_IDX x3, FEAT_IDX x4, POSITION xmid, POSITION ymid, FEAT_IDX rough, FEAT_IDX depth_max)
+    FloorType *floor_ptr, FEAT_IDX x1, FEAT_IDX x2, FEAT_IDX x3, FEAT_IDX x4, POSITION xmid, POSITION ymid, FEAT_IDX rough, FEAT_IDX depth_max)
 {
     FEAT_IDX tmp2 = rough * 2 + 1;
     FEAT_IDX tmp = randint1(tmp2) - (rough + 1);
@@ -159,7 +159,7 @@ static void perturb_point_mid(
  * @param rough ランダム幅
  * @param depth_max 深みの最大値
  */
-static void perturb_point_end(floor_type *floor_ptr, FEAT_IDX x1, FEAT_IDX x2, FEAT_IDX x3, POSITION xmid, POSITION ymid, FEAT_IDX rough, FEAT_IDX depth_max)
+static void perturb_point_end(FloorType *floor_ptr, FEAT_IDX x1, FEAT_IDX x2, FEAT_IDX x3, POSITION xmid, POSITION ymid, FEAT_IDX rough, FEAT_IDX depth_max)
 {
     FEAT_IDX tmp2 = rough * 2 + 1;
     FEAT_IDX tmp = randint0(tmp2) - rough;
@@ -197,7 +197,7 @@ static void perturb_point_end(floor_type *floor_ptr, FEAT_IDX x1, FEAT_IDX x2, F
  * need to be converted to features.
  * </pre>
  */
-static void plasma_recursive(floor_type *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, FEAT_IDX depth_max, FEAT_IDX rough)
+static void plasma_recursive(FloorType *floor_ptr, POSITION x1, POSITION y1, POSITION x2, POSITION y2, FEAT_IDX depth_max, FEAT_IDX rough)
 {
     POSITION xmid = (x2 - x1) / 2 + x1;
     POSITION ymid = (y2 - y1) / 2 + y1;
@@ -231,7 +231,7 @@ static int16_t terrain_table[MAX_WILDERNESS][MAX_FEAT_IN_TERRAIN];
  * @param border 未使用
  * @param corner 広域マップの角部分としての生成ならばTRUE
  */
-static void generate_wilderness_area(floor_type *floor_ptr, int terrain, uint32_t seed, bool corner)
+static void generate_wilderness_area(FloorType *floor_ptr, int terrain, uint32_t seed, bool corner)
 {
     if (terrain == TERRAIN_EDGE) {
         for (POSITION y1 = 0; y1 < MAX_HGT; y1++) {
index 20fdfe5..631c599 100644 (file)
@@ -119,7 +119,7 @@ void gen_caverns_and_lakes(PlayerType *player_ptr, dungeon_type *dungeon_ptr, du
  * grids which are not in rooms.  We might want to also count stairs,\n
  * open doors, closed doors, etc.
  */
-static int next_to_corr(floor_type *floor_ptr, POSITION y1, POSITION x1)
+static int next_to_corr(FloorType *floor_ptr, POSITION y1, POSITION x1)
 {
     int k = 0;
     for (int i = 0; i < 4; i++) {
@@ -144,7 +144,7 @@ static int next_to_corr(floor_type *floor_ptr, POSITION y1, POSITION x1)
  * @return ドアを設置可能ならばTRUEを返す
  * @details まず垂直方向に、次に水平方向に調べる
  */
-static bool possible_doorway(floor_type *floor_ptr, POSITION y, POSITION x)
+static bool possible_doorway(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     if (next_to_corr(floor_ptr, y, x) < 2) {
         return false;
index 1ebec7d..0b3fc58 100644 (file)
@@ -277,7 +277,7 @@ void cave_set_feat(PlayerType *player_ptr, POSITION y, POSITION x, FEAT_IDX feat
     }
 }
 
-FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat)
+FEAT_IDX conv_dungeon_feat(FloorType *floor_ptr, FEAT_IDX newfeat)
 {
     auto *f_ptr = &terrains_info[newfeat];
     if (f_ptr->flags.has_not(TerrainCharacteristics::CONVERT)) {
index 8fd8035..9b7d531 100644 (file)
@@ -69,7 +69,7 @@ extern FEAT_IDX feat_wall_solid;
 extern FEAT_IDX feat_ground_type[100];
 extern FEAT_IDX feat_wall_type[100];
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 class TerrainType;
 bool is_closed_door(PlayerType *player_ptr, FEAT_IDX feat);
@@ -80,4 +80,4 @@ bool permanent_wall(TerrainType *f_ptr);
 FEAT_IDX feat_locked_door_random(int door_type);
 FEAT_IDX feat_jammed_door_random(int door_type);
 void cave_set_feat(PlayerType *player_ptr, POSITION y, POSITION x, FEAT_IDX feat);
-FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat);
+FEAT_IDX conv_dungeon_feat(FloorType *floor_ptr, FEAT_IDX newfeat);
index 32a73af..3099bd8 100644 (file)
@@ -670,7 +670,7 @@ void update_flow(PlayerType *player_ptr)
 {
     POSITION x, y;
     DIRECTION d;
-    floor_type *f_ptr = player_ptr->current_floor_ptr;
+    FloorType *f_ptr = player_ptr->current_floor_ptr;
 
     /* The last way-point is on the map */
     if (player_ptr->running && in_bounds(f_ptr, flow_y, flow_x)) {
@@ -767,7 +767,7 @@ void update_flow(PlayerType *player_ptr)
  * Take a feature, determine what that feature becomes
  * through applying the given action.
  */
-FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, TerrainCharacteristics action)
+FEAT_IDX feat_state(FloorType *floor_ptr, FEAT_IDX feat, TerrainCharacteristics action)
 {
     auto *f_ptr = &terrains_info[feat];
     int i;
@@ -1094,7 +1094,7 @@ void place_bold(PlayerType *player_ptr, POSITION y, POSITION x, grid_bold_type g
     place_grid(player_ptr, g_ptr, gb_type);
 }
 
-void set_cave_feat(floor_type *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx)
+void set_cave_feat(FloorType *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx)
 {
     floor_ptr->grid_array[y][x].feat = feature_idx;
 }
@@ -1154,7 +1154,7 @@ bool feat_uses_special(FEAT_IDX f_idx)
  * have already been placed into the "lite" array, and we are never
  * called when the "lite" array is full.
  */
-void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x)
+void cave_lite_hack(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     if (g_ptr->is_lite()) {
@@ -1169,7 +1169,7 @@ void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x)
 /*
  * For delayed visual update
  */
-void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x)
+void cave_redraw_later(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     if (g_ptr->is_redraw()) {
@@ -1184,13 +1184,13 @@ void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x)
 /*
  * For delayed visual update
  */
-void cave_note_and_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x)
+void cave_note_and_redraw_later(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     floor_ptr->grid_array[y][x].info |= CAVE_NOTE;
     cave_redraw_later(floor_ptr, y, x);
 }
 
-void cave_view_hack(floor_type *floor_ptr, POSITION y, POSITION x)
+void cave_view_hack(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     if (g_ptr->is_view()) {
index 4768c4e..044e780 100644 (file)
@@ -42,7 +42,7 @@ enum grid_bold_type {
     GB_SOLID_NOPERM
 };
 
-struct floor_type;
+class FloorType;
 struct grid_type;
 class PlayerType;
 struct monster_race;
@@ -58,7 +58,7 @@ void print_bolt_pict(PlayerType *player_ptr, POSITION y, POSITION x, POSITION ny
 void note_spot(PlayerType *player_ptr, POSITION y, POSITION x);
 void lite_spot(PlayerType *player_ptr, POSITION y, POSITION x);
 void update_flow(PlayerType *player_ptr);
-FEAT_IDX feat_state(floor_type *floor_ptr, FEAT_IDX feat, TerrainCharacteristics action);
+FEAT_IDX feat_state(FloorType *floor_ptr, FEAT_IDX feat, TerrainCharacteristics action);
 void cave_alter_feat(PlayerType *player_ptr, POSITION y, POSITION x, TerrainCharacteristics action);
 bool is_open(PlayerType *player_ptr, FEAT_IDX feat);
 bool check_local_illumination(PlayerType *player_ptr, POSITION y, POSITION x);
@@ -68,9 +68,9 @@ void place_grid(PlayerType *player_ptr, grid_type *g_ptr, grid_bold_type pg_type
 bool darkened_grid(PlayerType *player_ptr, grid_type *g_ptr);
 void delete_monster(PlayerType *player_ptr, POSITION y, POSITION x);
 void place_bold(PlayerType *player_ptr, POSITION y, POSITION x, grid_bold_type gh_type);
-void set_cave_feat(floor_type *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx);
+void set_cave_feat(FloorType *floor_ptr, POSITION y, POSITION x, FEAT_IDX feature_idx);
 int count_dt(PlayerType *player_ptr, POSITION *y, POSITION *x, bool (*test)(PlayerType *, FEAT_IDX), bool under);
-void cave_lite_hack(floor_type *floor_ptr, POSITION y, POSITION x);
-void cave_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
-void cave_note_and_redraw_later(floor_type *floor_ptr, POSITION y, POSITION x);
-void cave_view_hack(floor_type *floor_ptr, POSITION y, POSITION x);
+void cave_lite_hack(FloorType *floor_ptr, POSITION y, POSITION x);
+void cave_redraw_later(FloorType *floor_ptr, POSITION y, POSITION x);
+void cave_note_and_redraw_later(FloorType *floor_ptr, POSITION y, POSITION x);
+void cave_view_hack(FloorType *floor_ptr, POSITION y, POSITION x);
index 2ab3095..277cbf3 100644 (file)
@@ -68,7 +68,7 @@ void place_random_stairs(PlayerType *player_ptr, POSITION y, POSITION x)
  * @details
  * 条件は永久地形でなく、なおかつ該当のマスにアーティファクトが存在しないか、である。英語の旧コメントに反して*破壊*の抑止判定には現在使われていない。
  */
-bool cave_valid_bold(floor_type *floor_ptr, POSITION y, POSITION x)
+bool cave_valid_bold(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     auto *g_ptr = &floor_ptr->grid_array[y][x];
     if (g_ptr->cave_has_flag(TerrainCharacteristics::PERMANENT)) {
index 5b42d40..3b567d8 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 void place_random_stairs(PlayerType *player_ptr, POSITION y, POSITION x);
-bool cave_valid_bold(floor_type *floor_ptr, POSITION y, POSITION x);
+bool cave_valid_bold(FloorType *floor_ptr, POSITION y, POSITION x);
index 4540383..9b5df9c 100644 (file)
@@ -73,7 +73,7 @@ errr init_info_txt(FILE *fp, char *buf, angband_header *head, Parser parse_info_
  * @param buf 解析文字列
  * @return エラーコード
  */
-parse_error_type parse_line_feature(floor_type *floor_ptr, char *buf)
+parse_error_type parse_line_feature(FloorType *floor_ptr, char *buf)
 {
     if (init_flags & INIT_ONLY_BUILDINGS) {
         return PARSE_ERROR_NONE;
index 3c799b5..75dc5e1 100644 (file)
@@ -23,9 +23,9 @@ struct dungeon_grid {
 extern dungeon_grid letter[255];
 
 struct angband_header;
-struct floor_type;
+class FloorType;
 
 using Parser = std::function<errr(std::string_view, angband_header *)>;
 errr init_info_txt(FILE *fp, char *buf, angband_header *head, Parser parse_info_txt_line);
-parse_error_type parse_line_feature(floor_type *floor_ptr, char *buf);
+parse_error_type parse_line_feature(FloorType *floor_ptr, char *buf);
 parse_error_type parse_line_building(char *buf);
index f2c4952..eab2751 100644 (file)
@@ -45,7 +45,7 @@ bool is_ring_slot(int i)
  * Also, the tag "@xn" will work as well, where "n" is a any tag-char,\n
  * and "x" is the "current" command_cmd code.\n
  */
-bool get_tag_floor(floor_type *floor_ptr, COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
+bool get_tag_floor(FloorType *floor_ptr, COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num)
 {
     for (COMMAND_CODE i = 0; i < floor_num && i < 23; i++) {
         auto *o_ptr = &floor_ptr->o_list[floor_list[i]];
index 26b22f1..0798290 100644 (file)
@@ -3,11 +3,11 @@
 #include "object/tval-types.h"
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 class ItemTester;
 bool is_ring_slot(int i);
-bool get_tag_floor(floor_type *floor_ptr, COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num);
+bool get_tag_floor(FloorType *floor_ptr, COMMAND_CODE *cp, char tag, FLOOR_IDX floor_list[], ITEM_NUMBER floor_num);
 bool get_tag(PlayerType *player_ptr, COMMAND_CODE *cp, char tag, BIT_FLAGS mode, const ItemTester &item_tester);
 bool get_item_okay(PlayerType *player_ptr, OBJECT_IDX i, const ItemTester &item_tester);
 bool get_item_allow(PlayerType *player_ptr, INVENTORY_IDX item);
index a2576a6..a1c67d1 100644 (file)
@@ -1438,7 +1438,7 @@ bool switch_element_execution(PlayerType *player_ptr)
  * @param x 指定のx座標
  * @return 暗いならTRUE、そうでないならFALSE
  */
-static bool is_target_grid_dark(floor_type *f_ptr, POSITION y, POSITION x)
+static bool is_target_grid_dark(FloorType *f_ptr, POSITION y, POSITION x)
 {
     if (any_bits(f_ptr->grid_array[y][x].info, CAVE_MNLT)) {
         return false;
@@ -1489,7 +1489,7 @@ static bool door_to_darkness(PlayerType *player_ptr, POSITION dist)
 {
     POSITION y = player_ptr->y;
     POSITION x = player_ptr->x;
-    floor_type *f_ptr;
+    FloorType *f_ptr;
 
     for (int i = 0; i < 3; i++) {
         if (!tgt_pt(player_ptr, &x, &y)) {
index e272f12..826fc7d 100644 (file)
@@ -286,7 +286,7 @@ bool set_dustrobe(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec)
  * @brief 現在フロアに存在している鏡の数を数える / calculate mirrors
  * @return 鏡の枚数
  */
-static int number_of_mirrors(floor_type *floor_ptr)
+static int number_of_mirrors(FloorType *floor_ptr)
 {
     int val = 0;
     for (POSITION x = 0; x < floor_ptr->width; x++) {
index bcdb576..090e809 100644 (file)
@@ -365,7 +365,7 @@ void update_mon_lite(PlayerType *player_ptr)
  * @brief 画面切り替え等でモンスターの灯りを消去する
  * @param floor_ptr 現在フロアへの参照ポインタ
  */
-void clear_mon_lite(floor_type *floor_ptr)
+void clear_mon_lite(FloorType *floor_ptr)
 {
     for (int i = 0; i < floor_ptr->mon_lite_n; i++) {
         grid_type *g_ptr;
index a62a12e..c335830 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 void update_mon_lite(PlayerType *player_ptr);
-void clear_mon_lite(floor_type *floor_ptr);
+void clear_mon_lite(FloorType *floor_ptr);
index efededa..60ee981 100644 (file)
@@ -55,7 +55,7 @@
  * @details
  * This routine should almost never fail, but it *can* happen.
  */
-MONSTER_IDX m_pop(floor_type *floor_ptr)
+MONSTER_IDX m_pop(FloorType *floor_ptr)
 {
     /* Normal allocation */
     if (floor_ptr->m_max < w_ptr->max_m_idx) {
@@ -413,7 +413,7 @@ void choose_new_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool born, Mo
  * @param r_ptr モンスター種族の参照ポインタ
  * @return 加速値
  */
-byte get_mspeed(floor_type *floor_ptr, monster_race *r_ptr)
+byte get_mspeed(FloorType *floor_ptr, monster_race *r_ptr)
 {
     auto mspeed = r_ptr->speed;
     if (r_ptr->kind_flags.has_not(MonsterKindType::UNIQUE) && !floor_ptr->inside_arena) {
@@ -438,7 +438,7 @@ byte get_mspeed(floor_type *floor_ptr, monster_race *r_ptr)
  * @param m_idx 隣接数を調べたいモンスターのID
  * @return 隣接しているモンスターの数
  */
-int get_monster_crowd_number(floor_type *floor_ptr, MONSTER_IDX m_idx)
+int get_monster_crowd_number(FloorType *floor_ptr, MONSTER_IDX m_idx)
 {
     auto *m_ptr = &floor_ptr->m_list[m_idx];
     POSITION my = m_ptr->fy;
index d4eaa36..73ea84a 100644 (file)
@@ -5,12 +5,12 @@
 #define GMN_ARENA 0x00000001 //!< 賭け闘技場向け生成
 
 enum class MonsterRaceId : int16_t;
-struct floor_type;
+class FloorType;
 struct monster_race;
 class PlayerType;
-MONSTER_IDX m_pop(floor_type *floor_ptr);
+MONSTER_IDX m_pop(FloorType *floor_ptr);
 
 MonsterRaceId get_mon_num(PlayerType *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS option);
 void choose_new_monster(PlayerType *player_ptr, MONSTER_IDX m_idx, bool born, MonsterRaceId r_idx);
-byte get_mspeed(floor_type *player_ptr, monster_race *r_ptr);
-int get_monster_crowd_number(floor_type *floor_ptr, MONSTER_IDX m_idx);
+byte get_mspeed(FloorType *player_ptr, monster_race *r_ptr);
+int get_monster_crowd_number(FloorType *floor_ptr, MONSTER_IDX m_idx);
index 9620dcb..05527cd 100644 (file)
@@ -83,7 +83,7 @@ void anger_monster(PlayerType *player_ptr, monster_type *m_ptr)
  * @return m_idx モンスターの参照ID
  * @return mproc_type 削除したいモンスターの時限ステータスID
  */
-static void mproc_remove(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
+static void mproc_remove(FloorType *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
 {
     int mproc_idx = get_mproc_idx(floor_ptr, m_idx, mproc_type);
     if (mproc_idx >= 0) {
index 8198922..5bdeb51 100644 (file)
@@ -42,7 +42,7 @@ static uint32_t csleep_noise;
  * @param m_idx モンスターID
  * @return POWERFULフラグがあればTRUE、なければFALSEを返す。
  */
-bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx)
+bool monster_is_powerful(FloorType *floor_ptr, MONSTER_IDX m_idx)
 {
     auto *m_ptr = &floor_ptr->m_list[m_idx];
     auto *r_ptr = &monraces_info[m_ptr->r_idx];
@@ -54,7 +54,7 @@ bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx)
  * @param m_idx モンスターID
  * @return モンスターのレベル
  */
-DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx)
+DEPTH monster_level_idx(FloorType *floor_ptr, MONSTER_IDX m_idx)
 {
     auto *m_ptr = &floor_ptr->m_list[m_idx];
     auto *r_ptr = &monraces_info[m_ptr->r_idx];
@@ -103,7 +103,7 @@ int mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, int dam, bool is
  * @return mproc_type モンスターの時限ステータスID
  * @return 残りターン値
  */
-int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
+int get_mproc_idx(FloorType *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
 {
     const auto &cur_mproc_list = floor_ptr->mproc_list[mproc_type];
     for (int i = floor_ptr->mproc_max[mproc_type] - 1; i >= 0; i--) {
@@ -121,7 +121,7 @@ int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
  * @return m_idx モンスターの参照ID
  * @return mproc_type 追加したいモンスターの時限ステータスID
  */
-void mproc_add(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
+void mproc_add(FloorType *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
 {
     if (floor_ptr->mproc_max[mproc_type] < w_ptr->max_m_idx) {
         floor_ptr->mproc_list[mproc_type][floor_ptr->mproc_max[mproc_type]++] = (int16_t)m_idx;
@@ -132,7 +132,7 @@ void mproc_add(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type)
  * @brief モンスターの時限ステータスリストを初期化する / Initialize monster process
  * @param floor_ptr 現在フロアへの参照ポインタ
  */
-void mproc_init(floor_type *floor_ptr)
+void mproc_init(FloorType *floor_ptr)
 {
     /* Reset "player_ptr->current_floor_ptr->mproc_max[]" */
     for (int i = 0; i < MAX_MTIMED; i++) {
index ffaabb7..d9fb6ee 100644 (file)
@@ -3,11 +3,11 @@
 #include "system/angband.h"
 
 enum class MonsterRaceId : int16_t;
-struct floor_type;
+class FloorType;
 class PlayerType;
 struct monster_type;
-bool monster_is_powerful(floor_type *floor_ptr, MONSTER_IDX m_idx);
-DEPTH monster_level_idx(floor_type *floor_ptr, MONSTER_IDX m_idx);
+bool monster_is_powerful(FloorType *floor_ptr, MONSTER_IDX m_idx);
+DEPTH monster_level_idx(FloorType *floor_ptr, MONSTER_IDX m_idx);
 
 int mon_damage_mod(PlayerType *player_ptr, monster_type *m_ptr, int dam, bool is_psy_spear);
 
@@ -16,6 +16,6 @@ void monster_gain_exp(PlayerType *player_ptr, MONSTER_IDX m_idx, MonsterRaceId s
 
 void process_monsters_mtimed(PlayerType *player_ptr, int mtimed_idx);
 
-int get_mproc_idx(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type);
-void mproc_init(floor_type *floor_ptr);
-void mproc_add(floor_type *floor_ptr, MONSTER_IDX m_idx, int mproc_type);
+int get_mproc_idx(FloorType *floor_ptr, MONSTER_IDX m_idx, int mproc_type);
+void mproc_init(FloorType *floor_ptr);
+void mproc_add(FloorType *floor_ptr, MONSTER_IDX m_idx, int mproc_type);
index 290bd80..7042679 100644 (file)
@@ -240,7 +240,7 @@ monsterrace_hook_type get_monster_hook2(PlayerType *player_ptr, POSITION y, POSI
  */
 static errr do_get_mon_num_prep(PlayerType *player_ptr, const monsterrace_hook_type hook1, const monsterrace_hook_type hook2, const bool restrict_to_dungeon)
 {
-    const floor_type *const floor_ptr = player_ptr->current_floor_ptr;
+    const FloorType *const floor_ptr = player_ptr->current_floor_ptr;
 
     // デバッグ用統計情報。
     int mon_num = 0; // 重み(prob2)が正の要素数
index bede191..4fe5470 100644 (file)
@@ -98,7 +98,7 @@ void decide_lite_range(PlayerType *player_ptr, msa_type *msa_ptr)
     msa_ptr->x_br_lite = 0;
 }
 
-static void feature_projection(floor_type *floor_ptr, msa_type *msa_ptr)
+static void feature_projection(FloorType *floor_ptr, msa_type *msa_ptr)
 {
     auto *f_ptr = &terrains_info[floor_ptr->grid_array[msa_ptr->y][msa_ptr->x].feat];
     if (f_ptr->flags.has(TerrainCharacteristics::PROJECT)) {
index 2925c41..3f4bc1a 100644 (file)
@@ -55,7 +55,7 @@ static void summon_disturb(PlayerType *player_ptr, int target_type, bool known,
  * @param m_idx モンスターID
  * @return 召喚可能であればPM_ALLOW_UNIQUEを返す。
  */
-static BIT_FLAGS monster_u_mode(floor_type *floor_ptr, MONSTER_IDX m_idx)
+static BIT_FLAGS monster_u_mode(FloorType *floor_ptr, MONSTER_IDX m_idx)
 {
     BIT_FLAGS u_mode = 0L;
     auto *m_ptr = &floor_ptr->m_list[m_idx];
index 28e5f48..550ddec 100644 (file)
@@ -50,7 +50,7 @@ bool see_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)
  * @param t_idx モンスターID二体目
  * @return モンスター2体のどちらかがプレイヤーの近くに居ればTRUE、どちらも遠ければFALSEを返す。
  */
-bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
+bool monster_near_player(FloorType *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
 {
     monster_type *m_ptr = &floor_ptr->m_list[m_idx];
     monster_type *t_ptr = &floor_ptr->m_list[t_idx];
@@ -70,7 +70,7 @@ bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t
 bool monspell_message_base(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int target_type)
 {
     bool notice = false;
-    floor_type *floor_ptr = player_ptr->current_floor_ptr;
+    FloorType *floor_ptr = player_ptr->current_floor_ptr;
     bool known = monster_near_player(floor_ptr, m_idx, t_idx);
     bool see_either = see_monster(player_ptr, m_idx) || see_monster(player_ptr, t_idx);
     bool mon_to_mon = (target_type == MONSTER_TO_MONSTER);
index 6214909..4d68a49 100644 (file)
@@ -11,7 +11,7 @@
 #define RF5_SPELL_START 32 * 4
 #define RF6_SPELL_START 32 * 5
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 
 struct mspell_cast_msg {
@@ -39,7 +39,7 @@ struct mspell_cast_msg_simple {
 };
 
 bool see_monster(PlayerType *player_ptr, MONSTER_IDX m_idx);
-bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
+bool monster_near_player(FloorType *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
 bool monspell_message_base(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int target_type);
 bool monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int target_type);
 void simple_monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int target_type);
index 85a5ff6..8f0e05c 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <algorithm>
 
-void ObjectIndexList::add(floor_type *floor_ptr, OBJECT_IDX o_idx, IDX stack_idx)
+void ObjectIndexList::add(FloorType *floor_ptr, OBJECT_IDX o_idx, IDX stack_idx)
 {
     if (stack_idx <= 0) {
         stack_idx = o_idx_list_.empty() ? 1 : floor_ptr->o_list[o_idx_list_.front()].stack_idx + 1;
@@ -22,7 +22,7 @@ void ObjectIndexList::remove(OBJECT_IDX o_idx)
     o_idx_list_.remove(o_idx);
 }
 
-void ObjectIndexList::rotate(floor_type *floor_ptr)
+void ObjectIndexList::rotate(FloorType *floor_ptr)
 {
     if (o_idx_list_.size() < 2) {
         return;
index 25b4b59..fad960f 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <list>
 
-struct floor_type;
+class FloorType;
 
 /**
  * @brief アイテムリスト(床上スタック/モンスター所持)を管理するクラス
@@ -32,7 +32,7 @@ public:
      * @param o_idx 追加するアイテムのフロア全体のアイテム配列上の要素番号
      * @param stack_idx アイテムリストに追加する位置(デフォルト:0)
      */
-    void add(floor_type *floor_ptr, OBJECT_IDX o_idx, IDX stack_idx = 0);
+    void add(FloorType *floor_ptr, OBJECT_IDX o_idx, IDX stack_idx = 0);
 
     /**
      * @brief アイテムリストからフロア全体のアイテム配列上の指定した要素番号のアイテムを削除する
@@ -49,7 +49,7 @@ public:
      * 先頭のアイテムを最後尾に移動した後各アイテムの stack_idx は1ずつインクリメントされ、
      * 最後尾に移動したアイテムの stack_idx は 1 になる。
      */
-    void rotate(floor_type *floor_ptr);
+    void rotate(FloorType *floor_ptr);
 
     //
     // 以下のメソッドは内部で保持している std::list オブジェクトに対して使用できる同名のメソッド
index e040a7d..69760de 100644 (file)
@@ -49,7 +49,7 @@ static fill_data_type fill_data;
  * Store routine for the fractal floor generator
  * this routine probably should be an inline function or a macro.
  */
-static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX val)
+static void store_height(FloorType *floor_ptr, POSITION x, POSITION y, FEAT_IDX val)
 {
     if (((x == fill_data.xmin) || (y == fill_data.ymin) || (x == fill_data.xmax) || (y == fill_data.ymax)) && (val <= fill_data.c1)) {
         val = fill_data.c1 + 1;
@@ -59,7 +59,7 @@ static void store_height(floor_type *floor_ptr, POSITION x, POSITION y, FEAT_IDX
     return;
 }
 
-void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff)
+void generate_hmap(FloorType *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff)
 {
     POSITION xsize = xsiz;
     POSITION ysize = ysiz;
index 6f45bc3..f180e76 100644 (file)
@@ -2,8 +2,8 @@
 
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
-void generate_hmap(floor_type *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
+void generate_hmap(FloorType *floor_ptr, POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
 bool generate_fracave(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
 bool generate_lake(PlayerType *player_ptr, POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
index 2d3ab1e..a4c0eb2 100644 (file)
@@ -38,7 +38,7 @@
  * @param allow_flag_mask 生成が許されるpit/nestのビット配列
  * @return 選択されたpit/nestのID、選択失敗した場合-1を返す。
  */
-static int pick_vault_type(floor_type *floor_ptr, std::vector<nest_pit_type> &l_ptr, BIT_FLAGS16 allow_flag_mask)
+static int pick_vault_type(FloorType *floor_ptr, std::vector<nest_pit_type> &l_ptr, BIT_FLAGS16 allow_flag_mask)
 {
     ProbabilityTable<int> table;
     for (size_t i = 0; i < l_ptr.size(); i++) {
index 330821b..86c6b3f 100644 (file)
@@ -14,7 +14,7 @@
  * @param y チェックするマスのY座標
  * @return 床系地形ならばTRUE
  */
-static bool get_is_floor(floor_type *floor_ptr, POSITION x, POSITION y)
+static bool get_is_floor(FloorType *floor_ptr, POSITION x, POSITION y)
 {
     if (!in_bounds(floor_ptr, y, x)) {
         return false;
index 00ee3f2..5f6d2fc 100644 (file)
@@ -200,7 +200,7 @@ void update_lite(PlayerType *player_ptr)
     std::vector<Pos2D> points;
 
     POSITION p = player_ptr->cur_lite;
-    floor_type *const floor_ptr = player_ptr->current_floor_ptr;
+    FloorType *const floor_ptr = player_ptr->current_floor_ptr;
 
     // 前回照らされていた座標たちを記録。
     for (int i = 0; i < floor_ptr->lite_n; i++) {
index 4374a78..8a89895 100644 (file)
@@ -33,7 +33,7 @@
 #include "world/world.h"
 #include <vector>
 
-using PassBoldFunc = bool (*)(floor_type *, POSITION, POSITION);
+using PassBoldFunc = bool (*)(FloorType *, POSITION, POSITION);
 
 /*!
  * @brief 指定した座標全てを照らす。
@@ -162,7 +162,7 @@ static void cave_temp_room_unlite(PlayerType *player_ptr, const std::vector<Pos2
  * @param pass_bold 地形条件を返す関数ポインタ
  * @return 該当地形の数
  */
-static int next_to_open(floor_type *floor_ptr, const POSITION cy, const POSITION cx, const PassBoldFunc pass_bold)
+static int next_to_open(FloorType *floor_ptr, const POSITION cy, const POSITION cx, const PassBoldFunc pass_bold)
 {
     int len = 0;
     int blen = 0;
@@ -191,7 +191,7 @@ static int next_to_open(floor_type *floor_ptr, const POSITION cy, const POSITION
  * @param pass_bold 地形条件を返す関数ポインタ
  * @return 該当地形の数
  */
-static int next_to_walls_adj(floor_type *floor_ptr, const POSITION cy, const POSITION cx, const PassBoldFunc pass_bold)
+static int next_to_walls_adj(FloorType *floor_ptr, const POSITION cy, const POSITION cx, const PassBoldFunc pass_bold)
 {
     POSITION y, x;
     int c = 0;
@@ -276,7 +276,7 @@ static void cave_temp_lite_room_aux(PlayerType *player_ptr, std::vector<Pos2D> &
  * @param x 指定X座標
  * @return 射線を通すならばtrueを返す。
  */
-static bool cave_pass_dark_bold(floor_type *floor_ptr, POSITION y, POSITION x)
+static bool cave_pass_dark_bold(FloorType *floor_ptr, POSITION y, POSITION x)
 {
     return cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::PROJECT);
 }
index 17907c8..6ba891b 100644 (file)
@@ -41,7 +41,7 @@ POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION
  * Modified version of los() for calculation of disintegration balls.
  * Disintegration effects are stopped by permanent walls.
  */
-bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+bool in_disintegration_range(FloorType *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
 {
     POSITION delta_y = y2 - y1;
     POSITION delta_x = x2 - x1;
index fb17e3e..008207e 100644 (file)
@@ -3,9 +3,9 @@
 #include "effect/attribute-types.h"
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 class projection_path;
-bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+bool in_disintegration_range(FloorType *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 void breath_shape(PlayerType *player_ptr, const projection_path &path, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, AttributeType typ);
 POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
index 4b71f32..e247029 100644 (file)
@@ -1,6 +1,6 @@
 #include "system/floor-type-definition.h"
 
-bool floor_type::is_in_dungeon() const
+bool FloorType::is_in_dungeon() const
 {
     return this->dun_level > 0;
 }
index 37c0cc6..eba5788 100644 (file)
@@ -5,56 +5,56 @@
 #include "floor/sight-definitions.h"
 #include "monster/monster-timed-effect-types.h"
 #include "system/angband.h"
-
 #include <vector>
 
 struct grid_type;
-;
-class ObjectType;
 struct monster_type;
-struct floor_type {
-    DUNGEON_IDX dungeon_idx;
+class ObjectType;
+class FloorType {
+public:
+    FloorType() = default;
+    DUNGEON_IDX dungeon_idx = 0;
     std::vector<std::vector<grid_type>> grid_array;
-    DEPTH dun_level; /*!< 現在の実ダンジョン階層 base_level の参照元となる / Current dungeon level */
-    DEPTH base_level; /*!< 基本生成レベル、後述のobject_level, monster_levelの参照元となる / Base dungeon level */
-    DEPTH object_level; /*!< アイテムの生成レベル、 base_level を起点に一時変更する時に参照 / Current object creation level */
-    DEPTH monster_level; /*!< モンスターの生成レベル、 base_level を起点に一時変更する時に参照 / Current monster creation level */
-    POSITION width; /*!< Current dungeon width */
-    POSITION height; /*!< Current dungeon height */
-    MONSTER_NUMBER num_repro; /*!< Current reproducer count */
+    DEPTH dun_level = 0; /*!< 現在の実ダンジョン階層 base_level の参照元となる / Current dungeon level */
+    DEPTH base_level = 0; /*!< 基本生成レベル、後述のobject_level, monster_levelの参照元となる / Base dungeon level */
+    DEPTH object_level = 0; /*!< アイテムの生成レベル、 base_level を起点に一時変更する時に参照 / Current object creation level */
+    DEPTH monster_level = 0; /*!< モンスターの生成レベル、 base_level を起点に一時変更する時に参照 / Current monster creation level */
+    POSITION width = 0; /*!< Current dungeon width */
+    POSITION height = 0; /*!< Current dungeon height */
+    MONSTER_NUMBER num_repro = 0; /*!< Current reproducer count */
 
-    GAME_TURN generated_turn; /* Turn when level began */
+    GAME_TURN generated_turn = 0; /* Turn when level began */
 
     std::vector<ObjectType> o_list; /*!< The array of dungeon items [max_o_idx] */
-    OBJECT_IDX o_max; /* Number of allocated objects */
-    OBJECT_IDX o_cnt; /* Number of live objects */
+    OBJECT_IDX o_max = 0; /* Number of allocated objects */
+    OBJECT_IDX o_cnt = 0; /* Number of live objects */
 
     std::vector<monster_type> m_list; /*!< The array of dungeon monsters [max_m_idx] */
-    MONSTER_IDX m_max; /* Number of allocated monsters */
-    MONSTER_IDX m_cnt; /* Number of live monsters */
+    MONSTER_IDX m_max = 0; /* Number of allocated monsters */
+    MONSTER_IDX m_cnt = 0; /* Number of live monsters */
 
-    std::vector<int16_t> mproc_list[MAX_MTIMED]; /*!< The array to process dungeon monsters[max_m_idx] */
-    int16_t mproc_max[MAX_MTIMED]; /*!< Number of monsters to be processed */
+    std::vector<int16_t> mproc_list[MAX_MTIMED]{}; /*!< The array to process dungeon monsters[max_m_idx] */
+    int16_t mproc_max[MAX_MTIMED]{}; /*!< Number of monsters to be processed */
 
-    POSITION_IDX lite_n; //!< Array of grids lit by player lite
-    POSITION lite_y[LITE_MAX];
-    POSITION lite_x[LITE_MAX];
+    POSITION_IDX lite_n = 0; //!< Array of grids lit by player lite
+    POSITION lite_y[LITE_MAX]{};
+    POSITION lite_x[LITE_MAX]{};
 
-    POSITION_IDX mon_lite_n; //!< Array of grids lit by player lite
-    POSITION mon_lite_y[MON_LITE_MAX];
-    POSITION mon_lite_x[MON_LITE_MAX];
+    POSITION_IDX mon_lite_n = 0; //!< Array of grids lit by player lite
+    POSITION mon_lite_y[MON_LITE_MAX]{};
+    POSITION mon_lite_x[MON_LITE_MAX]{};
 
-    POSITION_IDX view_n; //!< Array of grids viewable to the player
-    POSITION view_y[VIEW_MAX];
-    POSITION view_x[VIEW_MAX];
+    POSITION_IDX view_n = 0; //!< Array of grids viewable to the player
+    POSITION view_y[VIEW_MAX]{};
+    POSITION view_x[VIEW_MAX]{};
 
-    POSITION_IDX redraw_n; //!< Array of grids for delayed visual updating
-    POSITION redraw_y[REDRAW_MAX];
-    POSITION redraw_x[REDRAW_MAX];
+    POSITION_IDX redraw_n = 0; //!< Array of grids for delayed visual updating
+    POSITION redraw_y[REDRAW_MAX]{};
+    POSITION redraw_x[REDRAW_MAX]{};
 
-    bool monster_noise;
-    QuestId quest_number; /* Inside quest level */
-    bool inside_arena; /* Is character inside on_defeat_arena_monster? */
+    bool monster_noise = false;
+    QuestId quest_number = QuestId::NONE; /* Inside quest level */
+    bool inside_arena = false; /* Is character inside on_defeat_arena_monster? */
 
     bool is_in_dungeon() const;
 };
index 6bda18d..71934d4 100644 (file)
 constexpr int MONSTER_MAXHP = 30000; //!< モンスターの最大HP
 
 enum class MonsterRaceId : int16_t;
-struct floor_type;
+class FloorType;
 struct monster_race;
 struct monster_type {
     MonsterRaceId r_idx{}; /*!< モンスターの実種族ID (これが0の時は死亡扱いになる) / Monster race index 0 = dead. */
     MonsterRaceId ap_r_idx{}; /*!< モンスターの外見種族ID(あやしい影、たぬき、ジュラル星人誤認などにより変化する)Monster race appearance index */
-    floor_type *current_floor_ptr{}; /*!< 所在フロアID(現状はfloor_type構造体によるオブジェクトは1つしかないためソースコード設計上の意義以外はない)*/
+    FloorType *current_floor_ptr{}; /*!< 所在フロアID(現状はFloorType構造体によるオブジェクトは1つしかないためソースコード設計上の意義以外はない)*/
 
 /* Sub-alignment flags for neutral monsters */
 #define SUB_ALIGN_NEUTRAL 0x0000 /*!< モンスターのサブアライメント:中立 */
index 61c1d7d..d159316 100644 (file)
@@ -21,7 +21,7 @@ enum class MimicKindType;
 enum class MonsterAbilityType;
 enum class MonsterRaceId : int16_t;
 
-struct floor_type;
+class FloorType;
 class ObjectType;
 class TimedEffects;
 class PlayerType {
@@ -33,7 +33,7 @@ public:
     int player_euid{};
     int player_egid{};
 
-    floor_type *current_floor_ptr{};
+    FloorType *current_floor_ptr{};
     POSITION oldpy{}; /* Previous player location -KMW- */
     POSITION oldpx{}; /* Previous player location -KMW- */
 
index fc51bdd..7d35463 100644 (file)
@@ -100,7 +100,7 @@ static void image_random(TERM_COLOR *ap, char *cp)
  * 周り全てが壁に囲まれている壁についてはオプション状態による。
  * 1か所でも空きがあるか、壁ではない地形、金を含む地形、永久岩は表示。
  */
-static bool is_revealed_wall(floor_type *floor_ptr, TerrainType *f_ptr, POSITION y, POSITION x)
+static bool is_revealed_wall(FloorType *floor_ptr, TerrainType *f_ptr, POSITION y, POSITION x)
 {
     if (view_hidden_walls) {
         if (view_unsafe_walls) {
index 29edc17..d3f9eb7 100644 (file)
@@ -142,7 +142,7 @@ static void print_monster_line(TERM_LEN x, TERM_LEN y, monster_type *m_ptr, int
  * @param y 表示行
  * @param max_lines 最大何行描画するか
  */
-void print_monster_list(floor_type *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines)
+void print_monster_list(FloorType *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines)
 {
     TERM_LEN line = y;
     monster_type *last_mons = nullptr;
@@ -546,7 +546,7 @@ void fix_object(PlayerType *player_ptr)
  * @details
  * Lookコマンドでカーソルを合わせた場合に合わせてミミックは考慮しない。
  */
-static const monster_type *monster_on_floor_items(floor_type *floor_ptr, const grid_type *g_ptr)
+static const monster_type *monster_on_floor_items(FloorType *floor_ptr, const grid_type *g_ptr)
 {
     if (g_ptr->m_idx == 0) {
         return nullptr;
index 64068f2..108cb48 100644 (file)
@@ -4,11 +4,11 @@
 
 #include <vector>
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 class ItemTester;
 void fix_inventory(PlayerType *player_ptr);
-void print_monster_list(floor_type *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
+void print_monster_list(FloorType *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines);
 void fix_monster_list(PlayerType *player_ptr);
 void fix_equip(PlayerType *player_ptr);
 void fix_player(PlayerType *player_ptr);
index ef76bc1..0371595 100644 (file)
@@ -5,11 +5,11 @@
 
 enum class MonsterRaceId : int16_t;
 
-struct floor_type;
+class FloorType;
 class PlayerType;
 typedef union spell_functions {
     struct debug_spell_type1 {
-        bool (*spell_function)(PlayerType *, floor_type *);
+        bool (*spell_function)(PlayerType *, FloorType *);
     } spell1;
 
     struct debug_spell_type2 {
index 540f429..c0a7e8b 100644 (file)
@@ -22,7 +22,7 @@
  * This routine should almost never fail, but in case it does,
  * we must be sure to handle "failure" of this routine.
  */
-OBJECT_IDX o_pop(floor_type *floor_ptr)
+OBJECT_IDX o_pop(FloorType *floor_ptr)
 {
     if (floor_ptr->o_max < w_ptr->max_o_idx) {
         OBJECT_IDX i = floor_ptr->o_max;
index 94ee3c5..ce851f3 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "system/angband.h"
 
-struct floor_type;
+class FloorType;
 class PlayerType;
-OBJECT_IDX o_pop(floor_type *floor_ptr);
+OBJECT_IDX o_pop(FloorType *floor_ptr);
 OBJECT_IDX get_obj_num(PlayerType *player_ptr, DEPTH level, BIT_FLAGS mode);