OSDN Git Service

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

index 8c52396..57a07e8 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-commands-table.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-editor-table.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-flags-table.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick-keys-table.h" />\r
index 383a09f..74316c6 100644 (file)
     <ClInclude Include="..\..\src\autopick\autopick-flags-table.h">
       <Filter>autopick</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\autopick\autopick-commands-table.h">
+      <Filter>autopick</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 818e94f..2f69906 100644 (file)
@@ -10,8 +10,8 @@ hengband_SOURCES = \
        angband.h\
        \
        autopick/autopick.c autopick/autopick.h \
-       autopick/autopick-editor-table.h autopick/autopick-flags-table.h \
-       autopick/autopick-key-table.h \
+       autopick/autopick-commands-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-commands-table.h b/src/autopick/autopick-commands-table.h
new file mode 100644 (file)
index 0000000..9f7fd16
--- /dev/null
@@ -0,0 +1,86 @@
+#pragma once
+
+/*
+ * Editor command id's
+ */
+#define EC_QUIT            1
+#define EC_SAVEQUIT        2
+#define EC_REVERT             3
+#define EC_HELP            4
+#define EC_RETURN             5
+#define EC_LEFT                       6 
+#define EC_DOWN                       7 
+#define EC_UP                 8 
+#define EC_RIGHT              9 
+#define EC_BOL                10
+#define EC_EOL                11
+#define EC_PGUP                       12
+#define EC_PGDOWN             13
+#define EC_TOP                14
+#define EC_BOTTOM             15
+#define EC_CUT                16
+#define EC_COPY                       17
+#define EC_PASTE              18
+#define EC_BLOCK              19
+#define EC_KILL_LINE          20
+#define EC_DELETE_CHAR        21
+#define EC_BACKSPACE          22
+#define EC_SEARCH_STR         23
+#define EC_SEARCH_FORW         24
+#define EC_SEARCH_BACK         25
+#define EC_SEARCH_OBJ         26
+#define EC_SEARCH_DESTROYED    27
+#define EC_INSERT_OBJECT       28
+#define EC_INSERT_DESTROYED    29
+#define EC_INSERT_BLOCK               30
+#define EC_INSERT_MACRO               31
+#define EC_INSERT_KEYMAP       32
+#define EC_CL_AUTOPICK        33
+#define EC_CL_DESTROY         34
+#define EC_CL_LEAVE           35
+#define EC_CL_QUERY           36
+#define EC_CL_NO_DISP         37
+#define EC_OK_COLLECTING       38
+#define EC_IK_UNAWARE         39
+#define EC_IK_UNIDENTIFIED     40
+#define EC_IK_IDENTIFIED       41
+#define EC_IK_STAR_IDENTIFIED  42
+#define EC_OK_BOOSTED         43
+#define EC_OK_MORE_DICE               44
+#define EC_OK_MORE_BONUS       45
+#define EC_OK_WORTHLESS               46
+#define EC_OK_ARTIFACT        47
+#define EC_OK_EGO             48
+#define EC_OK_GOOD            49
+#define EC_OK_NAMELESS        50
+#define EC_OK_AVERAGE         51
+#define EC_OK_RARE            52       
+#define EC_OK_COMMON          53
+#define EC_OK_WANTED          54
+#define EC_OK_UNIQUE          55
+#define EC_OK_HUMAN           56
+#define EC_OK_UNREADABLE       57
+#define EC_OK_REALM1          58
+#define EC_OK_REALM2          59
+#define EC_OK_FIRST           60
+#define EC_OK_SECOND          61
+#define EC_OK_THIRD           62
+#define EC_OK_FOURTH          63
+#define EC_KK_WEAPONS         64
+#define EC_KK_FAVORITE_WEAPONS 65
+#define EC_KK_ARMORS          66
+#define EC_KK_MISSILES        67
+#define EC_KK_DEVICES         68
+#define EC_KK_LIGHTS          69
+#define EC_KK_JUNKS           70
+#define EC_KK_CORPSES         71
+#define EC_KK_SPELLBOOKS       72
+#define EC_KK_SHIELDS         73
+#define EC_KK_BOWS            74
+#define EC_KK_RINGS           75
+#define EC_KK_AMULETS         76
+#define EC_KK_SUITS           77
+#define EC_KK_CLOAKS          78
+#define EC_KK_HELMS           79
+#define EC_KK_GLOVES          80
+#define EC_KK_BOOTS           81
index 65f1d7c..3bfa4b8 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick/autopick-commands-table.h"
 #include "autopick/autopick-editor-table.h"
 #include "autopick/autopick-flags-table.h"
 #include "autopick/autopick-keys-table.h"
