From d1af5a48157df4f62feed2c9fddd73c3e18ff34b Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 29 May 2020 20:17:10 +0900 Subject: [PATCH] [Refactor] #40399 Separated sv-wand-types.h from object.h --- Hengband/Hengband/Hengband.vcxproj | 1 + Hengband/Hengband/Hengband.vcxproj.filters | 3 +++ src/Makefile.am | 2 +- src/autopick/autopick-destroyer.c | 1 + src/birth/initial-equipments-table.c | 1 + src/birth/inventory-initializer.c | 1 + src/cmd/cmd-zapwand.c | 1 + src/market/arena-info-table.c | 1 + src/market/articles-on-sale.c | 1 + src/object/object1.h | 34 --------------------------- src/object/sv-wand-types.h | 37 ++++++++++++++++++++++++++++++ 11 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 src/object/sv-wand-types.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index 0c3c805e1..9fb8aeb32 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -518,6 +518,7 @@ + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index b91c7b15c..e11444a68 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -2203,6 +2203,9 @@ object + + object + diff --git a/src/Makefile.am b/src/Makefile.am index 7e8eab4fc..45fedbfc1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -212,7 +212,7 @@ hengband_SOURCES = \ object/sv-digging-types.h \ object/sv-weapon-types.h object/sv-protector-types.h object/sv-armor-types.h \ object/sv-lite-types.h object/sv-potion-types.h object/sv-ring-types.h \ - object/sv-staff-types.h object/sv-other-types.h \ + object/sv-staff-types.h object/sv-wand-types.h object/sv-other-types.h \ object/item-feeling.h object/item-use-flags.h \ \ inventory/simple-appraiser.c inventory/simple-appraiser.h \ diff --git a/src/autopick/autopick-destroyer.c b/src/autopick/autopick-destroyer.c index c944a7576..9e22ac5b5 100644 --- a/src/autopick/autopick-destroyer.c +++ b/src/autopick/autopick-destroyer.c @@ -14,6 +14,7 @@ #include "object/object-flavor.h" #include "object/object-mark-types.h" #include "object/special-object-flags.h" +#include "object/sv-wand-types.h" #include "player/player-move.h" #include "player/player-races-table.h" diff --git a/src/birth/initial-equipments-table.c b/src/birth/initial-equipments-table.c index f489d4504..363fe90ce 100644 --- a/src/birth/initial-equipments-table.c +++ b/src/birth/initial-equipments-table.c @@ -4,6 +4,7 @@ #include "object/sv-bow-types.h" #include "object/sv-potion-types.h" #include "object/sv-ring-types.h" +#include "object/sv-wand-types.h" #include "object/sv-weapon-types.h" /*! diff --git a/src/birth/inventory-initializer.c b/src/birth/inventory-initializer.c index c31915dab..f8ef34f4f 100644 --- a/src/birth/inventory-initializer.c +++ b/src/birth/inventory-initializer.c @@ -12,6 +12,7 @@ #include "object/sv-potion-types.h" #include "object/sv-ring-types.h" #include "object/sv-staff-types.h" +#include "object/sv-wand-types.h" #include "object/sv-weapon-types.h" #include "autopick/autopick.h" #include "player/player-races-table.h" diff --git a/src/cmd/cmd-zapwand.c b/src/cmd/cmd-zapwand.c index ca16b3757..6fa58d2f4 100644 --- a/src/cmd/cmd-zapwand.c +++ b/src/cmd/cmd-zapwand.c @@ -13,6 +13,7 @@ #include "object/object-kind.h" #include "object/object-hook.h" #include "object/special-object-flags.h" +#include "object/sv-wand-types.h" #include "cmd-basic.h" #include "floor/floor.h" #include "io/targeting.h" diff --git a/src/market/arena-info-table.c b/src/market/arena-info-table.c index 85cec73a9..681bdc8f6 100644 --- a/src/market/arena-info-table.c +++ b/src/market/arena-info-table.c @@ -4,6 +4,7 @@ #include "object/sv-potion-types.h" #include "object/sv-ring-types.h" #include "object/sv-staff-types.h" +#include "object/sv-wand-types.h" /*! * @brief 闘技場のモンスターID及び報酬アイテムテーブル diff --git a/src/market/articles-on-sale.c b/src/market/articles-on-sale.c index 71574b31b..d232bc07a 100644 --- a/src/market/articles-on-sale.c +++ b/src/market/articles-on-sale.c @@ -11,6 +11,7 @@ #include "object/sv-protector-types.h" #include "object/sv-ring-types.h" #include "object/sv-staff-types.h" +#include "object/sv-wand-types.h" #include "object/sv-weapon-types.h" /*! diff --git a/src/object/object1.h b/src/object/object1.h index 9da864564..f91a23199 100644 --- a/src/object/object1.h +++ b/src/object/object1.h @@ -113,40 +113,6 @@ extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs); extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds); extern void torch_lost_fuel(object_type *o_ptr); -/* The "sval" codes for TV_WAND */ -#define SV_WAND_HEAL_MONSTER 0 -#define SV_WAND_HASTE_MONSTER 1 -#define SV_WAND_CLONE_MONSTER 2 -#define SV_WAND_TELEPORT_AWAY 3 -#define SV_WAND_DISARMING 4 -#define SV_WAND_TRAP_DOOR_DEST 5 -#define SV_WAND_STONE_TO_MUD 6 -#define SV_WAND_LITE 7 -#define SV_WAND_SLEEP_MONSTER 8 -#define SV_WAND_SLOW_MONSTER 9 -#define SV_WAND_CONFUSE_MONSTER 10 -#define SV_WAND_FEAR_MONSTER 11 -#define SV_WAND_HYPODYNAMIA 12 -#define SV_WAND_POLYMORPH 13 -#define SV_WAND_STINKING_CLOUD 14 -#define SV_WAND_MAGIC_MISSILE 15 -#define SV_WAND_ACID_BOLT 16 -#define SV_WAND_CHARM_MONSTER 17 -#define SV_WAND_FIRE_BOLT 18 -#define SV_WAND_COLD_BOLT 19 -#define SV_WAND_ACID_BALL 20 -#define SV_WAND_ELEC_BALL 21 -#define SV_WAND_FIRE_BALL 22 -#define SV_WAND_COLD_BALL 23 -#define SV_WAND_WONDER 24 -#define SV_WAND_DISINTEGRATE 25 -#define SV_WAND_DRAGON_FIRE 26 -#define SV_WAND_DRAGON_COLD 27 -#define SV_WAND_DRAGON_BREATH 28 -#define SV_WAND_ROCKETS 29 -#define SV_WAND_STRIKING 30 -#define SV_WAND_GENOCIDE 31 - /* The "sval" codes for TV_ROD */ #define SV_ROD_DETECT_TRAP 0 #define SV_ROD_DETECT_DOOR 1 diff --git a/src/object/sv-wand-types.h b/src/object/sv-wand-types.h new file mode 100644 index 000000000..517d69dd7 --- /dev/null +++ b/src/object/sv-wand-types.h @@ -0,0 +1,37 @@ +#pragma once + +/* The "sval" codes for TV_WAND */ +typedef enum sv_wand_type { + SV_WAND_HEAL_MONSTER = 0, + SV_WAND_HASTE_MONSTER = 1, + SV_WAND_CLONE_MONSTER = 2, + SV_WAND_TELEPORT_AWAY = 3, + SV_WAND_DISARMING = 4, + SV_WAND_TRAP_DOOR_DEST = 5, + SV_WAND_STONE_TO_MUD = 6, + SV_WAND_LITE = 7, + SV_WAND_SLEEP_MONSTER = 8, + SV_WAND_SLOW_MONSTER = 9, + SV_WAND_CONFUSE_MONSTER = 10, + SV_WAND_FEAR_MONSTER = 11, + SV_WAND_HYPODYNAMIA = 12, + SV_WAND_POLYMORPH = 13, + SV_WAND_STINKING_CLOUD = 14, + SV_WAND_MAGIC_MISSILE = 15, + SV_WAND_ACID_BOLT = 16, + SV_WAND_CHARM_MONSTER = 17, + SV_WAND_FIRE_BOLT = 18, + SV_WAND_COLD_BOLT = 19, + SV_WAND_ACID_BALL = 20, + SV_WAND_ELEC_BALL = 21, + SV_WAND_FIRE_BALL = 22, + SV_WAND_COLD_BALL = 23, + SV_WAND_WONDER = 24, + SV_WAND_DISINTEGRATE = 25, + SV_WAND_DRAGON_FIRE = 26, + SV_WAND_DRAGON_COLD = 27, + SV_WAND_DRAGON_BREATH = 28, + SV_WAND_ROCKETS = 29, + SV_WAND_STRIKING = 30, + SV_WAND_GENOCIDE = 31, +} sv_wand_type; -- 2.11.0