OSDN Git Service

[Refactor] #40399 Separated item-use-flags.h from object.h
authorHourier <hourier@users.sourceforge.jp>
Thu, 28 May 2020 10:43:09 +0000 (19:43 +0900)
committerHourier <hourier@users.sourceforge.jp>
Thu, 28 May 2020 10:43:09 +0000 (19:43 +0900)
33 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/autopick/autopick-entry.c
src/autopick/autopick-finder.c
src/cmd/cmd-activate.c
src/cmd/cmd-attack.c
src/cmd/cmd-basic.c
src/cmd/cmd-eat.c
src/cmd/cmd-hissatsu.c
src/cmd/cmd-item.c
src/cmd/cmd-quaff.c
src/cmd/cmd-read.c
src/cmd/cmd-smith.c
src/cmd/cmd-spell.c
src/cmd/cmd-usestaff.c
src/cmd/cmd-zaprod.c
src/cmd/cmd-zapwand.c
src/inventory/player-inventory.c
src/market/building-craft-fix.c
src/market/building-craft-weapon.c
src/market/building-enchanter.c
src/market/building-recharger.c
src/object/item-use-flags.h [new file with mode: 0644]
src/object/object1.h
src/player/process-death.c
src/realm/realm-hex.c
src/spell/spells-object.c
src/spell/spells-summon.c
src/spell/spells2.c
src/spell/spells3.c
src/store/store.c
src/wizard/wizard-special-process.c

index 7c0a89c..85d7237 100644 (file)
     <ClInclude Include="..\..\src\autopick\autopick-util.h" />\r
     <ClInclude Include="..\..\src\autopick\autopick.h" />\r
     <ClInclude Include="..\..\src\object\death-scythe.h" />\r
+    <ClInclude Include="..\..\src\object\item-use-flags.h" />\r
     <ClInclude Include="..\..\src\object\object-mark-types.h" />\r
     <ClInclude Include="..\..\src\object\object-util.h" />\r
     <ClInclude Include="..\..\src\object\old-ego-extra-values.h" />\r
index 7877af0..53d966d 100644 (file)
     <ClInclude Include="..\..\src\object\object1.h">
       <Filter>object</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\object\item-use-flags.h">
+      <Filter>object</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index ccd4833..30f0157 100644 (file)
@@ -207,6 +207,7 @@ hengband_SOURCES = \
        object/tr-types.h object/trc-types.h object/tval-type.h \
        object/old-ego-extra-values.h object/special-object-flags.h \
        object/object-mark-types.h object/object-util.h \
+       object/item-use-flags.h \
        \
        inventory/simple-appraiser.c inventory/simple-appraiser.h \
        inventory/inventory-curse.c inventory/inventory-curse.h \
index e472e11..56ef927 100644 (file)
@@ -5,6 +5,7 @@
 #include "autopick/autopick-keys-table.h"
 #include "autopick/autopick-methods-table.h"
 #include "autopick/autopick-key-flag-process.h"
+#include "object/item-use-flags.h"
 #include "object/object-ego.h"
 #include "object/object-kind.h"
 #include "object/object-flavor.h"
index 1a0f7cc..d6600f9 100644 (file)
@@ -10,6 +10,7 @@
 #include "autopick/autopick-dirty-flags.h"
 #include "autopick/autopick-entry.h"
 #include "autopick/autopick-matcher.h"
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "term/gameterm.h"
 #include "inventory/player-inventory.h"
index 9a81436..c409d65 100644 (file)
@@ -15,6 +15,7 @@
 #include "object/object-hook.h"
 #include "core/sort.h"
 #include "object/artifact.h"
+#include "object/item-use-flags.h"
 #include "player/avatar.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-status.h"
index 7c5dfdd..a5a5459 100644 (file)
@@ -13,6 +13,7 @@
 #include "main/sound-definitions-table.h"
 #include "monster/monster-status.h"
 #include "object/artifact.h"
+#include "object/item-use-flags.h"
 #include "player/avatar.h"
 #include "player/player-damage.h"
 #include "player/player-effects.h"
index 3818973..c6f21e6 100644 (file)
@@ -39,6 +39,7 @@
 #include "player/player-effects.h"
 #include "player/player-personalities-table.h"
 #include "inventory/player-inventory.h"
+#include "object/item-use-flags.h"
 #include "object/object-kind.h"
 #include "object/object-broken.h"
 #include "object/object-flavor.h"
index 651f721..f1ab34a 100644 (file)
@@ -23,6 +23,7 @@
 #include "player/player-class.h"
 #include "inventory/player-inventory.h"
 #include "floor/floor.h"
