OSDN Git Service

[Refactor] #37353 autopick.h を作成して関連構造体と変数を移動.
authordeskull <deskull@users.sourceforge.jp>
Wed, 1 May 2019 05:11:01 +0000 (14:11 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 1 May 2019 05:11:01 +0000 (14:11 +0900)
25 files changed:
Hengband_vcs2017/Hengband/Hengband.vcxproj
Hengband_vcs2017/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/autopick.c
src/autopick.h [new file with mode: 0644]
src/birth.c
src/bldg.c
src/cmd-item.c
src/cmd-smith.c
src/cmd-spell.c
src/cmd4.c
src/core.c
src/externs.h
src/files.c
src/player-effects.c
src/player-move.c
src/player-status.c
src/spells-object.c
src/spells1.c
src/spells2.c
src/spells3.c
src/store.c
src/types.h
src/variable.c
src/view-mainwindow.c

index 965ff78..2232e4c 100644 (file)
     <ClCompile Include="..\..\src\cmd-zaprod.c" />\r
     <ClCompile Include="..\..\src\cmd-zapwand.c" />\r
     <ClInclude Include="..\..\src\artifact.h" />\r
+    <ClInclude Include="..\..\src\autopick.h" />\r
     <ClInclude Include="..\..\src\avatar.h" />\r
     <ClInclude Include="..\..\src\birth.h" />\r
     <ClInclude Include="..\..\src\bldg.h" />\r
index c6d6042..97bc3a3 100644 (file)
     <ClInclude Include="..\..\src\monsterrace.h">
       <Filter>monster</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\autopick.h">
+      <Filter>object</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="..\..\src\angband.rc" />
index ad60938..53598bc 100644 (file)
@@ -7,7 +7,7 @@ bin_PROGRAMS = hengband
 hengband_SOURCES = \
        artifact.c artifact.h \
        \
-       angband.h autopick.c \
+       angband.h autopick.c autopick.h\
        \
        avatar.h avatar.c birth.c birth.h \
        \
index a77f1e9..bf7a4f1 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick.h"
 
 #include "mind.h"
 
@@ -216,6 +217,13 @@ static GAME_TEXT KEY_BOOTS[] = "boots";
 
 
 /*
+ * 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
+ */
+int max_autopick = 0; /*!< 現在登録している自動拾い/破壊設定の数 */
+int max_max_autopick = 0; /*!< 自動拾い/破壊設定の限界数 */
+autopick_type *autopick_list = NULL; /*!< 自動拾い/破壊設定構造体のポインタ配列 */
+
+/*
  * A function to create new entry
  */
 static bool autopick_new_entry(autopick_type *entry, concptr str, bool allow_default)
diff --git a/src/autopick.h b/src/autopick.h
new file mode 100644 (file)
index 0000000..e7893c3
--- /dev/null
@@ -0,0 +1,32 @@
+#pragma once
+
+/*!
+ * @struct autopick_type
+ * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
+ */
+typedef struct {
+       concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
+       concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
+       BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
+       byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
+       byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
+       byte bonus;         /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
+} autopick_type;
+
+/*
+ *  List for auto-picker/destroyer entries
+ */
+extern int max_autopick;
+extern int max_max_autopick;
+extern autopick_type *autopick_list;
+
+/* autopick.c */
+extern void autopick_load_pref(bool disp_mes);
+extern errr process_autopick_file_command(char *buf);
+extern concptr autopick_line_from_entry(autopick_type *entry);
+extern int is_autopick(object_type *o_ptr);
+extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
+extern void autopick_delayed_alter(void);
+extern void autopick_pickup_items(grid_type *g_ptr);
+extern bool autopick_autoregister(object_type *o_ptr);
+extern void do_cmd_edit_autopick(void);
index a56742c..bef4cdb 100644 (file)
@@ -36,6 +36,7 @@
 #include "world.h"
 #include "objectkind.h"
 #include "monsterrace.h"
+#include "autopick.h"
 
 /*!
  * オートローラーの内容を描画する間隔 / 
index 84983ef..ae498f2 100644 (file)
@@ -18,6 +18,7 @@
 #include "floor.h"
 #include "floor-events.h"
 #include "floor-save.h"
+#include "autopick.h"
 #include "objectkind.h"
 #include "object-boost.h"
 #include "object-flavor.h"
@@ -49,6 +50,7 @@
 #include "shoot.h"
 #include "view-mainwindow.h"
 #include "monsterrace.h"
+#include "autopick.h"
 
 
 /*
index cd61a5a..bbe6557 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick.h"
 
 #include "selfinfo.h"
 #include "cmd-activate.h"
@@ -37,6 +38,7 @@
 #include "view-mainwindow.h"
 #include "spells.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 /*!
index d7b10b2..4d6c532 100644 (file)
@@ -6,6 +6,7 @@
 #include "player-status.h"
 #include "cmd-basic.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 
index f425480..e614373 100644 (file)
@@ -35,6 +35,7 @@
 #include "cmd-basic.h"
 #include "view-mainwindow.h"
 #include "floor.h"
+#include "autopick.h"
 
 /*!
  * @brief
index d2af9a0..0668336 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick.h"
 
 #include "birth.h"
 #include "cmd-pet.h"
index 1d697a6..614bc1a 100644 (file)
@@ -69,6 +69,7 @@
 #include "files.h"
 #include "player-effects.h"
 #include "scores.h"
+#include "autopick.h"
 
 static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
 static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
index 0c0b1be..a20dabc 100644 (file)
@@ -32,12 +32,6 @@ extern concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];
 
 extern int level_up;
 
-/* 
- *  List for auto-picker/destroyer entries
- */
-extern int max_autopick;
-extern int max_max_autopick;
-extern autopick_type *autopick_list;
 
 /* tables.c */
 extern const POSITION ddd[9];
@@ -305,17 +299,6 @@ extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
 extern COMMAND_CODE now_message;
 extern bool use_menu;
 
-/* autopick.c */
-extern void autopick_load_pref(bool disp_mes);
-extern errr process_autopick_file_command(char *buf);
-extern concptr autopick_line_from_entry(autopick_type *entry);
-extern int is_autopick(object_type *o_ptr);
-extern void autopick_alter_item(INVENTORY_IDX item, bool destroy);
-extern void autopick_delayed_alter(void);
-extern void autopick_pickup_items(grid_type *g_ptr);
-extern bool autopick_autoregister(object_type *o_ptr);
-extern void do_cmd_edit_autopick(void);
-
 
 /* grids.c */
 extern void update_local_illumination(POSITION y, POSITION x);
index a0849fe..cc49954 100644 (file)
@@ -52,6 +52,7 @@
 #include "dungeon.h"
 #include "melee.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 /*
index adb263e..6b33a38 100644 (file)
@@ -39,6 +39,7 @@
 #include "monster-spell.h"
 #include "world.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 /*!
  * @brief プレイヤーの継続行動を設定する。
index 1284665..2828e2e 100644 (file)
 #include "angband.h"
 #include "util.h"
 
+#include "autopick.h"
 #include "dungeon.h"
 #include "floor.h"
 #include "melee.h"
 #include "view-mainwindow.h"
 #include "world.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 #ifdef TRAVEL
index 1651955..56fc2fe 100644 (file)
@@ -26,6 +26,7 @@
 #include "player-class.h"
 #include "objectkind.h"
 #include "monsterrace.h"
+#include "autopick.h"
 
 /*!
  * @var horror_desc
index f2f09da..fceea7b 100644 (file)
@@ -15,6 +15,7 @@
 #include "player-effects.h"
 #include "player-class.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 typedef struct
index db3bb11..e4f2d6a 100644 (file)
@@ -17,6 +17,7 @@
 #include "cmd-pet.h"
 #include "floor.h"
 #include "trap.h"
+#include "autopick.h"
 #include "object-curse.h"
 #include "player-damage.h"
 #include "player-effects.h"
index 6835210..395f86e 100644 (file)
@@ -31,6 +31,7 @@
 #include "spells-status.h"
 #include "spells-floor.h"
 #include "realm-hex.h"
+#include "autopick.h"
 #include "object-flavor.h"
 #include "object-hook.h"
 #include "monster-status.h"
index ee7b648..ad86f00 100644 (file)
@@ -45,6 +45,7 @@
 #include "wild.h"
 #include "world.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
index 3e18386..57bb559 100644 (file)
@@ -33,6 +33,7 @@
 #include "mind.h"
 #include "world.h"
 #include "objectkind.h"
+#include "autopick.h"
 
 #define MIN_STOCK 12
 
index 59ae8ee..cab26ba 100644 (file)
@@ -392,20 +392,6 @@ typedef struct
 }
 feat_prob;
 
-
-/*!
- * @struct autopick_type
- * @brief 自動拾い/破壊設定データの構造体 / A structure type for entry of auto-picker/destroyer
- */
-typedef struct {
-       concptr name;          /*!< 自動拾い/破壊定義の名称一致基準 / Items which have 'name' as part of its name match */
-       concptr insc;          /*!< 対象となったアイテムに自動で刻む内容 / Items will be auto-inscribed as 'insc' */
-       BIT_FLAGS flag[2];       /*!< キーワードに関する汎用的な条件フラグ / Misc. keyword to be matched */
-       byte action;        /*!< 対象のアイテムを拾う/破壊/放置するかの指定フラグ / Auto-pickup or Destroy or Leave items */
-       byte dice;          /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
-       byte bonus;         /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
-} autopick_type;
-
 typedef struct {
        int flag;
        int type;
index f3c8e17..06d1ad0 100644 (file)
@@ -36,13 +36,6 @@ concptr macro_trigger_keycode[2][MAX_MACRO_TRIG];  /*!< マクロの内容 */
 int level_up = 0; /*!< レベルアップの際に遅延してcalc_mana()関数上で上昇量を表示するかどうかの判定フラグ */
 
 
-/* 
- * 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
- */
-int max_autopick = 0; /*!< 現在登録している自動拾い/破壊設定の数 */
-int max_max_autopick = 0; /*!< 自動拾い/破壊設定の限界数 */
-autopick_type *autopick_list = NULL; /*!< 自動拾い/破壊設定構造体のポインタ配列 */
-
 /*
  * Savefile version
  */
index cab40e6..8891074 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "angband.h"
 #include "util.h"
+#include "autopick.h"
 
 #include "files.h"
 #include "world.h"