OSDN Git Service

[Refactor] #39964 Separated definitions from autopick.c to autopick-key-table.h
authorHourier <hourier@users.sourceforge.jp>
Fri, 24 Apr 2020 13:46:32 +0000 (22:46 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 24 Apr 2020 15:44:58 +0000 (00:44 +0900)
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/autopick/autopick-key-table.h [new file with mode: 0644]
src/autopick/autopick.c

index 4ed6264..ee898ca 100644 (file)
     <ClCompile Include="..\..\src\realm-song.c" />\r
     <ClCompile Include="..\..\src\realm-sorcery.c" />\r
     <ClInclude Include="..\..\src\artifact.h" />\r
+    <ClInclude Include="..\..\src\autopick\autopick-key-table.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick.h" />\r
     <ClInclude Include="..\..\src\avatar.h" />\r
     <ClInclude Include="..\..\src\birth.h" />\r
index 6a4824f..241eaa3 100644 (file)
     <ClInclude Include="..\..\src\autopick\autopick.h">
       <Filter>autopick</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\autopick\autopick-key-table.h">
+      <Filter>autopick</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 49fbd0b..40ffce0 100644 (file)
@@ -10,6 +10,7 @@ hengband_SOURCES = \
        angband.h\
        \
        autopick/autopick.c autopick/autopick.h \
+       autopick/autopick-util.c autopick/autopick-util.h \
        \
        avatar.h avatar.c birth.c birth.h \
        \
diff --git a/src/autopick/autopick-key-table.h b/src/autopick/autopick-key-table.h
new file mode 100644 (file)
index 0000000..1fb18bb
--- /dev/null
@@ -0,0 +1,58 @@
+#pragma once
+
+#define MAX_LINELEN 1024
+
+/*
+ * Macros for Keywords
+ */
+#define FLG_ALL                                        0
+#define FLG_UNAWARE                            1
+#define FLG_UNIDENTIFIED               2
+#define FLG_IDENTIFIED                 3
+#define FLG_STAR_IDENTIFIED            4
+#define FLG_COLLECTING                 5
+#define FLG_ARTIFACT                   6
+#define FLG_EGO                                        7
+#define FLG_GOOD                               10
+#define FLG_NAMELESS                   11
+#define FLG_AVERAGE                            12
+#define FLG_WORTHLESS                  13
+#define FLG_RARE                               14
+#define FLG_COMMON                             15
+#define FLG_BOOSTED                            16
+#define FLG_MORE_DICE                  17
+#define FLG_MORE_BONUS                 18
+#define FLG_WANTED                             19
+#define FLG_UNIQUE                             20
+#define FLG_HUMAN                              21
+#define FLG_UNREADABLE                 22
+#define FLG_REALM1                             23
+#define FLG_REALM2                             24
+#define FLG_FIRST                              25
+#define FLG_SECOND                             26
+#define FLG_THIRD                              27
+#define FLG_FOURTH                             28
+
+#define FLG_ITEMS                              30
+#define FLG_WEAPONS                            31
+#define FLG_FAVORITE_WEAPONS   32
+#define FLG_ARMORS                             33
+#define FLG_MISSILES                   34
+#define FLG_DEVICES                            35
+#define FLG_LIGHTS                             36
+#define FLG_JUNKS                              37
+#define FLG_CORPSES                            38
+#define FLG_SPELLBOOKS                 39
+#define FLG_HAFTED                             40
+#define FLG_SHIELDS                            41
+#define FLG_BOWS                               42
+#define FLG_RINGS                              43
+#define FLG_AMULETS                            44
+#define FLG_SUITS                              45
+#define FLG_CLOAKS                             46
+#define FLG_HELMS                              47
+#define FLG_GLOVES                             48
+#define FLG_BOOTS                              49
+
+#define FLG_NOUN_BEGIN FLG_ITEMS
+#define FLG_NOUN_END   FLG_BOOTS
index dcf8625..ccaae83 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick/autopick-key-table.h"
 #include "gameterm.h"
 #include "autopick/autopick.h"
 #include "core.h"
 #include "monsterrace.h"
 #include "view-mainwindow.h" // 暫定。後で消す
 
-#define MAX_LINELEN 1024
-
- /*
-  * Macros for Keywords
-  */
-#define FLG_ALL                                0
-#define FLG_UNAWARE                    1
-#define FLG_UNIDENTIFIED       2
-#define FLG_IDENTIFIED         3
-#define FLG_STAR_IDENTIFIED    4
-#define FLG_COLLECTING         5
-#define FLG_ARTIFACT           6
-#define FLG_EGO                     7 
-#define FLG_GOOD            10
-#define FLG_NAMELESS    11
-#define FLG_AVERAGE         12
-#define FLG_WORTHLESS   13
-#define FLG_RARE            14
-#define FLG_COMMON          15
-#define FLG_BOOSTED         16
-#define FLG_MORE_DICE   17
-#define FLG_MORE_BONUS  18
-#define FLG_WANTED          19
-#define FLG_UNIQUE          20
-#define FLG_HUMAN           21
-#define FLG_UNREADABLE  22
-#define FLG_REALM1          23
-#define FLG_REALM2          24
-#define FLG_FIRST           25
-#define FLG_SECOND          26
-#define FLG_THIRD           27
-#define FLG_FOURTH          28
-
-#define FLG_ITEMS           30
-#define FLG_WEAPONS         31
-#define FLG_FAVORITE_WEAPONS 32
-#define FLG_ARMORS          33
-#define FLG_MISSILES        34
-#define FLG_DEVICES         35
-#define FLG_LIGHTS          36
-#define FLG_JUNKS           37
-#define FLG_CORPSES         38
-#define FLG_SPELLBOOKS      39
-#define FLG_HAFTED          40
-#define FLG_SHIELDS         41
-#define FLG_BOWS            42
-#define FLG_RINGS           43
-#define FLG_AMULETS         44
-#define FLG_SUITS           45
-#define FLG_CLOAKS          46
-#define FLG_HELMS           47
-#define FLG_GLOVES          48
-#define FLG_BOOTS            49
-
-#define FLG_NOUN_BEGIN      FLG_ITEMS
-#define FLG_NOUN_END        FLG_BOOTS
-
 static GAME_TEXT KEY_ALL[] = _("すべての", "all");
 static GAME_TEXT KEY_UNAWARE[] = _("未判明の", "unaware");
 static GAME_TEXT KEY_UNIDENTIFIED[] = _("未鑑定の", "unidentified");