• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionb9026eb63f6a31a3569ea5ce3f9877a6de4a1a2f (tree)
Time2019-05-02 21:25:04
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -181,6 +181,7 @@
181181 <ClCompile Include="..\..\src\player-effects.c" />
182182 <ClCompile Include="..\..\src\player-personality.c" />
183183 <ClCompile Include="..\..\src\player-race.c" />
184+ <ClCompile Include="..\..\src\player-sex.c" />
184185 <ClCompile Include="..\..\src\player-skill.c" />
185186 <ClCompile Include="..\..\src\player-status.c" />
186187 <ClCompile Include="..\..\src\quest.c" />
@@ -343,6 +344,7 @@
343344 <ClInclude Include="..\..\src\player-move.h" />
344345 <ClInclude Include="..\..\src\player-personality.h" />
345346 <ClInclude Include="..\..\src\player-race.h" />
347+ <ClInclude Include="..\..\src\player-sex.h" />
346348 <ClInclude Include="..\..\src\player-skill.h" />
347349 <ClInclude Include="..\..\src\player-status.h" />
348350 <ClInclude Include="..\..\src\quest.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -342,6 +342,9 @@
342342 <ClCompile Include="..\..\src\player-personality.c">
343343 <Filter>player</Filter>
344344 </ClCompile>
345+ <ClCompile Include="..\..\src\player-sex.c">
346+ <Filter>player</Filter>
347+ </ClCompile>
345348 </ItemGroup>
346349 <ItemGroup>
347350 <ClInclude Include="..\..\src\angband.h" />
@@ -650,6 +653,9 @@
650653 <ClInclude Include="..\..\src\player-personality.h">
651654 <Filter>player</Filter>
652655 </ClInclude>
656+ <ClInclude Include="..\..\src\player-sex.h">
657+ <Filter>player</Filter>
658+ </ClInclude>
653659 </ItemGroup>
654660 <ItemGroup>
655661 <ResourceCompile Include="..\..\src\angband.rc" />
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -56,7 +56,7 @@ hengband_SOURCES = \
5656 \
5757 player-move.c player-move.h player-damage.c player-damage.h player-status.c player-status.h \
5858 player-effects.c player-effects.h player-skill.c player-skill.h player-class.c player-class.h \
59- player-race.c player-race.h player-pesonality.c player-pesonality.h \
59+ player-race.c player-race.h player-pesonality.c player-pesonality.h player-sex.c player-sex.h \
6060 \
6161 quest.h quest.c\
6262 \
--- a/src/birth.c
+++ b/src/birth.c
@@ -25,6 +25,7 @@
2525 #include "player-class.h"
2626 #include "player-status.h"
2727 #include "player-personality.h"
28+#include "player-sex.h"
2829 #include "spells.h"
2930 #include "spells-status.h"
3031 #include "wild.h"
--- a/src/externs.h
+++ b/src/externs.h
@@ -69,7 +69,6 @@ extern const byte adj_con_mhp[];
6969 extern const byte adj_chr_chm[];
7070 extern const byte blows_table[12][12];
7171 extern const byte extract_energy[200];
72-extern const player_sex sex_info[MAX_SEXES];
7372
7473 extern const u32b fake_spell_flags[4];
7574 extern const concptr realm_names[];
@@ -214,7 +213,6 @@ extern TERM_COLOR tval_to_attr[128];
214213 extern SYMBOL_CODE tval_to_char[128];
215214 extern concptr keymap_act[KEYMAP_MODES][256];
216215 extern player_type *p_ptr;
217-extern const player_sex *sp_ptr;
218216 extern char *f_name;
219217 extern char *f_tag;
220218
--- a/src/files.c
+++ b/src/files.c
@@ -28,6 +28,7 @@
2828 #include "player-class.h"
2929 #include "player-skill.h"
3030 #include "player-personality.h"
31+#include "player-sex.h"
3132 #include "sort.h"
3233 #include "mutation.h"
3334 #include "quest.h"
--- a/src/load.c
+++ b/src/load.c
@@ -71,6 +71,7 @@
7171 #include "player-class.h"
7272 #include "player-race.h"
7373 #include "player-personality.h"
74+#include "player-sex.h"
7475 #include "birth.h"
7576 #include "world.h"
7677 #include "objectkind.h"
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -36,6 +36,7 @@
3636 #include "player-race.h"
3737 #include "player-class.h"
3838 #include "player-personality.h"
39+#include "player-sex.h"
3940 #include "monster-status.h"
4041 #include "snipe.h"
4142 #include "files.h"
--- /dev/null
+++ b/src/player-sex.c
@@ -0,0 +1,38 @@
1+#include "angband.h"
2+#include "player-sex.h"
3+
4+/*
5+ * Pointer to the player tables
6+ * (sex, race, class, magic)
7+ */
8+const player_sex *sp_ptr;
9+
10+/*!
11+ * @brief 性別表記 /
12+ * Player Sexes
13+ * @details
14+ * <pre>
15+ * Title,
16+ * Winner
17+ * </pre>
18+ */
19+const player_sex sex_info[MAX_SEXES] =
20+{
21+ {
22+#ifdef JP
23+ "女性",
24+ "クイーン",
25+#endif
26+ "Female",
27+ "Queen"
28+ },
29+ {
30+#ifdef JP
31+ "男性",
32+ "キング",
33+#endif
34+ "Male",
35+ "King"
36+ }
37+};
38+
--- /dev/null
+++ b/src/player-sex.h
@@ -0,0 +1,21 @@
1+#pragma once
2+
3+/*
4+ * Player sex info
5+ */
6+
7+typedef struct player_sex player_sex;
8+
9+struct player_sex
10+{
11+ concptr title; /* Type of sex */
12+ concptr winner; /* Name of winner */
13+#ifdef JP
14+ concptr E_title; /* 英語性別 */
15+ concptr E_winner; /* 英語性別 */
16+#endif
17+};
18+
19+extern const player_sex sex_info[MAX_SEXES];
20+extern const player_sex *sp_ptr;
21+
--- a/src/scores.c
+++ b/src/scores.c
@@ -17,6 +17,7 @@
1717 #include "player-status.h"
1818 #include "player-class.h"
1919 #include "player-personality.h"
20+#include "player-sex.h"
2021 #include "files.h"
2122 #include "scores.h"
2223 #include "floor.h"
--- a/src/tables.c
+++ b/src/tables.c
@@ -1255,36 +1255,6 @@ const byte extract_energy[200] =
12551255 /* Fast */ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
12561256 };
12571257
1258-
1259-/*!
1260- * @brief 性別表記 /
1261- * Player Sexes
1262- * @details
1263- * <pre>
1264- * Title,
1265- * Winner
1266- * </pre>
1267- */
1268-const player_sex sex_info[MAX_SEXES] =
1269-{
1270- {
1271-#ifdef JP
1272- "女性",
1273- "クイーン",
1274-#endif
1275- "Female",
1276- "Queen"
1277- },
1278- {
1279-#ifdef JP
1280- "男性",
1281- "キング",
1282-#endif
1283- "Male",
1284- "King"
1285- }
1286-};
1287-
12881258 /*!
12891259 * 魔法領域フラグ管理テーブル /
12901260 * Zangband uses this array instead of the spell flags table, as there
--- a/src/types.h
+++ b/src/types.h
@@ -76,24 +76,6 @@ struct magic_type
7676 };
7777
7878
79-/*
80- * Player sex info
81- */
82-
83-typedef struct player_sex player_sex;
84-
85-struct player_sex
86-{
87- concptr title; /* Type of sex */
88- concptr winner; /* Name of winner */
89-#ifdef JP
90- concptr E_title; /* 英語性別 */
91- concptr E_winner; /* 英語性別 */
92-#endif
93-};
94-
95-
96-
9779 typedef struct kamae kamae;
9880
9981 struct kamae
--- a/src/variable.c
+++ b/src/variable.c
@@ -447,11 +447,6 @@ player_type p_body;
447447 */
448448 player_type *p_ptr = &p_body;
449449
450-/*
451- * Pointer to the player tables
452- * (sex, race, class, magic)
453- */
454-const player_sex *sp_ptr;
455450
456451
457452 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file
Show on old repository browser