• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision77371e00cdedc0163dd1a8281d1b6752916166ee (tree)
Time2019-05-02 11:06:29
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 floor-town.c/h を作成して関連構造体と変数を移動.

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -157,6 +157,7 @@
157157 <ClCompile Include="..\..\src\floor-events.c" />
158158 <ClCompile Include="..\..\src\floor-generate.c" />
159159 <ClCompile Include="..\..\src\floor-save.c" />
160+ <ClCompile Include="..\..\src\floor-town.c" />
160161 <ClCompile Include="..\..\src\floor.c" />
161162 <ClCompile Include="..\..\src\geometry.c" />
162163 <ClCompile Include="..\..\src\history.c" />
@@ -302,6 +303,7 @@
302303 <ClInclude Include="..\..\src\floor-events.h" />
303304 <ClInclude Include="..\..\src\floor-generate.h" />
304305 <ClInclude Include="..\..\src\floor-save.h" />
306+ <ClInclude Include="..\..\src\floor-town.h" />
305307 <ClInclude Include="..\..\src\floor.h" />
306308 <ClInclude Include="..\..\src\gameoption.h" />
307309 <ClInclude Include="..\..\src\gamevalue.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -333,6 +333,9 @@
333333 <ClCompile Include="..\..\src\object-ego.c">
334334 <Filter>object</Filter>
335335 </ClCompile>
336+ <ClCompile Include="..\..\src\floor-town.c">
337+ <Filter>floor</Filter>
338+ </ClCompile>
336339 </ItemGroup>
337340 <ItemGroup>
338341 <ClInclude Include="..\..\src\angband.h" />
@@ -632,6 +635,9 @@
632635 <ClInclude Include="..\..\src\object-ego.h">
633636 <Filter>object</Filter>
634637 </ClInclude>
638+ <ClInclude Include="..\..\src\floor-town.h">
639+ <Filter>floor</Filter>
640+ </ClInclude>
635641 </ItemGroup>
636642 <ItemGroup>
637643 <ResourceCompile Include="..\..\src\angband.rc" />
--- a/src/birth.c
+++ b/src/birth.c
@@ -30,6 +30,7 @@
3030 #include "floor.h"
3131 #include "cmd-pet.h"
3232 #include "dungeon-file.h"
33+#include "floor-town.h"
3334 #include "files.h"
3435 #include "birth.h"
3536 #include "player-skill.h"
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -69,6 +69,7 @@
6969 #include "player-move.h"
7070 #include "spells.h"
7171 #include "objectkind.h"
72+#include "floor-town.h"
7273
7374 /*
7475 */
--- a/src/core.c
+++ b/src/core.c
@@ -33,6 +33,7 @@
3333 #include "dungeon.h"
3434 #include "floor.h"
3535 #include "floor-events.h"
36+#include "floor-town.h"
3637 #include "grid.h"
3738 #include "object-curse.h"
3839 #include "object-flavor.h"
--- a/src/dungeon-file.c
+++ b/src/dungeon-file.c
@@ -17,6 +17,7 @@
1717 #include "objectkind.h"
1818 #include "object-ego.h"
1919 #include "monsterrace.h"
20+#include "floor-town.h"
2021
2122 dungeon_grid letter[255];
2223
--- a/src/externs.h
+++ b/src/externs.h
@@ -211,8 +211,6 @@ extern const concptr angband_sound_name[SOUND_MAX];
211211 extern const concptr angband_music_basic_name[MUSIC_BASIC_MAX];
212212 extern FLOOR_IDX max_floor_id;
213213 extern u32b saved_floor_file_sign;
214-extern TOWN_IDX max_towns;
215-extern town_type *town_info;
216214 extern s16b alloc_kind_size;
217215 extern alloc_entry *alloc_kind_table;
218216 extern s16b alloc_race_size;
--- a/src/files.c
+++ b/src/files.c
@@ -45,6 +45,7 @@
4545 #include "term.h"
4646 #include "view-mainwindow.h"
4747 #include "floor-events.h"
48+#include "floor-town.h"
4849 #include "dungeon-file.h"
4950 #include "init.h"
5051 #include "monster-spell.h"
--- /dev/null
+++ b/src/floor-town.c
@@ -0,0 +1,12 @@
1+#include "angband.h"
2+#include "floor-town.h"
3+
4+/*
5+ * Maximum number of towns
6+ */
7+TOWN_IDX max_towns;
8+
9+/*
10+ * The towns [max_towns]
11+ */
12+town_type *town_info;
--- /dev/null
+++ b/src/floor-town.h
@@ -0,0 +1,17 @@
1+#pragma once
2+
3+/*
4+ * A structure describing a town with
5+ * stores and buildings
6+ */
7+typedef struct town_type town_type;
8+struct town_type
9+{
10+ GAME_TEXT name[32];
11+ u32b seed; /* Seed for RNG */
12+ store_type *store; /* The stores [MAX_STORES] */
13+ byte numstores;
14+};
15+
16+extern TOWN_IDX max_towns;
17+extern town_type *town_info;
--- a/src/init.c
+++ b/src/init.c
@@ -47,6 +47,7 @@
4747 #include "files.h"
4848 #include "feature.h"
4949 #include "floor.h"
50+#include "floor-town.h"
5051 #include "dungeon.h"
5152 #include "rooms-vault.h"
5253 #include "player-skill.h"
--- a/src/load.c
+++ b/src/load.c
@@ -59,8 +59,9 @@
5959 #include "wild.h"
6060 #include "patron.h"
6161
62-#include "floor-save.h"
6362 #include "floor.h"
63+#include "floor-save.h"
64+#include "floor-town.h"
6465 #include "grid.h"
6566
6667 #include "cmd-pet.h"
--- a/src/rumor.c
+++ b/src/rumor.c
@@ -6,6 +6,7 @@
66 #include "artifact.h"
77 #include "dungeon.h"
88 #include "monsterrace.h"
9+#include "floor-town.h"
910
1011 /*
1112 * Display a rumor and apply its effects
--- a/src/save.c
+++ b/src/save.c
@@ -22,6 +22,7 @@
2222 #include "floor.h"
2323 #include "floor-events.h"
2424 #include "floor-save.h"
25+#include "floor-town.h"
2526 #include "files.h"
2627 #include "world.h"
2728 #include "objectkind.h"
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -17,6 +17,7 @@
1717
1818 #include "dungeon.h"
1919 #include "floor.h"
20+#include "floor-town.h"
2021 #include "object-boost.h"
2122 #include "object-flavor.h"
2223 #include "object-hook.h"
--- a/src/store.c
+++ b/src/store.c
@@ -34,6 +34,7 @@
3434 #include "world.h"
3535 #include "objectkind.h"
3636 #include "autopick.h"
37+#include "floor-town.h"
3738
3839 #define MIN_STOCK 12
3940
--- a/src/types.h
+++ b/src/types.h
@@ -300,19 +300,6 @@ struct monster_power
300300
301301
302302 /*
303- * A structure describing a town with
304- * stores and buildings
305- */
306-typedef struct town_type town_type;
307-struct town_type
308-{
309- GAME_TEXT name[32];
310- u32b seed; /* Seed for RNG */
311- store_type *store; /* The stores [MAX_STORES] */
312- byte numstores;
313-};
314-
315-/*
316303 * Sort-array element
317304 */
318305 typedef struct tag_type tag_type;
--- a/src/variable.c
+++ b/src/variable.c
@@ -413,16 +413,6 @@ FLOOR_IDX max_floor_id;
413413 u32b saved_floor_file_sign;
414414
415415 /*
416- * Maximum number of towns
417- */
418-TOWN_IDX max_towns;
419-
420-/*
421- * The towns [max_towns]
422- */
423-town_type *town_info;
424-
425-/*
426416 * The size of "alloc_kind_table" (at most max_k_idx * 4)
427417 */
428418 s16b alloc_kind_size;
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -32,6 +32,7 @@
3232 #include "grid.h"
3333 #include "dungeon.h"
3434 #include "floor.h"
35+#include "floor-town.h"
3536 #include "feature.h"
3637 #include "objectkind.h"
3738
--- a/src/wild.c
+++ b/src/wild.c
@@ -27,6 +27,7 @@
2727 #include "dungeon-file.h"
2828 #include "files.h"
2929 #include "feature.h"
30+#include "floor-town.h"
3031
3132 /*
3233 * Wilderness
--- a/src/wizard1.c
+++ b/src/wizard1.c
@@ -20,6 +20,7 @@
2020 #include "object-flavor.h"
2121 #include "object-hook.h"
2222 #include "objectkind.h"
23+#include "floor-town.h"
2324
2425
2526 #ifdef ALLOW_SPOILERS
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -27,6 +27,7 @@
2727 #include "grid.h"
2828 #include "floor.h"
2929 #include "floor-events.h"
30+#include "floor-town.h"
3031 #include "player-move.h"
3132 #include "player-status.h"
3233 #include "monster-status.h"
Show on old repository browser