• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revisión5fd7ca932e99b5f4149dfd3e7d8632a2c1316d41 (tree)
Tiempo2020-03-08 21:00:19
AutorHourier <hourier@user...>
CommiterHourier

Log Message

[Refactor] Separated object-group-table.c/h from cmd-dump.c

Cambiar Resumen

Diferencia incremental

--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj
@@ -178,6 +178,7 @@
178178 <ClCompile Include="..\..\src\cmd\diary-subtitle-table.c" />
179179 <ClCompile Include="..\..\src\cmd\feeling-table.c" />
180180 <ClCompile Include="..\..\src\cmd\monster-group-table.c" />
181+ <ClCompile Include="..\..\src\cmd\object-group-table.c" />
181182 <ClCompile Include="..\..\src\combat\melee1.c" />
182183 <ClCompile Include="..\..\src\combat\shoot.c" />
183184 <ClCompile Include="..\..\src\core.c" />
@@ -355,6 +356,7 @@
355356 <ClInclude Include="..\..\src\cmd\diary-subtitle-table.h" />
356357 <ClInclude Include="..\..\src\cmd\feeling-table.h" />
357358 <ClInclude Include="..\..\src\cmd\monster-group-table.h" />
359+ <ClInclude Include="..\..\src\cmd\object-group-table.h" />
358360 <ClInclude Include="..\..\src\combat\melee.h" />
359361 <ClInclude Include="..\..\src\combat\shoot.h" />
360362 <ClInclude Include="..\..\src\core\show-file.h" />
--- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
+++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
@@ -520,6 +520,9 @@
520520 <ClCompile Include="..\..\src\cmd\diary-subtitle-table.c">
521521 <Filter>cmd</Filter>
522522 </ClCompile>
523+ <ClCompile Include="..\..\src\cmd\object-group-table.c">
524+ <Filter>cmd</Filter>
525+ </ClCompile>
523526 </ItemGroup>
524527 <ItemGroup>
525528 <ClInclude Include="..\..\src\gamevalue.h" />
@@ -1022,6 +1025,9 @@
10221025 <ClInclude Include="..\..\src\cmd\diary-subtitle-table.h">
10231026 <Filter>cmd</Filter>
10241027 </ClInclude>
1028+ <ClInclude Include="..\..\src\cmd\object-group-table.h">
1029+ <Filter>cmd</Filter>
1030+ </ClInclude>
10251031 </ItemGroup>
10261032 <ItemGroup>
10271033 <None Include="..\..\src\wall.bmp" />
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -134,6 +134,7 @@ hengband_SOURCES = \
134134 cmd/feeling-table.c cmd/feeling-table.h \
135135 cmd/monster-group-table.c cmd/monster-group-table.h \
136136 cmd/diary-subtitle-table.c cmd/diary-subtitle-table.h \
137+ cmd/object-group-table.c cmd/object-group-table.h \
137138 cmd/cmd-activate.c cmd/cmd-activate.h cmd/cmd-basic.c cmd/cmd-basic.h \
138139 cmd/cmd-dump.c cmd/cmd-dump.h cmd/cmd-eat.c cmd/cmd-eat.h \
139140 cmd/cmd-gameoption.c cmd/cmd-gameoption.h cmd/cmd-help.c cmd/cmd-help.h \
--- a/src/cmd/cmd-dump.c
+++ b/src/cmd/cmd-dump.c
@@ -80,6 +80,7 @@
8080 #include "cmd/feeling-table.h"
8181 #include "cmd/monster-group-table.h"
8282 #include "cmd/diary-subtitle-table.h"
83+#include "cmd/object-group-table.h"
8384 #include "view-mainwindow.h" // 暫定。後で消す
8485
8586 #include "english.h"
@@ -1786,153 +1787,6 @@ static IDX collect_monsters(player_type *creature_ptr, IDX grp_cur, IDX mon_idx[
17861787
17871788
17881789 /*
1789- * Description of each monster group.
1790- */
1791-static concptr object_group_text[] =
1792-{
1793-#ifdef JP
1794- "キノコ", /* "Mushrooms" */
1795- "薬", /* "Potions" */
1796- "油つぼ", /* "Flasks" */
1797- "巻物", /* "Scrolls" */
1798- "指輪", /* "Rings" */
1799- "アミュレット", /* "Amulets" */
1800- "笛", /* "Whistle" */
1801- "光源", /* "Lanterns" */
1802- "魔法棒", /* "Wands" */
1803- "杖", /* "Staffs" */
1804- "ロッド", /* "Rods" */
1805- "カード", /* "Cards" */
1806- "キャプチャー・ボール",
1807- "羊皮紙",
1808- "くさび",
1809- "箱",
1810- "人形",
1811- "像",
1812- "ゴミ",
1813- "空のビン",
1814- "骨",
1815- "死体",
1816- "刀剣類", /* "Swords" */
1817- "鈍器", /* "Blunt Weapons" */
1818- "長柄武器", /* "Polearms" */
1819- "採掘道具", /* "Diggers" */
1820- "飛び道具", /* "Bows" */
1821- "弾",
1822- "矢",
1823- "ボルト",
1824- "軽装鎧", /* "Soft Armor" */
1825- "重装鎧", /* "Hard Armor" */
1826- "ドラゴン鎧", /* "Dragon Armor" */
1827- "盾", /* "Shields" */
1828- "クローク", /* "Cloaks" */
1829- "籠手", /* "Gloves" */
1830- "ヘルメット", /* "Helms" */
1831- "冠", /* "Crowns" */
1832- "ブーツ", /* "Boots" */
1833- "魔法書",
1834- "財宝",
1835- "何か",
1836-#else
1837- "Mushrooms",
1838- "Potions",
1839- "Flasks",
1840- "Scrolls",
1841- "Rings",
1842- "Amulets",
1843- "Whistle",
1844- "Lanterns",
1845- "Wands",
1846- "Staffs",
1847- "Rods",
1848- "Cards",
1849- "Capture Balls",
1850- "Parchments",
1851- "Spikes",
1852- "Boxs",
1853- "Figurines",
1854- "Statues",
1855- "Junks",
1856- "Bottles",
1857- "Skeletons",
1858- "Corpses",
1859- "Swords",
1860- "Blunt Weapons",
1861- "Polearms",
1862- "Diggers",
1863- "Bows",
1864- "Shots",
1865- "Arrows",
1866- "Bolts",
1867- "Soft Armor",
1868- "Hard Armor",
1869- "Dragon Armor",
1870- "Shields",
1871- "Cloaks",
1872- "Gloves",
1873- "Helms",
1874- "Crowns",
1875- "Boots",
1876- "Spellbooks",
1877- "Treasure",
1878- "Something",
1879-#endif
1880- NULL
1881-};
1882-
1883-
1884-/*
1885- * TVALs of items in each group
1886- */
1887-static byte object_group_tval[] =
1888-{
1889- TV_FOOD,
1890- TV_POTION,
1891- TV_FLASK,
1892- TV_SCROLL,
1893- TV_RING,
1894- TV_AMULET,
1895- TV_WHISTLE,
1896- TV_LITE,
1897- TV_WAND,
1898- TV_STAFF,
1899- TV_ROD,
1900- TV_CARD,
1901- TV_CAPTURE,
1902- TV_PARCHMENT,
1903- TV_SPIKE,
1904- TV_CHEST,
1905- TV_FIGURINE,
1906- TV_STATUE,
1907- TV_JUNK,
1908- TV_BOTTLE,
1909- TV_SKELETON,
1910- TV_CORPSE,
1911- TV_SWORD,
1912- TV_HAFTED,
1913- TV_POLEARM,
1914- TV_DIGGING,
1915- TV_BOW,
1916- TV_SHOT,
1917- TV_ARROW,
1918- TV_BOLT,
1919- TV_SOFT_ARMOR,
1920- TV_HARD_ARMOR,
1921- TV_DRAG_ARMOR,
1922- TV_SHIELD,
1923- TV_CLOAK,
1924- TV_GLOVES,
1925- TV_HELM,
1926- TV_CROWN,
1927- TV_BOOTS,
1928- TV_LIFE_BOOK,
1929- TV_GOLD,
1930- 0,
1931- 0,
1932-};
1933-
1934-
1935-/*
19361790 * Build a list of object indexes in the given group. Return the number
19371791 * of objects in the group.
19381792 *
--- /dev/null
+++ b/src/cmd/object-group-table.c
@@ -0,0 +1,156 @@
1+/*
2+ * @brief オブジェクト種別を表すテキストの配列群
3+ * @date 2020/03/08
4+ * @author Hourier
5+ */
6+
7+#include "angband.h"
8+#include "object-group-table.h"
9+#include "object.h"
10+
11+/*
12+ * todo キャプチャー・ボールではなくモンスター・ボールでは?
13+ * Description of each monster group.
14+ */
15+concptr object_group_text[MAX_OBJECT_GROUP_TEXT] =
16+{
17+#ifdef JP
18+ "キノコ",
19+ "薬",
20+ "油つぼ",
21+ "巻物",
22+ "指輪",
23+ "アミュレット",
24+ "笛",
25+ "光源",
26+ "魔法棒",
27+ "杖",
28+ "ロッド",
29+ "カード",
30+ "キャプチャー・ボール",
31+ "羊皮紙",
32+ "くさび",
33+ "箱",
34+ "人形",
35+ "像",
36+ "ゴミ",
37+ "空のビン",
38+ "骨",
39+ "死体",
40+ "刀剣類",
41+ "鈍器",
42+ "長柄武器",
43+ "採掘道具",
44+ "飛び道具",
45+ "弾",
46+ "矢",
47+ "ボルト",
48+ "軽装鎧",
49+ "重装鎧",
50+ "ドラゴン鎧",
51+ "盾",
52+ "クローク",
53+ "籠手",
54+ "ヘルメット",
55+ "冠",
56+ "ブーツ",
57+ "魔法書",
58+ "財宝",
59+ "何か",
60+#else
61+ "Mushrooms",
62+ "Potions",
63+ "Flasks",
64+ "Scrolls",
65+ "Rings",
66+ "Amulets",
67+ "Whistle",
68+ "Lanterns",
69+ "Wands",
70+ "Staffs",
71+ "Rods",
72+ "Cards",
73+ "Capture Balls",
74+ "Parchments",
75+ "Spikes",
76+ "Boxs",
77+ "Figurines",
78+ "Statues",
79+ "Junks",
80+ "Bottles",
81+ "Skeletons",
82+ "Corpses",
83+ "Swords",
84+ "Blunt Weapons",
85+ "Polearms",
86+ "Diggers",
87+ "Bows",
88+ "Shots",
89+ "Arrows",
90+ "Bolts",
91+ "Soft Armor",
92+ "Hard Armor",
93+ "Dragon Armor",
94+ "Shields",
95+ "Cloaks",
96+ "Gloves",
97+ "Helms",
98+ "Crowns",
99+ "Boots",
100+ "Spellbooks",
101+ "Treasure",
102+ "Something",
103+#endif
104+ NULL
105+};
106+
107+
108+/*
109+ * TVALs of items in each group
110+ */
111+byte object_group_tval[MAX_OBJECT_GROUP_TVAL] =
112+{
113+ TV_FOOD,
114+ TV_POTION,
115+ TV_FLASK,
116+ TV_SCROLL,
117+ TV_RING,
118+ TV_AMULET,
119+ TV_WHISTLE,
120+ TV_LITE,
121+ TV_WAND,
122+ TV_STAFF,
123+ TV_ROD,
124+ TV_CARD,
125+ TV_CAPTURE,
126+ TV_PARCHMENT,
127+ TV_SPIKE,
128+ TV_CHEST,
129+ TV_FIGURINE,
130+ TV_STATUE,
131+ TV_JUNK,
132+ TV_BOTTLE,
133+ TV_SKELETON,
134+ TV_CORPSE,
135+ TV_SWORD,
136+ TV_HAFTED,
137+ TV_POLEARM,
138+ TV_DIGGING,
139+ TV_BOW,
140+ TV_SHOT,
141+ TV_ARROW,
142+ TV_BOLT,
143+ TV_SOFT_ARMOR,
144+ TV_HARD_ARMOR,
145+ TV_DRAG_ARMOR,
146+ TV_SHIELD,
147+ TV_CLOAK,
148+ TV_GLOVES,
149+ TV_HELM,
150+ TV_CROWN,
151+ TV_BOOTS,
152+ TV_LIFE_BOOK,
153+ TV_GOLD,
154+ 0,
155+ 0,
156+};
--- /dev/null
+++ b/src/cmd/object-group-table.h
@@ -0,0 +1,8 @@
1+#pragma once
2+
3+#define MAX_OBJECT_GROUP_TEXT 43
4+#define MAX_OBJECT_GROUP_TVAL 43
5+
6+extern concptr object_group_text[MAX_OBJECT_GROUP_TEXT];
7+extern byte object_group_tval[MAX_OBJECT_GROUP_TVAL];
8+