OSDN Git Service

[Refactor] #39964 Separated autopick-flags-table.h from autopick.c
authorHourier <hourier@users.sourceforge.jp>
Fri, 24 Apr 2020 14:35:56 +0000 (23:35 +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-flags-table.h [new file with mode: 0644]
src/autopick/autopick.c

index 1065b23..8c52396 100644 (file)
     <ClCompile Include="..\..\src\realm-sorcery.c" />\r
     <ClInclude Include="..\..\src\artifact.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-editor-table.h" />\r
-    <ClInclude Include="..\..\src\autopick\autopick-key-table.h" />\r
+    <ClInclude Include="..\..\src\autopick\autopick-flags-table.h" />\r
+    <ClInclude Include="..\..\src\autopick\autopick-keys-table.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick.h" />\r
     <ClInclude Include="..\..\src\avatar.h" />\r
     <ClInclude Include="..\..\src\birth.h" />\r
index 540a568..383a09f 100644 (file)
     <ClInclude Include="..\..\src\autopick\autopick.h">
       <Filter>autopick</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\autopick\autopick-key-table.h">
+    <ClInclude Include="..\..\src\autopick\autopick-editor-table.h">
       <Filter>autopick</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\autopick\autopick-editor-table.h">
+    <ClInclude Include="..\..\src\autopick\autopick-keys-table.h">
+      <Filter>autopick</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\autopick\autopick-flags-table.h">
       <Filter>autopick</Filter>
     </ClInclude>
   </ItemGroup>
index 4004843..818e94f 100644 (file)
@@ -10,7 +10,8 @@ hengband_SOURCES = \
        angband.h\
        \
        autopick/autopick.c autopick/autopick.h \
-       autopick/autopick-key-table.h autopick/autopick-editor-table.h \
+       autopick/autopick-editor-table.h autopick/autopick-flags-table.h \
+       autopick/autopick-key-table.h \
        \
        avatar.h avatar.c birth.c birth.h \
        \
diff --git a/src/autopick/autopick-flags-table.h b/src/autopick/autopick-flags-table.h
new file mode 100644 (file)
index 0000000..1e710af
--- /dev/null
@@ -0,0 +1,56 @@
+#pragma once
+
+/*
+ * 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 26c4ede..65f1d7c 100644 (file)
@@ -13,8 +13,9 @@
 
 #include "angband.h"
 #include "util.h"
-#include "autopick/autopick-keys-table.h"
 #include "autopick/autopick-editor-table.h"
+#include "autopick/autopick-flags-table.h"
+#include "autopick/autopick-keys-table.h"
 #include "gameterm.h"
 #include "autopick/autopick.h"
 #include "core.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
-
 #define MAX_AUTOPICK_DEFAULT 200
 
 #define PT_DEFAULT 0