+#include "object/item-use-flags.h"
 #include "object/object-kind.h"
 #include "object/special-object-flags.h"
 #include "view/display-main-window.h"
index 50a8ae0..67eff6d 100644 (file)
@@ -20,6 +20,7 @@
 #include "player/player-effects.h"
 #include "inventory/player-inventory.h"
 #include "spell/technic-info-table.h"
+#include "object/item-use-flags.h"
 
 #include "cmd-basic.h"
 #include "cmd-spell.h"
index a50be29..4506d01 100644 (file)
@@ -27,6 +27,7 @@
 #include "cmd-pet.h"
 #include "cmd-basic.h"
 
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "object/object-ego.h"
index dff46f3..4afc0f7 100644 (file)
@@ -23,6 +23,7 @@
 #include "inventory/player-inventory.h"
 #include "realm/realm-hex.h"
 #include "spell/spells-floor.h"
+#include "object/item-use-flags.h"
 #include "object/object-broken.h"
 #include "cmd-basic.h"
 #include "floor/floor.h"
index 8094e04..2cdc500 100644 (file)
@@ -10,6 +10,7 @@
 #include "util/util.h"
 #include "main/sound-definitions-table.h"
 
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "object/artifact.h"
index ec58491..3d3c75e 100644 (file)
@@ -2,6 +2,7 @@
 #include "util/util.h"
 #include "term/gameterm.h"
 
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "object/object-ego.h"
index 21f3eff..ac18b11 100644 (file)
@@ -36,6 +36,7 @@
 #include "locale/japanese.h"
 #include "spell/spells-util.h"
 #include "spell/spells-execution.h"
+#include "object/item-use-flags.h"
 
  /*!
   * 魔法領域フラグ管理テーブル /
index 7946ca0..a244190 100644 (file)
@@ -15,6 +15,7 @@
 #include "object/object-hook.h"
 #include "cmd-basic.h"
 #include "floor/floor.h"
+#include "object/item-use-flags.h"
 #include "object/object-kind.h"
 #include "object/special-object-flags.h"
 #include "view/display-main-window.h"
index a4fde81..a53c998 100644 (file)
@@ -7,6 +7,7 @@
 #include "player/player-effects.h"
 #include "player/player-class.h"
 #include "inventory/player-inventory.h"
+#include "object/item-use-flags.h"
 #include "object/object-kind.h"
 #include "object/object-hook.h"
 #include "object/special-object-flags.h"
index db75329..2db1fa6 100644 (file)
@@ -9,6 +9,7 @@
 #include "player/player-effects.h"
 #include "player/player-class.h"
 #include "inventory/player-inventory.h"
+#include "object/item-use-flags.h"
 #include "object/object-kind.h"
 #include "object/object-hook.h"
 #include "object/special-object-flags.h"
index bfdd851..a4ac669 100644 (file)
@@ -4,6 +4,7 @@
 #include "inventory/player-inventory.h"
 
 #include "term/gameterm.h"
+#include "object/item-use-flags.h"
 #include "object/object1.h"
 #include "object/object-kind.h"
 #include "object/object-flavor.h"
index 971bd11..065802b 100644 (file)
@@ -11,6 +11,7 @@
 #include "player/player-effects.h"
 #include "core/stuff-handler.h"
 #include "object/tr-types.h"
+#include "object/item-use-flags.h"
 
 /*!
  * @brief 修復材料のオブジェクトから修復対象に特性を移植する。
index f776fe5..45cde92 100644 (file)
@@ -12,6 +12,7 @@
 #include "market/building-util.h"
 #include "core/stuff-handler.h"
 #include "object/tr-types.h"
+#include "object/item-use-flags.h"
 
 /*!
  * @brief 攻撃時スレイによるダメージ期待値修正計算 / critical happens at i / 10000
index b392a0a..7f14a45 100644 (file)
@@ -1,5 +1,6 @@
 #include "system/angband.h"
 #include "market/building-enchanter.h"
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "spell/spells-object.h"
 #include "market/building-util.h"
index 1720365..5db26b1 100644 (file)
@@ -1,5 +1,6 @@
 #include "system/angband.h"
 #include "market/building-recharger.h"
+#include "object/item-use-flags.h"
 #include "object/object-hook.h"
 #include "object/object-kind.h"
 #include "object/object-flavor.h"
diff --git a/src/object/item-use-flags.h b/src/object/item-use-flags.h
new file mode 100644 (file)
index 0000000..ed2e7f3
--- /dev/null
@@ -0,0 +1,13 @@
+#pragma once
+
+/*
+ * get_item()関数でアイテムの選択を行うフラグ / Bit flags for the "get_item" function
+ */
+typedef enum item_use_flag {
+    USE_EQUIP = 0x01, /*!< アイテム表示/選択範囲: 装備品からの選択を許可する / Allow equip items */
+    USE_INVEN = 0x02, /*!< アイテム表示/選択範囲: 所持品からの選択を許可する /  Allow inven items */
+    USE_FLOOR = 0x04, /*!< アイテム表示/選択範囲: 床下のアイテムからの選択を許可する /  Allow floor items */
+    USE_FORCE = 0x08, /*!< 特殊: wキーで錬気術への切り替えを許可する */
+    IGNORE_BOTHHAND_SLOT = 0x10, /*!< アイテム表示/選択範囲: 両手持ちスロットを選択に含めない */
+    USE_FULL = 0x20, /*!< アイテム表示/選択範囲: 空欄まですべて表示する*/
+} item_use_flag;
index 811daee..d3652a4 100644 (file)
@@ -50,16 +50,6 @@ extern s16b wield_slot(player_type *owner_ptr, object_type *o_ptr);
 
 extern bool check_book_realm(player_type *owner_ptr, const tval_type book_tval, const OBJECT_SUBTYPE_VALUE book_sval);
 
