From ad1e5ca87cca67b6db055d719bc1bed6ad55ecec Mon Sep 17 00:00:00 2001 From: Hourier Date: Thu, 28 May 2020 23:59:44 +0900 Subject: [PATCH] [Refactor] #40399 Separated sv-lite-types.h from object.h --- Hengband/Hengband/Hengband.vcxproj | 1 + Hengband/Hengband/Hengband.vcxproj.filters | 3 +++ src/Makefile.am | 7 ++++--- src/birth/inventory-initializer.c | 1 + src/cmd/cmd-activate.c | 1 + src/cmd/cmd-item.c | 1 + src/io/load.c | 1 + src/market/articles-on-sale.c | 1 + src/object/lite-processor.c | 1 + src/object/object-flavor.c | 1 + src/object/object-hook.c | 1 + src/object/object1.c | 1 + src/object/object1.h | 12 ------------ src/object/object2.c | 1 + src/object/sv-lite-types.h | 15 +++++++++++++++ src/player/player-status.c | 1 + src/spell/spells-object.c | 1 + src/store/store-util.c | 1 + 18 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 src/object/sv-lite-types.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index 518323c30..4d56dfd70 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -511,6 +511,7 @@ + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index c5abac368..06f55a234 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -2194,6 +2194,9 @@ object + + object + diff --git a/src/Makefile.am b/src/Makefile.am index 4b7bdeae0..fa9cdaea0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -208,10 +208,11 @@ hengband_SOURCES = \ object/old-ego-extra-values.h object/special-object-flags.h \ object/object-mark-types.h object/object-util.h \ object/item-apply-magic.h \ - object/sv-bow-types.h object/sv-digging-types.h object/sv-other-types.h \ + object/sv-bow-types.h object/sv-digging-types.h \ object/sv-weapon-types.h object/sv-protector-types.h object/sv-armor-types.h \ - object/sv-potion-types.h object/sv-ring-types.h \ - object/item-feeling.h object/item-use-flags.h \ + object/sv-lite-types.h object/sv-potion-types.h object/sv-ring-types.h \ + object/sv-other-types.h \ + object/item-feeling.h object/item-use-flags.h \ \ inventory/simple-appraiser.c inventory/simple-appraiser.h \ inventory/inventory-curse.c inventory/inventory-curse.h \ diff --git a/src/birth/inventory-initializer.c b/src/birth/inventory-initializer.c index 800b842f2..944cd32db 100644 --- a/src/birth/inventory-initializer.c +++ b/src/birth/inventory-initializer.c @@ -7,6 +7,7 @@ #include "object/object-ego.h" #include "object/object-kind.h" #include "object/sv-bow-types.h" +#include "object/sv-lite-types.h" #include "object/sv-other-types.h" #include "object/sv-potion-types.h" #include "object/sv-ring-types.h" diff --git a/src/cmd/cmd-activate.c b/src/cmd/cmd-activate.c index 7b3cd5719..2e5a66fef 100644 --- a/src/cmd/cmd-activate.c +++ b/src/cmd/cmd-activate.c @@ -29,6 +29,7 @@ #include "io/files-util.h" #include "object/object-kind.h" #include "object/object-ego.h" +#include "object/sv-lite-types.h" #include "object/sv-ring-types.h" #include "io/targeting.h" #include "world/world.h" diff --git a/src/cmd/cmd-item.c b/src/cmd/cmd-item.c index d648d35c5..1541b062f 100644 --- a/src/cmd/cmd-item.c +++ b/src/cmd/cmd-item.c @@ -37,6 +37,7 @@ #include "dungeon/quest.h" #include "object/artifact.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "object/trc-types.h" #include "player/avatar.h" #include "player/player-status.h" diff --git a/src/io/load.c b/src/io/load.c index 1876e1d76..b048c1e7e 100644 --- a/src/io/load.c +++ b/src/io/load.c @@ -91,6 +91,7 @@ #include "object/tr-types.h" #include "object/object-mark-types.h" #include "object/sv-armor-types.h" +#include "object/sv-lite-types.h" #include "object/trc-types.h" #include "object/old-ego-extra-values.h" // TODO v1.5.0以前のセーブファイルをロードする処理を分離する. diff --git a/src/market/articles-on-sale.c b/src/market/articles-on-sale.c index 70aa4b9d0..6b9c0c628 100644 --- a/src/market/articles-on-sale.c +++ b/src/market/articles-on-sale.c @@ -5,6 +5,7 @@ #include "object/sv-bow-types.h" #include "object/sv-digging-types.h" #include "object/sv-other-types.h" +#include "object/sv-lite-types.h" #include "object/sv-potion-types.h" #include "object/sv-protector-types.h" #include "object/sv-ring-types.h" diff --git a/src/object/lite-processor.c b/src/object/lite-processor.c index bfe760816..b72098cc8 100644 --- a/src/object/lite-processor.c +++ b/src/object/lite-processor.c @@ -2,6 +2,7 @@ #include "object/lite-processor.h" #include "object/object-ego.h" #include "object/object-hook.h" +#include "object/sv-lite-types.h" #include "player/player-move.h" #include "world/world.h" diff --git a/src/object/object-flavor.c b/src/object/object-flavor.c index 57e083454..913599456 100644 --- a/src/object/object-flavor.c +++ b/src/object/object-flavor.c @@ -22,6 +22,7 @@ #include "object/object-hook.h" #include "object/object-flavor.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "grid/trap.h" #include "combat/snipe.h" #include "io/files-util.h" diff --git a/src/object/object-hook.c b/src/object/object-hook.c index aa1f9a24f..0e5bdcc9e 100644 --- a/src/object/object-hook.c +++ b/src/object/object-hook.c @@ -6,6 +6,7 @@ #include "object/object-kind.h" #include "object/special-object-flags.h" #include "object/sv-armor-types.h" +#include "object/sv-lite-types.h" #include "object/sv-other-types.h" #include "object/sv-protector-types.h" #include "object/sv-weapon-types.h" diff --git a/src/object/object1.c b/src/object/object1.c index a6b3ff296..58919ddec 100644 --- a/src/object/object1.c +++ b/src/object/object1.c @@ -25,6 +25,7 @@ #include "object/object-flavor.h" #include "object/object-hook.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "object/sv-other-types.h" #include "object/sv-ring-types.h" #include "object/sv-weapon-types.h" diff --git a/src/object/object1.h b/src/object/object1.h index b5c2ac72e..b3245ae59 100644 --- a/src/object/object1.h +++ b/src/object/object1.h @@ -113,18 +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_LITE */ -#define SV_LITE_TORCH 0 -#define SV_LITE_LANTERN 1 -#define SV_LITE_FEANOR 2 -#define SV_LITE_EDISON 3 -#define SV_LITE_GALADRIEL 4 -#define SV_LITE_ELENDIL 5 -#define SV_LITE_JUDGE 6 -#define SV_LITE_LORE 7 -#define SV_LITE_PALANTIR 8 -#define SV_LITE_FLY_STONE 9 - /* The "sval" codes for TV_AMULET */ #define SV_AMULET_DOOM 0 #define SV_AMULET_TELEPORT 1 diff --git a/src/object/object2.c b/src/object/object2.c index eb1583a42..70b084480 100644 --- a/src/object/object2.c +++ b/src/object/object2.c @@ -36,6 +36,7 @@ #include "object/special-object-flags.h" #include "object/sv-armor-types.h" #include "object/sv-bow-types.h" +#include "object/sv-lite-types.h" #include "object/sv-other-types.h" #include "object/sv-protector-types.h" #include "object/sv-ring-types.h" diff --git a/src/object/sv-lite-types.h b/src/object/sv-lite-types.h new file mode 100644 index 000000000..1339b6c4c --- /dev/null +++ b/src/object/sv-lite-types.h @@ -0,0 +1,15 @@ +#pragma once + +/* The sval codes for TV_LITE */ +typedef enum sv_lite_type { + SV_LITE_TORCH = 0, + SV_LITE_LANTERN = 1, + SV_LITE_FEANOR = 2, + SV_LITE_EDISON = 3, + SV_LITE_GALADRIEL = 4, + SV_LITE_ELENDIL = 5, + SV_LITE_JUDGE = 6, + SV_LITE_LORE = 7, + SV_LITE_PALANTIR = 8, + SV_LITE_FLY_STONE = 9, +} sv_lite_type; diff --git a/src/player/player-status.c b/src/player/player-status.c index 76778c2c1..e47a74a86 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -26,6 +26,7 @@ #include "object/object-hook.h" #include "object/object-ego.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "object/sv-weapon-types.h" #include "monster/monster.h" #include "monster/monster-status.h" diff --git a/src/spell/spells-object.c b/src/spell/spells-object.c index 3ca3b0369..57553d168 100644 --- a/src/spell/spells-object.c +++ b/src/spell/spells-object.c @@ -16,6 +16,7 @@ #include "object/object-flavor.h" #include "object/object-ego.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "object/sv-protector-types.h" #include "object/sv-weapon-types.h" #include "player/player-damage.h" diff --git a/src/store/store-util.c b/src/store/store-util.c index 8f2be7801..ae7267f26 100644 --- a/src/store/store-util.c +++ b/src/store/store-util.c @@ -6,6 +6,7 @@ #include "object/object-kind.h" #include "object/tr-types.h" #include "object/special-object-flags.h" +#include "object/sv-lite-types.h" #include "object/sv-potion-types.h" #include "object/sv-weapon-types.h" -- 2.11.0