• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision23974dac3f8aebd43ff94aae729e4ee18b2ad235 (tree)
Time2019-05-02 10:50:40
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -167,6 +167,7 @@
167167 <ClCompile Include="..\..\src\monsterrace.c" />
168168 <ClCompile Include="..\..\src\object-boost.c" />
169169 <ClCompile Include="..\..\src\object-curse.c" />
170+ <ClCompile Include="..\..\src\object-ego.c" />
170171 <ClCompile Include="..\..\src\object-flavor.c" />
171172 <ClCompile Include="..\..\src\object-flavor.h" />
172173 <ClCompile Include="..\..\src\object-hook.c" />
@@ -325,6 +326,7 @@
325326 <ClInclude Include="..\..\src\mutation.h" />
326327 <ClInclude Include="..\..\src\object-boost.h" />
327328 <ClInclude Include="..\..\src\object-curse.h" />
329+ <ClInclude Include="..\..\src\object-ego.h" />
328330 <ClInclude Include="..\..\src\object-hook.h" />
329331 <ClInclude Include="..\..\src\object-broken.h" />
330332 <ClInclude Include="..\..\src\object.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -330,6 +330,9 @@
330330 <ClCompile Include="..\..\src\monsterrace.c">
331331 <Filter>monster</Filter>
332332 </ClCompile>
333+ <ClCompile Include="..\..\src\object-ego.c">
334+ <Filter>object</Filter>
335+ </ClCompile>
333336 </ItemGroup>
334337 <ItemGroup>
335338 <ClInclude Include="..\..\src\angband.h" />
@@ -626,6 +629,9 @@
626629 <ClInclude Include="..\..\src\autopick.h">
627630 <Filter>object</Filter>
628631 </ClInclude>
632+ <ClInclude Include="..\..\src\object-ego.h">
633+ <Filter>object</Filter>
634+ </ClInclude>
629635 </ItemGroup>
630636 <ItemGroup>
631637 <ResourceCompile Include="..\..\src\angband.rc" />
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,7 @@ hengband_SOURCES = \
4848 object-curse.c object-curse.h object-broken.c object-broken.h \
4949 object-hook.c object-hook.h object1.c object2.c object.h \
5050 objectkind.c objectkind.h objectkind-hook.c objectkind-hook.h \
51- object-flavor.c object-flavor.h \
51+ object-flavor.c object-flavor.h object-ego.c object-ego.h \
5252 \
5353 patron.h patron.c \
5454 \
--- a/src/artifact.c
+++ b/src/artifact.c
@@ -22,6 +22,7 @@
2222 #include "objectkind.h"
2323 #include "object-boost.h"
2424 #include "object-curse.h"
25+#include "object-ego.h"
2526 #include "object-flavor.h"
2627 #include "object-hook.h"
2728 #include "spells-object.h"
--- a/src/autopick.c
+++ b/src/autopick.c
@@ -22,6 +22,7 @@
2222 #include "player-move.h"
2323 #include "player-class.h"
2424 #include "objectkind.h"
25+#include "object-ego.h"
2526 #include "object-flavor.h"
2627 #include "object-hook.h"
2728
--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -27,6 +27,7 @@
2727 #include "monster-status.h"
2828 #include "files.h"
2929 #include "objectkind.h"
30+#include "object-ego.h"
3031 #include "grid.h"
3132
3233 /*!
--- a/src/dungeon-file.c
+++ b/src/dungeon-file.c
@@ -15,6 +15,7 @@
1515 #include "world.h"
1616 #include "rooms-vault.h"
1717 #include "objectkind.h"
18+#include "object-ego.h"
1819 #include "monsterrace.h"
1920
2021 dungeon_grid letter[255];
--- a/src/externs.h
+++ b/src/externs.h
@@ -230,10 +230,6 @@ extern birther previous_char;
230230 extern char *f_name;
231231 extern char *f_tag;
232232
233-extern ego_item_type *e_info;
234-extern char *e_name;
235-extern char *e_text;
236-
237233 extern concptr ANGBAND_SYS;
238234 extern concptr ANGBAND_KEYBOARD;
239235 extern concptr ANGBAND_GRAF;
--- a/src/floor-events.c
+++ b/src/floor-events.c
@@ -13,6 +13,7 @@
1313 #include "world.h"
1414 #include "player-effects.h"
1515 #include "objectkind.h"
16+#include "object-ego.h"
1617
1718 static bool mon_invis;
1819 static POSITION mon_fy, mon_fx;
--- a/src/init.c
+++ b/src/init.c
@@ -52,6 +52,7 @@
5252 #include "player-skill.h"
5353 #include "player-class.h"
5454 #include "objectkind.h"
55+#include "object-ego.h"
5556
5657 #ifndef MACINTOSH
5758 #ifdef CHECK_MODIFICATION_TIME
--- a/src/load.c
+++ b/src/load.c
@@ -70,6 +70,7 @@
7070 #include "player-class.h"
7171 #include "world.h"
7272 #include "objectkind.h"
73+#include "object-ego.h"
7374
7475
7576 /*
--- /dev/null
+++ b/src/object-ego.c
@@ -0,0 +1,9 @@
1+#include "angband.h"
2+#include "object-ego.h"
3+
4+/*
5+ * The ego-item arrays
6+ */
7+ego_item_type *e_info;
8+char *e_name;
9+char *e_text;
--- /dev/null
+++ b/src/object-ego.h
@@ -0,0 +1,37 @@
1+#pragma once
2+
3+/*
4+ * Information about "ego-items".
5+ */
6+
7+typedef struct ego_item_type ego_item_type;
8+
9+struct ego_item_type
10+{
11+ STR_OFFSET name; /* Name (offset) */
12+ STR_OFFSET text; /* Text (offset) */
13+
14+ INVENTORY_IDX slot; /*!< 装備部位 / Standard slot value */
15+ PRICE rating; /*!< ベースアイテムからの価値加速 / Rating boost */
16+
17+ DEPTH level; /* Minimum level */
18+ RARITY rarity; /* Object rarity */
19+
20+ HIT_PROB max_to_h; /* Maximum to-hit bonus */
21+ HIT_POINT max_to_d; /* Maximum to-dam bonus */
22+ ARMOUR_CLASS max_to_a; /* Maximum to-ac bonus */
23+
24+ PARAMETER_VALUE max_pval; /* Maximum pval */
25+
26+ PRICE cost; /* Ego-item "cost" */
27+
28+ BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
29+ BIT_FLAGS gen_flags; /* flags for generate */
30+
31+ IDX act_idx; /* Activative ability index */
32+};
33+
34+extern ego_item_type *e_info;
35+extern char *e_name;
36+extern char *e_text;
37+
--- a/src/object-flavor.c
+++ b/src/object-flavor.c
@@ -24,6 +24,7 @@
2424 #include "files.h"
2525 #include "world.h"
2626 #include "monsterrace.h"
27+#include "object-ego.h"
2728
2829 /*!
2930 * @brief 最初から簡易な名称が明らかになるベースアイテムの判定。 / Certain items, if aware, are known instantly
--- a/src/object1.c
+++ b/src/object1.c
@@ -18,6 +18,7 @@
1818 #include "floor.h"
1919 #include "cmd-activate.h"
2020 #include "objectkind.h"
21+#include "object-ego.h"
2122 #include "object-flavor.h"
2223 #include "object-hook.h"
2324 #include "player-move.h"
--- a/src/object2.c
+++ b/src/object2.c
@@ -22,6 +22,7 @@
2222 #include "grid.h"
2323 #include "objectkind.h"
2424 #include "object-boost.h"
25+#include "object-ego.h"
2526 #include "object-flavor.h"
2627 #include "object-hook.h"
2728 #include "object-curse.h"
@@ -33,6 +34,7 @@
3334 #include "player-effects.h"
3435 #include "monster.h"
3536 #include "monsterrace-hook.h"
37+#include "object-ego.h"
3638
3739 /*!
3840 * @brief 床上、モンスター所持でスタックされたアイテムを削除しスタックを補完する / Excise a dungeon object from any stacks
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -25,6 +25,7 @@
2525 #include "avatar.h"
2626 #include "spells-status.h"
2727 #include "realm-hex.h"
28+#include "object-ego.h"
2829 #include "object-hook.h"
2930 #include "wild.h"
3031 #include "spells-floor.h"
--- a/src/types.h
+++ b/src/types.h
@@ -52,37 +52,6 @@
5252 //#include "player-skill.h"
5353
5454
55-/*
56- * Information about "ego-items".
57- */
58-
59-typedef struct ego_item_type ego_item_type;
60-
61-struct ego_item_type
62-{
63- STR_OFFSET name; /* Name (offset) */
64- STR_OFFSET text; /* Text (offset) */
65-
66- INVENTORY_IDX slot; /*!< 装備部位 / Standard slot value */
67- PRICE rating; /*!< ベースアイテムからの価値加速 / Rating boost */
68-
69- DEPTH level; /* Minimum level */
70- RARITY rarity; /* Object rarity */
71-
72- HIT_PROB max_to_h; /* Maximum to-hit bonus */
73- HIT_POINT max_to_d; /* Maximum to-dam bonus */
74- ARMOUR_CLASS max_to_a; /* Maximum to-ac bonus */
75-
76- PARAMETER_VALUE max_pval; /* Maximum pval */
77-
78- PRICE cost; /* Ego-item "cost" */
79-
80- BIT_FLAGS flags[TR_FLAG_SIZE]; /* Ego-Item Flags */
81- BIT_FLAGS gen_flags; /* flags for generate */
82-
83- IDX act_idx; /* Activative ability index */
84-};
85-
8655
8756 typedef struct mbe_info_type mbe_info_type;
8857
--- a/src/variable.c
+++ b/src/variable.c
@@ -494,13 +494,6 @@ const player_seikaku *ap_ptr;
494494 */
495495 birther previous_char;
496496
497-/*
498- * The ego-item arrays
499- */
500-ego_item_type *e_info;
501-char *e_name;
502-char *e_text;
503-
504497 concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file
505498
506499
Show on old repository browser