OSDN Git Service

[Refactor] #40236 Separated monster-group-table.c/h from cmd-dump.c
authorHourier <hourier@users.sourceforge.jp>
Sun, 8 Mar 2020 11:35:36 +0000 (20:35 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 8 Mar 2020 11:35:36 +0000 (20:35 +0900)
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd/cmd-dump.c
src/cmd/monster-group-table.c [new file with mode: 0644]
src/cmd/monster-group-table.h [new file with mode: 0644]

index 5f5db1f..01c12e5 100644 (file)
     <ClCompile Include="..\..\src\cmd\cmd-zaprod.c" />\r
     <ClCompile Include="..\..\src\cmd\cmd-zapwand.c" />\r
     <ClCompile Include="..\..\src\cmd\feeling-table.c" />\r
+    <ClCompile Include="..\..\src\cmd\monster-group-table.c" />\r
     <ClCompile Include="..\..\src\combat\melee1.c" />\r
     <ClCompile Include="..\..\src\combat\shoot.c" />\r
     <ClCompile Include="..\..\src\core.c" />\r
     <ClInclude Include="..\..\src\cmd\cmd-zaprod.h" />\r
     <ClInclude Include="..\..\src\cmd\cmd-zapwand.h" />\r
     <ClInclude Include="..\..\src\cmd\feeling-table.h" />\r
+    <ClInclude Include="..\..\src\cmd\monster-group-table.h" />\r
     <ClInclude Include="..\..\src\combat\melee.h" />\r
     <ClInclude Include="..\..\src\combat\shoot.h" />\r
     <ClInclude Include="..\..\src\core\show-file.h" />\r
index a2c1e0a..b1c6efd 100644 (file)
     <ClCompile Include="..\..\src\cmd\feeling-table.c">
       <Filter>cmd</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\cmd\monster-group-table.c">
+      <Filter>cmd</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\gamevalue.h" />
     <ClInclude Include="..\..\src\cmd\feeling-table.h">
       <Filter>cmd</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\cmd\monster-group-table.h">
+      <Filter>cmd</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 3a77911..6b694c2 100644 (file)
@@ -132,6 +132,7 @@ hengband_SOURCES = \
        z-virt.c z-virt.h \
        \
        cmd/feeling-table.c cmd/feeling-table.h \
+       cmd/monster-group-table.c cmd/monster-group-table.h \
        cmd/cmd-activate.c cmd/cmd-activate.h cmd/cmd-basic.c cmd/cmd-basic.h \
        cmd/cmd-dump.c cmd/cmd-dump.h cmd/cmd-eat.c cmd/cmd-eat.h \
        cmd/cmd-gameoption.c cmd/cmd-gameoption.h cmd/cmd-help.c cmd/cmd-help.h \
index 5914981..9c07ede 100644 (file)
@@ -78,6 +78,7 @@
 #include "objectkind.h"
 #include "floor-town.h"
 #include "cmd/feeling-table.h"
+#include "cmd/monster-group-table.h"
 #include "view-mainwindow.h" // 暫定。後で消す
 
 #include "english.h"
@@ -299,6 +300,7 @@ concptr get_ordinal_number_suffix(int num)
 #define MAX_SUBTITLE (sizeof(subtitle)/sizeof(subtitle[0]))
 
 /*!
+ * todo テーブルを分離できないか?
  * @brief 日記のタイトル表記と内容出力 /
  * @return なし
  * @details
@@ -1785,208 +1787,6 @@ void do_cmd_feeling(player_type *creature_ptr)
 
 
 /*
- * Description of each monster group.
- */
-static concptr monster_group_text[] =
-{
-#ifdef JP
-       "ユニーク", /* "Uniques" */
-       "乗馬可能なモンスター",       /* "Riding" */
-       "賞金首", /* "Wanted */
-       "アンバーの王族", /* "Amberite" */
-       "アリ",
-       "コウモリ",
-       "ムカデ",
-       "ドラゴン",
-       "目玉",
-       "ネコ",
-       "ゴーレム",
-       "標準人間型生物",
-       "ベトベト",
-       "ゼリー",
-       "コボルド",
-       "水棲生物",
-       "モルド",
-       "ナーガ",
-       "オーク",
-       "人間",
-       "四足獣",
-       "ネズミ",
-       "スケルトン",
-       "デーモン",
-       "ボルテックス",
-       "イモムシ/大群",
-       /* "unused", */
-       "イーク",
-       "ゾンビ/ミイラ",
-       "天使",
-       "鳥",
-       "犬",
-       /* "古代ドラゴン/ワイアーム", */
-       "エレメンタル",
-       "トンボ",
-       "ゴースト",
-       "雑種",
-       "昆虫",
-       "ヘビ",
-       "キラー・ビートル",
-       "リッチ",
-       "多首の爬虫類",
-       "謎の生物",
-       "オーガ",
-       "巨大人間型生物",
-       "クイルスルグ",
-       "爬虫類/両生類",
-       "蜘蛛/サソリ/ダニ",
-       "トロル",
-       /* "上級デーモン", */
-       "バンパイア",
-       "ワイト/レイス/等",
-       "ゾーン/ザレン/等",
-       "イエティ",
-       "ハウンド",
-       "ミミック",
-       "壁/植物/気体",
-       "おばけキノコ",
-       "球体",
-       "プレイヤー",
-#else
-       "Uniques",
-       "Ridable monsters",
-       "Wanted monsters",
-       "Amberite",
-       "Ant",
-       "Bat",
-       "Centipede",
-       "Dragon",
-       "Floating Eye",
-       "Feline",
-       "Golem",
-       "Hobbit/Elf/Dwarf",
-       "Icky Thing",
-       "Jelly",
-       "Kobold",
-       "Aquatic monster",
-       "Mold",
-       "Naga",
-       "Orc",
-       "Person/Human",
-       "Quadruped",
-       "Rodent",
-       "Skeleton",
-       "Demon",
-       "Vortex",
-       "Worm/Worm-Mass",
-       /* "unused", */
-       "Yeek",
-       "Zombie/Mummy",
-       "Angel",
-       "Bird",
-       "Canine",
-       /* "Ancient Dragon/Wyrm", */
-       "Elemental",
-       "Dragon Fly",
-       "Ghost",
-       "Hybrid",
-       "Insect",
-       "Snake",
-       "Killer Beetle",
-       "Lich",
-       "Multi-Headed Reptile",
-       "Mystery Living",
-       "Ogre",
-       "Giant Humanoid",
-       "Quylthulg",
-       "Reptile/Amphibian",
-       "Spider/Scorpion/Tick",
-       "Troll",
-       /* "Major Demon", */
-       "Vampire",
-       "Wight/Wraith/etc",
-       "Xorn/Xaren/etc",
-       "Yeti",
-       "Zephyr Hound",
-       "Mimic",
-       "Wall/Plant/Gas",
-       "Mushroom patch",
-       "Ball",
-       "Player",
-#endif
-       NULL
-};
-
-
-/*
- * Symbols of monsters in each group. Note the "Uniques" group
- * is handled differently.
- */
-static concptr monster_group_char[] =
-{
-       (char *)-1L,
-       (char *)-2L,
-       (char *)-3L,
-       (char *)-4L,
-       "a",
-       "b",
-       "c",
-       "dD",
-       "e",
-       "f",
-       "g",
-       "h",
-       "i",
-       "j",
-       "k",
-       "l",
-       "m",
-       "n",
-       "o",
-       "pt",
-       "q",
-       "r",
-       "s",
-       "uU",
-       "v",
-       "w",
-       /* "x", */
-       "y",
-       "z",
-       "A",
-       "B",
-       "C",
-       /* "D", */
-       "E",
-       "F",
-       "G",
-       "H",
-       "I",
-       "J",
-       "K",
-       "L",
-       "M",
-       "N",
-       "O",
-       "P",
-       "Q",
-       "R",
-       "S",
-       "T",
-       /* "U", */
-       "V",
-       "W",
-       "X",
-       "Y",
-       "Z",
-       "!$&()+./=>?[\\]`{|~",
-       "#%",
-       ",",
-       "*",
-       "@",
-       NULL
-};
-
-
-/*
  * todo 引数と戻り値について追記求む
  * Build a list of monster indexes in the given group.
  *
diff --git a/src/cmd/monster-group-table.c b/src/cmd/monster-group-table.c
new file mode 100644 (file)
index 0000000..c40e157
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * @brief シンボルテキストの配列群
+ * @date 2020/03/08
+ * @author Hourier
+ */
+
+#include "angband.h"
+#include "cmd/monster-group-table.h"
+
+/*
+ * todo 元々t (町人)がいなかったが、問題ないのか?
+ * Description of each monster group.
+ */
+concptr monster_group_text[] =
+{
+#ifdef JP
+       "ユニーク",
+       "乗馬可能なモンスター",
+       "賞金首",
+       "アンバーの王族",
+       "アリ",
+       "コウモリ",
+       "ムカデ",
+       "ドラゴン",
+       "目玉",
+       "ネコ",
+       "ゴーレム",
+       "標準人間型生物",
+       "ベトベト",
+       "ゼリー",
+       "コボルド",
+       "水棲生物",
+       "モルド",
+       "ナーガ",
+       "オーク",
+       "人間",
+       "四足獣",
+       "ネズミ",
+       "スケルトン",
+       "デーモン",
+       "ボルテックス",
+       "イモムシ/大群",
+       "イーク",
+       "ゾンビ/ミイラ",
+       "天使",
+       "鳥",
+       "犬",
+       "エレメンタル",
+       "トンボ",
+       "ゴースト",
+       "雑種",
+       "昆虫",
+       "ヘビ",
+       "キラー・ビートル",
+       "リッチ",
+       "多首の爬虫類",
+       "謎の生物",
+       "オーガ",
+       "巨大人間型生物",
+       "クイルスルグ",
+       "爬虫類/両生類",
+       "蜘蛛/サソリ/ダニ",
+       "トロル",
+       "バンパイア",
+       "ワイト/レイス/等",
+       "ゾーン/ザレン/等",
+       "イエティ",
+       "ハウンド",
+       "ミミック",
+       "壁/植物/気体",
+       "おばけキノコ",
+       "球体",
+       "プレイヤー",
+#else
+       "Uniques",
+       "Ridable monsters",
+       "Wanted monsters",
+       "Amberite",
+       "Ant",
+       "Bat",
+       "Centipede",
+       "Dragon",
+       "Floating Eye",
+       "Feline",
+       "Golem",
+       "Hobbit/Elf/Dwarf",
+       "Icky Thing",
+       "Jelly",
+       "Kobold",
+       "Aquatic monster",
+       "Mold",
+       "Naga",
+       "Orc",
+       "Person/Human",
+       "Quadruped",
+       "Rodent",
+       "Skeleton",
+       "Demon",
+       "Vortex",
+       "Worm/Worm-Mass",
+       "Yeek",
+       "Zombie/Mummy",
+       "Angel",
+       "Bird",
+       "Canine",
+       "Elemental",
+       "Dragon Fly",
+       "Ghost",
+       "Hybrid",
+       "Insect",
+       "Snake",
+       "Killer Beetle",
+       "Lich",
+       "Multi-Headed Reptile",
+       "Mystery Living",
+       "Ogre",
+       "Giant Humanoid",
+       "Quylthulg",
+       "Reptile/Amphibian",
+       "Spider/Scorpion/Tick",
+       "Troll",
+       "Vampire",
+       "Wight/Wraith/etc",
+       "Xorn/Xaren/etc",
+       "Yeti",
+       "Zephyr Hound",
+       "Mimic",
+       "Wall/Plant/Gas",
+       "Mushroom patch",
+       "Ball",
+       "Player",
+#endif
+       NULL
+};
+
+
+/*
+ * Symbols of monsters in each group. Note the "Uniques" group
+ * is handled differently.
+ */
+concptr monster_group_char[] =
+{
+       (char *)-1L,
+       (char *)-2L,
+       (char *)-3L,
+       (char *)-4L,
+       "a",
+       "b",
+       "c",
+       "dD",
+       "e",
+       "f",
+       "g",
+       "h",
+       "i",
+       "j",
+       "k",
+       "l",
+       "m",
+       "n",
+       "o",
+       "pt",
+       "q",
+       "r",
+       "s",
+       "uU",
+       "v",
+       "w",
+       "y",
+       "z",
+       "A",
+       "B",
+       "C",
+       "E",
+       "F",
+       "G",
+       "H",
+       "I",
+       "J",
+       "K",
+       "L",
+       "M",
+       "N",
+       "O",
+       "P",
+       "Q",
+       "R",
+       "S",
+       "T",
+       "V",
+       "W",
+       "X",
+       "Y",
+       "Z",
+       "!$&()+./=>?[\\]`{|~",
+       "#%",
+       ",",
+       "*",
+       "@",
+       NULL
+};
diff --git a/src/cmd/monster-group-table.h b/src/cmd/monster-group-table.h
new file mode 100644 (file)
index 0000000..fd0fb47
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+
+extern concptr monster_group_text[];
+extern concptr monster_group_char[];