OSDN Git Service

[Refactor] #40570 Moved generate_room_floor() and generate_fill_perm_bold() from...
authorHourier <hourier@users.sourceforge.jp>
Fri, 24 Jul 2020 03:17:46 +0000 (12:17 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 26 Jul 2020 08:04:20 +0000 (17:04 +0900)
src/room/room-generator.c
src/room/room-generator.h
src/room/rooms-city.c

index 789e5ec..4ecdf55 100644 (file)
@@ -6,7 +6,7 @@
 #include "grid/grid.h"
 #include "room/room-info-table.h"
 #include "room/room-types.h"
-#include "room/rooms-city.h" // 相互依存、後で消す.
+#include "room/rooms-city.h"
 #include "room/rooms-fractal.h"
 #include "room/rooms-normal.h"
 #include "room/rooms-pit-nest.h"
 #include "system/floor-type-definition.h"
 #include "wizard/wizard-messages.h"
 
-/* Create a new floor room with optional light */
-void generate_room_floor(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
-{
-    grid_type *g_ptr;
-    for (POSITION y = y1; y <= y2; y++) {
-        for (POSITION x = x1; x <= x2; x++) {
-            g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
-            place_grid(player_ptr, g_ptr, GB_FLOOR);
-            g_ptr->info |= (CAVE_ROOM);
-            if (light)
-                g_ptr->info |= (CAVE_GLOW);
-        }
-    }
-}
-
-void generate_fill_perm_bold(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
-{
-    for (POSITION y = y1; y <= y2; y++)
-        for (POSITION x = x1; x <= x2; x++)
-            place_bold(player_ptr, y, x, GB_INNER_PERM);
-}
-
 /*!
  * @brief 与えられた部屋型IDに応じて部屋の生成処理分岐を行い結果を返す / Attempt to build a room of the given type at the given block
  * @param player_ptr プレーヤーへの参照ポインタ
index 575a1e5..32faa42 100644 (file)
@@ -2,6 +2,4 @@
 
 #include "system/angband.h"
 
-void generate_room_floor(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light);
-void generate_fill_perm_bold(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 bool generate_rooms(player_type *player_ptr);
index 941bf7e..20317fb 100644 (file)
@@ -5,7 +5,6 @@
 #include "game-option/cheat-types.h"
 #include "grid/feature.h"
 #include "grid/grid.h"
-#include "room/room-generator.h" // 相互依存、後で消す.
 #include "room/rooms.h"
 #include "store/store-util.h"
 #include "store/store.h"
@@ -70,6 +69,28 @@ static bool precalc_ugarcade(int town_hgt, int town_wid, int n)
     return i == n;
 }
 
+/* Create a new floor room with optional light */
+static void generate_room_floor(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int light)
+{
+    grid_type *g_ptr;
+    for (POSITION y = y1; y <= y2; y++) {
+        for (POSITION x = x1; x <= x2; x++) {
+            g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
+            place_grid(player_ptr, g_ptr, GB_FLOOR);
+            g_ptr->info |= (CAVE_ROOM);
+            if (light)
+                g_ptr->info |= (CAVE_GLOW);
+        }
+    }
+}
+
+static void generate_fill_perm_bold(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+{
+    for (POSITION y = y1; y <= y2; y++)
+        for (POSITION x = x1; x <= x2; x++)
+            place_bold(player_ptr, y, x, GB_INNER_PERM);
+}
+
 /*!
  * @brief タイプ16の部屋…地下都市生成のサブルーチン / Actually create buildings
  * @param player_ptr プレーヤーへの参照ポインタ