-/*
- * get_item()関数でアイテムの選択を行うフラグ / Bit flags for the "get_item" function
- */
-#define USE_EQUIP 0x01 /*!< アイテム表示/選択範囲: 装備品からの選択を許可する / Allow equip items */
-#define USE_INVEN 0x02 /*!< アイテム表示/選択範囲: 所持品からの選択を許可する /  Allow inven items */
-#define USE_FLOOR 0x04 /*!< アイテム表示/選択範囲: 床下のアイテムからの選択を許可する /  Allow floor items */
-#define USE_FORCE 0x08 /*!< 特殊: wキーで錬気術への切り替えを許可する */
-#define IGNORE_BOTHHAND_SLOT 0x10 /*!< アイテム表示/選択範囲: 両手持ちスロットを選択に含めない */
-#define USE_FULL  0x20 /*!< アイテム表示/選択範囲: 空欄まですべて表示する*/
-
 #define REF_ITEM(P_PTR, FLOOR_PTR, ID) ((ID >= 0 ? &(P_PTR)->inventory_list[ID] : &(FLOOR_PTR)->o_list[0 - item]))
 
 extern int bow_tval_ammo(object_type *o_ptr);
index cdb8f63..a4555d6 100644 (file)
@@ -10,6 +10,7 @@
 #include "world/world.h"
 #include "floor/floor-town.h"
 #include "inventory/player-inventory.h"
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "store/store-util.h"
 #include "store/store.h"
index c036ec4..adb1520 100644 (file)
@@ -45,6 +45,7 @@
 #include "spell/spells3.h"
 #include "object/tr-types.h"
 #include "object/trc-types.h"
+#include "object/item-use-flags.h"
 
 #define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
 
index e13e83c..278a823 100644 (file)
@@ -8,6 +8,7 @@
 #include "grid/grid.h"
 #include "spell/spells3.h"
 #include "spell/spells-object.h"
+#include "object/item-use-flags.h"
 #include "object/object-boost.h"
 #include "object/object-hook.h"
 #include "object/object-flavor.h"
index b37ec8e..1d78c02 100644 (file)
@@ -7,6 +7,7 @@
 #include "floor/floor.h"
 #include "effect/spells-effect-util.h"
 #include "spell/spells2.h"
+#include "object/item-use-flags.h"
 #include "object/object-hook.h"
 
 /*!
index 491fb63..4d040f8 100644 (file)
@@ -38,6 +38,7 @@
 #include "spell/spells-diceroll.h"
 #include "realm/realm-hex.h"
 #include "autopick/autopick.h"
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "object/object-mark-types.h"
index a484761..4861f2a 100644 (file)
@@ -25,6 +25,7 @@
 #include "dungeon/dungeon.h"
 #include "effect/effect-characteristics.h"
 #include "floor/floor-town.h"
+#include "object/item-use-flags.h"
 #include "object/object-boost.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
index fb6c54b..3776ecf 100644 (file)
@@ -46,6 +46,7 @@
 #include "player/player-status.h"
 #include "player/player-class.h"
 #include "inventory/player-inventory.h"
+#include "object/item-use-flags.h"
 #include "object/object-flavor.h"
 #include "object/object-hook.h"
 #include "floor/floor-events.h"
index 1c6eea5..f316966 100644 (file)
@@ -62,6 +62,7 @@
 #include "spell/spells3.h"
 #include "spell/spells-detection.h"
 #include "player/player-races-table.h"
+#include "object/item-use-flags.h"
 #include "object/trc-types.h"
 
 #define NUM_O_SET 8