@@ -153,91 +154,6 @@ typedef struct {
        bool changed;
 } text_body_type;
 
-/*
- * Editor command id's
- */
-#define EC_QUIT            1
-#define EC_SAVEQUIT        2
-#define EC_REVERT             3
-#define EC_HELP            4
-#define EC_RETURN             5
-#define EC_LEFT                       6 
-#define EC_DOWN                       7 
-#define EC_UP                 8 
-#define EC_RIGHT              9 
-#define EC_BOL                10
-#define EC_EOL                11
-#define EC_PGUP                       12
-#define EC_PGDOWN             13
-#define EC_TOP                14
-#define EC_BOTTOM             15
-#define EC_CUT                16
-#define EC_COPY                       17
-#define EC_PASTE              18
-#define EC_BLOCK              19
-#define EC_KILL_LINE          20
-#define EC_DELETE_CHAR        21
-#define EC_BACKSPACE          22
-#define EC_SEARCH_STR         23
-#define EC_SEARCH_FORW         24
-#define EC_SEARCH_BACK         25
-#define EC_SEARCH_OBJ         26
-#define EC_SEARCH_DESTROYED    27
-#define EC_INSERT_OBJECT       28
-#define EC_INSERT_DESTROYED    29
-#define EC_INSERT_BLOCK               30
-#define EC_INSERT_MACRO               31
-#define EC_INSERT_KEYMAP       32
-#define EC_CL_AUTOPICK        33
-#define EC_CL_DESTROY         34
-#define EC_CL_LEAVE           35
-#define EC_CL_QUERY           36
-#define EC_CL_NO_DISP         37
-#define EC_OK_COLLECTING       38
-#define EC_IK_UNAWARE         39
-#define EC_IK_UNIDENTIFIED     40
-#define EC_IK_IDENTIFIED       41
-#define EC_IK_STAR_IDENTIFIED  42
-#define EC_OK_BOOSTED         43
-#define EC_OK_MORE_DICE               44
-#define EC_OK_MORE_BONUS       45
-#define EC_OK_WORTHLESS               46
-#define EC_OK_ARTIFACT        47
-#define EC_OK_EGO             48
-#define EC_OK_GOOD            49
-#define EC_OK_NAMELESS        50
-#define EC_OK_AVERAGE         51
-#define EC_OK_RARE            52       
-#define EC_OK_COMMON          53
-#define EC_OK_WANTED          54
-#define EC_OK_UNIQUE          55
-#define EC_OK_HUMAN           56
-#define EC_OK_UNREADABLE       57
-#define EC_OK_REALM1          58
-#define EC_OK_REALM2          59
-#define EC_OK_FIRST           60
-#define EC_OK_SECOND          61
-#define EC_OK_THIRD           62
-#define EC_OK_FOURTH          63
-#define EC_KK_WEAPONS         64
-#define EC_KK_FAVORITE_WEAPONS 65
-#define EC_KK_ARMORS          66
-#define EC_KK_MISSILES        67
-#define EC_KK_DEVICES         68
-#define EC_KK_LIGHTS          69
-#define EC_KK_JUNKS           70
-#define EC_KK_CORPSES         71
-#define EC_KK_SPELLBOOKS       72
-#define EC_KK_SHIELDS         73
-#define EC_KK_BOWS            74
-#define EC_KK_RINGS           75
-#define EC_KK_AMULETS         76
-#define EC_KK_SUITS           77
-#define EC_KK_CLOAKS          78
-#define EC_KK_HELMS           79
-#define EC_KK_GLOVES          80
-#define EC_KK_BOOTS           81
-
 typedef struct {
        concptr name;
        int level;