• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

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

Log Message

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

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -179,6 +179,7 @@
179179 <ClCompile Include="..\..\src\player-class.c" />
180180 <ClCompile Include="..\..\src\player-damage.c" />
181181 <ClCompile Include="..\..\src\player-effects.c" />
182+ <ClCompile Include="..\..\src\player-personality.c" />
182183 <ClCompile Include="..\..\src\player-race.c" />
183184 <ClCompile Include="..\..\src\player-skill.c" />
184185 <ClCompile Include="..\..\src\player-status.c" />
@@ -340,6 +341,7 @@
340341 <ClInclude Include="..\..\src\player-damage.h" />
341342 <ClInclude Include="..\..\src\player-effects.h" />
342343 <ClInclude Include="..\..\src\player-move.h" />
344+ <ClInclude Include="..\..\src\player-personality.h" />
343345 <ClInclude Include="..\..\src\player-race.h" />
344346 <ClInclude Include="..\..\src\player-skill.h" />
345347 <ClInclude Include="..\..\src\player-status.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -339,6 +339,9 @@
339339 <ClCompile Include="..\..\src\player-race.c">
340340 <Filter>player</Filter>
341341 </ClCompile>
342+ <ClCompile Include="..\..\src\player-personality.c">
343+ <Filter>player</Filter>
344+ </ClCompile>
342345 </ItemGroup>
343346 <ItemGroup>
344347 <ClInclude Include="..\..\src\angband.h" />
@@ -644,6 +647,9 @@
644647 <ClInclude Include="..\..\src\player-race.h">
645648 <Filter>player</Filter>
646649 </ClInclude>
650+ <ClInclude Include="..\..\src\player-personality.h">
651+ <Filter>player</Filter>
652+ </ClInclude>
647653 </ItemGroup>
648654 <ItemGroup>
649655 <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 \
59+ player-race.c player-race.h player-pesonality.c player-pesonality.h \
6060 \
6161 quest.h quest.c\
6262 \
--- a/src/birth.c
+++ b/src/birth.c
@@ -24,6 +24,7 @@
2424 #include "quest.h"
2525 #include "player-class.h"
2626 #include "player-status.h"
27+#include "player-personality.h"
2728 #include "spells.h"
2829 #include "spells-status.h"
2930 #include "wild.h"
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -51,6 +51,7 @@
5151 #include "player-effects.h"
5252 #include "player-status.h"
5353 #include "player-skill.h"
54+#include "player-personality.h"
5455 #include "sort.h"
5556 #include "mutation.h"
5657 #include "quest.h"
--- a/src/externs.h
+++ b/src/externs.h
@@ -71,7 +71,6 @@ extern const byte blows_table[12][12];
7171 extern const byte extract_energy[200];
7272 extern const player_sex sex_info[MAX_SEXES];
7373
74-extern const player_seikaku seikaku_info[MAX_SEIKAKU];
7574 extern const u32b fake_spell_flags[4];
7675 extern const concptr realm_names[];
7776 #ifdef JP
@@ -216,7 +215,6 @@ extern SYMBOL_CODE tval_to_char[128];
216215 extern concptr keymap_act[KEYMAP_MODES][256];
217216 extern player_type *p_ptr;
218217 extern const player_sex *sp_ptr;
219-extern const player_seikaku *ap_ptr;
220218 extern char *f_name;
221219 extern char *f_tag;
222220
--- a/src/files.c
+++ b/src/files.c
@@ -27,6 +27,7 @@
2727 #include "player-move.h"
2828 #include "player-class.h"
2929 #include "player-skill.h"
30+#include "player-personality.h"
3031 #include "sort.h"
3132 #include "mutation.h"
3233 #include "quest.h"
--- a/src/load.c
+++ b/src/load.c
@@ -70,6 +70,7 @@
7070 #include "player-skill.h"
7171 #include "player-class.h"
7272 #include "player-race.h"
73+#include "player-personality.h"
7374 #include "birth.h"
7475 #include "world.h"
7576 #include "objectkind.h"
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -35,6 +35,7 @@
3535 #include "player-effects.h"
3636 #include "player-race.h"
3737 #include "player-class.h"
38+#include "player-personality.h"
3839 #include "monster-status.h"
3940 #include "snipe.h"
4041 #include "files.h"
--- /dev/null
+++ b/src/player-personality.c
@@ -0,0 +1,143 @@
1+#include "angband.h"
2+#include "player-personality.h"
3+
4+
5+/*!
6+ * @brief 性格情報 /
7+ * Player Character
8+ */
9+const player_seikaku seikaku_info[MAX_SEIKAKU] =
10+{
11+ {
12+#ifdef JP
13+ "ふつう",
14+#endif
15+ "Ordinary",
16+ { 0, 0, 0, 0, 0, 0 },
17+ 0, 0, 0, 0, 0, 0, 0, 0,
18+ 0, 1, 0
19+ },
20+
21+ {
22+#ifdef JP
23+ "ちからじまん",
24+#endif
25+ "Mighty",
26+ { 2, -2, -1, 0, 1, 0 },
27+ -5, -5, -3, -1, -2, -2, 10, 0,
28+ 1, 1, 0
29+ },
30+
31+ {
32+#ifdef JP
33+ "きれもの",
34+#endif
35+ "Shrewd",
36+ { -2, 2, 0, 1, -1, -1 },
37+ 3, 8, 2, 0, -2, 5, -8, -5,
38+ -1, 1, 0
39+ },
40+
41+ {
42+#ifdef JP
43+ "しあわせもの",
44+#endif
45+ "Pious",
46+ { 0, -1, 2, -1, 0, 1 },
47+ -5, 2, 4, -1, 3, -2, -3, -6,
48+ 0, 1, 0
49+ },
50+
51+ {
52+#ifdef JP
53+ "すばしっこい",
54+#endif
55+ "Nimble",
56+ { -1, 1, -1, 2, -1, -1 },
57+ 7, 2, -1, 1, 5, 5, 0, 10,
58+ 0, 0, 0
59+ },
60+
61+ {
62+#ifdef JP
63+ "いのちしらず",
64+#endif
65+ "Fearless",
66+ { 2, 1, 1, -1, -1, 0 },
67+ -5, 5, -2, 0, 2, -2, 10, 10,
68+ -1, 1, 0
69+ },
70+
71+ {
72+#ifdef JP
73+ "コンバット",
74+#endif
75+ "Combat",
76+ { 1, -1, -2, 2, 0, 1 },
77+ -2, -3, -3, 0, -1, 2, 5, 5,
78+ 0, 0, 0
79+ },
80+
81+ {
82+#ifdef JP
83+ "なまけもの",
84+#endif
85+ "Lazy",
86+ { -2, -2, -2, -2, -2, -2 },
87+ -5, -5, -3, -1, -4, -2, -8, -8,
88+ -1, 1, 0
89+ },
90+
91+ {
92+#ifdef JP
93+ "セクシーギャル",
94+#endif
95+ "Sexy",
96+ { 1, 1, 1, 1, 1, 3 },
97+ 10, 5, 3, 0, 4, 2, 10, 10,
98+ 0, 1, 1
99+ },
100+
101+ {
102+#ifdef JP
103+ "ラッキーマン",
104+#endif
105+ "Lucky",
106+ { -2, -2, -2, -2, -2, 2 },
107+ 10, 7, 3, 2, 10, 8, 15, 15,
108+ 0, 1, 2
109+ },
110+
111+ {
112+#ifdef JP
113+ "がまんづよい",
114+#endif
115+ "Patient",
116+ { -1, -1, 1, -2, 2, 0 },
117+ -5, -3, 3, 1, 0, -3, -6, -6,
118+ 1, 0, 0
119+ },
120+
121+ {
122+#ifdef JP
123+ "いかさま",
124+#endif
125+ "Munchkin",
126+ { 10, 10, 10, 10, 10, 10 },
127+ 20, 40, 30, 10, 40, 40, 80, 80,
128+ 15, 1, 0
129+ },
130+
131+ {
132+#ifdef JP
133+ "チャージマン",
134+#endif
135+ "Chargeman",
136+ { 2, -2, -2, 0, 1, -2 },
137+ -7, 7, -5, -1, -2, -4, 15, 20,
138+ -1, 0, 0
139+ },
140+
141+};
142+
143+const player_seikaku *ap_ptr;
--- /dev/null
+++ b/src/player-personality.h
@@ -0,0 +1,31 @@
1+#pragma once
2+
3+typedef struct player_seikaku player_seikaku;
4+struct player_seikaku
5+{
6+ concptr title; /* Type of seikaku */
7+
8+#ifdef JP
9+ concptr E_title; /* 英語性格 */
10+#endif
11+
12+ s16b a_adj[6]; /* seikaku stat bonuses */
13+
14+ s16b a_dis; /* seikaku disarming */
15+ s16b a_dev; /* seikaku magic devices */
16+ s16b a_sav; /* seikaku saving throw */
17+ s16b a_stl; /* seikaku stealth */
18+ s16b a_srh; /* seikaku search ability */
19+ s16b a_fos; /* seikaku search frequency */
20+ s16b a_thn; /* seikaku combat (normal) */
21+ s16b a_thb; /* seikaku combat (shooting) */
22+
23+ s16b a_mhp; /* Race hit-dice modifier */
24+
25+ byte no; /* の */
26+ byte sex; /* seibetu seigen */
27+};
28+
29+extern const player_seikaku seikaku_info[MAX_SEIKAKU];
30+
31+extern const player_seikaku *ap_ptr;
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -7,6 +7,7 @@
77 #include "player-skill.h"
88 #include "player-race.h"
99 #include "player-class.h"
10+#include "player-personality.h"
1011 #include "floor.h"
1112 #include "floor-events.h"
1213 #include "feature.h"
--- a/src/report.c
+++ b/src/report.c
@@ -13,6 +13,7 @@
1313 #include "player-status.h"
1414 #include "player-class.h"
1515 #include "player-race.h"
16+#include "player-personality.h"
1617 #include "files.h"
1718 #include "world.h"
1819
--- a/src/scores.c
+++ b/src/scores.c
@@ -16,6 +16,7 @@
1616 #include "player-race.h"
1717 #include "player-status.h"
1818 #include "player-class.h"
19+#include "player-personality.h"
1920 #include "files.h"
2021 #include "scores.h"
2122 #include "floor.h"
--- a/src/tables.c
+++ b/src/tables.c
@@ -1286,145 +1286,6 @@ const player_sex sex_info[MAX_SEXES] =
12861286 };
12871287
12881288 /*!
1289- * @brief 性格情報 /
1290- * Player Character
1291- */
1292-const player_seikaku seikaku_info[MAX_SEIKAKU] =
1293-{
1294- {
1295-#ifdef JP
1296- "ふつう",
1297-#endif
1298- "Ordinary",
1299- { 0, 0, 0, 0, 0, 0 },
1300- 0, 0, 0, 0, 0, 0, 0, 0,
1301- 0, 1, 0
1302- },
1303-
1304- {
1305-#ifdef JP
1306- "ちからじまん",
1307-#endif
1308- "Mighty",
1309- { 2, -2, -1, 0, 1, 0 },
1310- -5, -5, -3, -1, -2, -2, 10, 0,
1311- 1, 1, 0
1312- },
1313-
1314- {
1315-#ifdef JP
1316- "きれもの",
1317-#endif
1318- "Shrewd",
1319- { -2, 2, 0, 1, -1, -1 },
1320- 3, 8, 2, 0, -2, 5, -8, -5,
1321- -1, 1, 0
1322- },
1323-
1324- {
1325-#ifdef JP
1326- "しあわせもの",
1327-#endif
1328- "Pious",
1329- { 0, -1, 2, -1, 0, 1 },
1330- -5, 2, 4, -1, 3, -2, -3, -6,
1331- 0, 1, 0
1332- },
1333-
1334- {
1335-#ifdef JP
1336- "すばしっこい",
1337-#endif
1338- "Nimble",
1339- { -1, 1, -1, 2, -1, -1 },
1340- 7, 2, -1, 1, 5, 5, 0, 10,
1341- 0, 0, 0
1342- },
1343-
1344- {
1345-#ifdef JP
1346- "いのちしらず",
1347-#endif
1348- "Fearless",
1349- { 2, 1, 1, -1, -1, 0 },
1350- -5, 5, -2, 0, 2, -2, 10, 10,
1351- -1, 1, 0
1352- },
1353-
1354- {
1355-#ifdef JP
1356- "コンバット",
1357-#endif
1358- "Combat",
1359- { 1, -1, -2, 2, 0, 1 },
1360- -2, -3, -3, 0, -1, 2, 5, 5,
1361- 0, 0, 0
1362- },
1363-
1364- {
1365-#ifdef JP
1366- "なまけもの",
1367-#endif
1368- "Lazy",
1369- { -2, -2, -2, -2, -2, -2 },
1370- -5, -5, -3, -1, -4, -2, -8, -8,
1371- -1, 1, 0
1372- },
1373-
1374- {
1375-#ifdef JP
1376- "セクシーギャル",
1377-#endif
1378- "Sexy",
1379- { 1, 1, 1, 1, 1, 3 },
1380- 10, 5, 3, 0, 4, 2, 10, 10,
1381- 0, 1, 1
1382- },
1383-
1384- {
1385-#ifdef JP
1386- "ラッキーマン",
1387-#endif
1388- "Lucky",
1389- { -2, -2, -2, -2, -2, 2 },
1390- 10, 7, 3, 2, 10, 8, 15, 15,
1391- 0, 1, 2
1392- },
1393-
1394- {
1395-#ifdef JP
1396- "がまんづよい",
1397-#endif
1398- "Patient",
1399- { -1, -1, 1, -2, 2, 0 },
1400- -5, -3, 3, 1, 0, -3, -6, -6,
1401- 1, 0, 0
1402- },
1403-
1404- {
1405-#ifdef JP
1406- "いかさま",
1407-#endif
1408- "Munchkin",
1409- { 10, 10, 10, 10, 10, 10 },
1410- 20, 40, 30, 10, 40, 40, 80, 80,
1411- 15, 1, 0
1412- },
1413-
1414- {
1415-#ifdef JP
1416- "チャージマン",
1417-#endif
1418- "Chargeman",
1419- { 2, -2, -2, 0, 1, -2 },
1420- -7, 7, -5, -1, -2, -4, 15, 20,
1421- -1, 0, 0
1422- },
1423-
1424-};
1425-
1426-
1427-/*!
14281289 * 魔法領域フラグ管理テーブル /
14291290 * Zangband uses this array instead of the spell flags table, as there
14301291 * are 5 realms of magic, each with 4 spellbooks and 8 spells per book -- TY
--- a/src/types.h
+++ b/src/types.h
@@ -92,31 +92,6 @@ struct player_sex
9292 #endif
9393 };
9494
95-typedef struct player_seikaku player_seikaku;
96-struct player_seikaku
97-{
98- concptr title; /* Type of seikaku */
99-
100-#ifdef JP
101- concptr E_title; /* 英語性格 */
102-#endif
103-
104- s16b a_adj[6]; /* seikaku stat bonuses */
105-
106- s16b a_dis; /* seikaku disarming */
107- s16b a_dev; /* seikaku magic devices */
108- s16b a_sav; /* seikaku saving throw */
109- s16b a_stl; /* seikaku stealth */
110- s16b a_srh; /* seikaku search ability */
111- s16b a_fos; /* seikaku search frequency */
112- s16b a_thn; /* seikaku combat (normal) */
113- s16b a_thb; /* seikaku combat (shooting) */
114-
115- s16b a_mhp; /* Race hit-dice modifier */
116-
117- byte no; /* の */
118- byte sex; /* seibetu seigen */
119-};
12095
12196
12297 typedef struct kamae kamae;
--- a/src/variable.c
+++ b/src/variable.c
@@ -452,7 +452,6 @@ player_type *p_ptr = &p_body;
452452 * (sex, race, class, magic)
453453 */
454454 const player_sex *sp_ptr;
455-const player_seikaku *ap_ptr;
456455
457456
458457 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