OSDN Git Service

[Refactor] #40572 Separated floor-allocation-types.h
authorHourier <hourier@users.sourceforge.jp>
Tue, 4 Aug 2020 09:16:31 +0000 (18:16 +0900)
committerHourier <hourier@users.sourceforge.jp>
Tue, 4 Aug 2020 09:16:31 +0000 (18:16 +0900)
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/floor/floor-allocation-types.h [new file with mode: 0644]
src/floor/floor-generate.c
src/floor/floor-generate.h

index 924720a..529f683 100644 (file)
     <ClInclude Include="..\..\src\flavor\tval-description-switcher.h" />\r
     <ClInclude Include="..\..\src\floor\cave.h" />\r
     <ClInclude Include="..\..\src\floor\fixed-map-generator.h" />\r
+    <ClInclude Include="..\..\src\floor\floor-allocation-types.h" />\r
     <ClInclude Include="..\..\src\floor\floor-base-definitions.h" />\r
     <ClInclude Include="..\..\src\floor\floor-util.h" />\r
     <ClInclude Include="..\..\src\floor\object-scanner.h" />\r
index 158d058..f47386e 100644 (file)
     <ClInclude Include="..\..\src\wizard\fixed-artifacts-spoiler.h">
       <Filter>wizard</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\floor\floor-allocation-types.h">
+      <Filter>floor</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 229e554..2c81879 100644 (file)
@@ -205,6 +205,7 @@ hengband_SOURCES = \
        floor/cave.c floor/cave.h \
        floor/fixed-map-generator.c floor/fixed-map-generator.h \
        floor/floor.c floor/floor.h \
+       floor/floor-allocation-types.h \
        floor/floor-base-definitions.h \
        floor/floor-events.c floor/floor-events.h \
        floor/floor-generate.c floor/floor-generate.h \
diff --git a/src/floor/floor-allocation-types.h b/src/floor/floor-allocation-types.h
new file mode 100644 (file)
index 0000000..916b794
--- /dev/null
@@ -0,0 +1,17 @@
+#pragma once
+
+/* Dungeon allocation "places" */
+typedef enum dap_type {
+       ALLOC_SET_CORR = 1, /* Hallway */
+       ALLOC_SET_ROOM = 2, /* Room */
+       ALLOC_SET_BOTH = 3, /* Anywhere */
+} dap_type;
+
+/* Dungeon allocation "types" */
+typedef enum dungeon_allocation_type {
+       ALLOC_TYP_RUBBLE = 1, /* Rubble */
+    ALLOC_TYP_TRAP = 3, /* Trap */
+    ALLOC_TYP_GOLD = 4, /* Gold */
+    ALLOC_TYP_OBJECT = 5, /* Object */
+    ALLOC_TYP_INVIS = 6, /* Invisible wall */
+} dungeon_allocation_type;
index 3db27d1..e1c482b 100644 (file)
@@ -17,6 +17,7 @@
 #include "dungeon/dungeon.h"
 #include "dungeon/quest.h"
 #include "floor/cave.h"
+#include "floor/floor-allocation-types.h"
 #include "floor/floor-events.h"
 #include "floor/floor-generate.h"
 #include "floor/floor-save.h"
index 598945d..accc8c3 100644 (file)
@@ -10,22 +10,6 @@ extern int dun_tun_con; /*!< ダンジョンの通路を継続して引き延ば
 extern int dun_tun_pen; /*!< ダンジョンの部屋入口にドアを設置する頻度(一回の試行ごとに%で判定している) */
 extern int dun_tun_jct; /*!< ダンジョンの通路交差地点付近にドアを設置する頻度(一回の試行ごとに%で判定している) */
 
-/*
- * Hack -- Dungeon allocation "places"
- */
-#define ALLOC_SET_CORR         1       /* Hallway */
-#define ALLOC_SET_ROOM         2       /* Room */
-#define ALLOC_SET_BOTH         3       /* Anywhere */
-
-/*
- * Hack -- Dungeon allocation "types"
- */
-#define ALLOC_TYP_RUBBLE       1       /* Rubble */
-#define ALLOC_TYP_TRAP         3       /* Trap */
-#define ALLOC_TYP_GOLD         4       /* Gold */
-#define ALLOC_TYP_OBJECT       5       /* Object */
-#define ALLOC_TYP_INVIS                6       /* Invisible wall */
-
 bool place_quest_monsters(player_type *creature_ptr);
 void wipe_generate_random_floor_flags(floor_type *floor_ptr);
 void clear_cave(player_type *player_ptr);