OSDN Git Service

[Refactor] #37353 floor-town.c/h を作成して関連構造体と変数を移動.
authordeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 02:06:29 +0000 (11:06 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 2 May 2019 02:06:29 +0000 (11:06 +0900)
22 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/birth.c
src/cmd4.c
src/core.c
src/dungeon-file.c
src/externs.h
src/files.c
src/floor-town.c [new file with mode: 0644]
src/floor-town.h [new file with mode: 0644]
src/init.c
src/load.c
src/rumor.c
src/save.c
src/spells3.c
src/store.c
src/types.h
src/variable.c
src/view-mainwindow.c
src/wild.c
src/wizard1.c
src/xtra2.c

index fbf3847..2cba952 100644 (file)
     <ClCompile Include="..\..\src\floor-events.c" />\r
     <ClCompile Include="..\..\src\floor-generate.c" />\r
     <ClCompile Include="..\..\src\floor-save.c" />\r
+    <ClCompile Include="..\..\src\floor-town.c" />\r
     <ClCompile Include="..\..\src\floor.c" />\r
     <ClCompile Include="..\..\src\geometry.c" />\r
     <ClCompile Include="..\..\src\history.c" />\r
     <ClInclude Include="..\..\src\floor-events.h" />\r
     <ClInclude Include="..\..\src\floor-generate.h" />\r
     <ClInclude Include="..\..\src\floor-save.h" />\r
+    <ClInclude Include="..\..\src\floor-town.h" />\r
     <ClInclude Include="..\..\src\floor.h" />\r
     <ClInclude Include="..\..\src\gameoption.h" />\r
     <ClInclude Include="..\..\src\gamevalue.h" />\r
index bc957f3..03afedc 100644 (file)
     <ClCompile Include="..\..\src\object-ego.c">
       <Filter>object</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\floor-town.c">
+      <Filter>floor</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\angband.h" />
     <ClInclude Include="..\..\src\object-ego.h">
       <Filter>object</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\floor-town.h">
+      <Filter>floor</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index bef4cdb..ad2c1c0 100644 (file)
@@ -30,6 +30,7 @@
 #include "floor.h"
 #include "cmd-pet.h"
 #include "dungeon-file.h"
+#include "floor-town.h"
 #include "files.h"
 #include "birth.h"
 #include "player-skill.h"
index 0668336..6d516fb 100644 (file)
@@ -69,6 +69,7 @@
 #include "player-move.h"
 #include "spells.h"
 #include "objectkind.h"
+#include "floor-town.h"
 
 /*
  */
index 614bc1a..93b4ab9 100644 (file)
@@ -33,6 +33,7 @@
 #include "dungeon.h"
 #include "floor.h"
 #include "floor-events.h"
+#include "floor-town.h"
 #include "grid.h"
 #include "object-curse.h"
 #include "object-flavor.h"
index 1a76998..923476a 100644 (file)
@@ -17,6 +17,7 @@
 #include "objectkind.h"
 #include "object-ego.h"
 #include "monsterrace.h"
+#include "floor-town.h"
 
 dungeon_grid letter[255];
 
index c9c4ccb..214a85c 100644 (file)
@@ -211,8 +211,6 @@ extern const concptr angband_sound_name[SOUND_MAX];
 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
 extern FLOOR_IDX max_floor_id;
 extern u32b saved_floor_file_sign;
-extern TOWN_IDX max_towns;
-extern town_type *town_info;
 extern s16b alloc_kind_size;
 extern alloc_entry *alloc_kind_table;
 extern s16b alloc_race_size;
index cc49954..a01883d 100644 (file)
@@ -45,6 +45,7 @@
 #include "term.h"
 #include "view-mainwindow.h"
 #include "floor-events.h"
+#include "floor-town.h"
 #include "dungeon-file.h"
 #include "init.h"
 #include "monster-spell.h"
diff --git a/src/floor-town.c b/src/floor-town.c
new file mode 100644 (file)
index 0000000..5faa3bd
--- /dev/null
@@ -0,0 +1,12 @@
+#include "angband.h"
+#include "floor-town.h"
+
+/*
+ * Maximum number of towns
+ */
+TOWN_IDX max_towns;
+
+/*
+ * The towns [max_towns]
+ */
+town_type *town_info;
diff --git a/src/floor-town.h b/src/floor-town.h
new file mode 100644 (file)
index 0000000..c0ceeea
--- /dev/null
@@ -0,0 +1,17 @@
+#pragma once
+
+/*
+ * A structure describing a town with
+ * stores and buildings
+ */
+typedef struct town_type town_type;
+struct town_type
+{
+       GAME_TEXT name[32];
+       u32b seed;      /* Seed for RNG */
+       store_type *store;    /* The stores [MAX_STORES] */
+       byte numstores;
+};
+
+extern TOWN_IDX max_towns;
+extern town_type *town_info;
index 36fcac5..11baefd 100644 (file)
@@ -47,6 +47,7 @@
 #include "files.h"
 #include "feature.h"
 #include "floor.h"
+#include "floor-town.h"
 #include "dungeon.h"
 #include "rooms-vault.h"
 #include "player-skill.h"
index 0db32b0..0c16f32 100644 (file)
@@ -59,8 +59,9 @@
 #include "wild.h"
 #include "patron.h"
 
-#include "floor-save.h"
 #include "floor.h"
+#include "floor-save.h"
+#include "floor-town.h"
 #include "grid.h"
 
 #include "cmd-pet.h"
index 82efca2..0271943 100644 (file)
@@ -6,6 +6,7 @@
 #include "artifact.h"
 #include "dungeon.h"
 #include "monsterrace.h"
+#include "floor-town.h"
 
 /*
  * Display a rumor and apply its effects
index e7469ed..2c703d9 100644 (file)
@@ -22,6 +22,7 @@
 #include "floor.h"
 #include "floor-events.h"
 #include "floor-save.h"
+#include "floor-town.h"
 #include "files.h"
 #include "world.h"
 #include "objectkind.h"
index ad86f00..edcc74d 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "dungeon.h"
 #include "floor.h"
+#include "floor-town.h"
 #include "object-boost.h"
 #include "object-flavor.h"
 #include "object-hook.h"
index 57bb559..c4e2373 100644 (file)
@@ -34,6 +34,7 @@
 #include "world.h"
 #include "objectkind.h"
 #include "autopick.h"
+#include "floor-town.h"
 
 #define MIN_STOCK 12
 
index 6df442d..5dccb16 100644 (file)
@@ -300,19 +300,6 @@ struct monster_power
 
 
 /*
- * A structure describing a town with
- * stores and buildings
- */
-typedef struct town_type town_type;
-struct town_type
-{
-       GAME_TEXT name[32];
-       u32b seed;      /* Seed for RNG */
-       store_type *store;    /* The stores [MAX_STORES] */
-       byte numstores;
-};
-
-/*
  * Sort-array element
  */
 typedef struct tag_type tag_type;
index e607768..d271f22 100644 (file)
@@ -413,16 +413,6 @@ FLOOR_IDX max_floor_id;
 u32b saved_floor_file_sign;
 
 /*
- * Maximum number of towns
- */
-TOWN_IDX max_towns;
-
-/*
- * The towns [max_towns]
- */
-town_type *town_info;
-
-/*
  * The size of "alloc_kind_table" (at most max_k_idx * 4)
  */
 s16b alloc_kind_size;
index 8891074..dbab034 100644 (file)
@@ -32,6 +32,7 @@
 #include "grid.h"
 #include "dungeon.h"
 #include "floor.h"
+#include "floor-town.h"
 #include "feature.h"
 #include "objectkind.h"
 
index d9bcd12..65e61ad 100644 (file)
@@ -27,6 +27,7 @@
 #include "dungeon-file.h"
 #include "files.h"
 #include "feature.h"
+#include "floor-town.h"
 
  /*
   * Wilderness
index 58da53c..8efcf53 100644 (file)
@@ -20,6 +20,7 @@
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "objectkind.h"
+#include "floor-town.h"
 
 
 #ifdef ALLOW_SPOILERS
index ff18872..29da228 100644 (file)
@@ -27,6 +27,7 @@
 #include "grid.h"
 #include "floor.h"
 #include "floor-events.h"
+#include "floor-town.h"
 #include "player-move.h"
 #include "player-status.h"
 #include "monster-status.h"