From: Hourier Date: Fri, 29 May 2020 11:25:44 +0000 (+0900) Subject: [Refactor] #40399 Separated sv-scroll-types.h from object.h X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6fc2409cd8fa0160c4d5940c2154b57a21d7d079;p=hengband%2Fhengband.git [Refactor] #40399 Separated sv-scroll-types.h from object.h --- diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index e77a3641a..3b52d77ee 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 bcaaed35a..9183831f3 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -2209,6 +2209,9 @@ object + + object + diff --git a/src/birth/initial-equipments-table.c b/src/birth/initial-equipments-table.c index 363fe90ce..b811a793e 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-scroll-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 f8ef34f4f..5a1d59798 100644 --- a/src/birth/inventory-initializer.c +++ b/src/birth/inventory-initializer.c @@ -11,6 +11,7 @@ #include "object/sv-other-types.h" #include "object/sv-potion-types.h" #include "object/sv-ring-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-staff-types.h" #include "object/sv-wand-types.h" #include "object/sv-weapon-types.h" diff --git a/src/cmd/cmd-read.c b/src/cmd/cmd-read.c index 7b05477cf..a884ac124 100644 --- a/src/cmd/cmd-read.c +++ b/src/cmd/cmd-read.c @@ -33,6 +33,7 @@ #include "io/files-util.h" #include "floor/floor.h" #include "object/object-kind.h" +#include "object/sv-scroll-types.h" #include "view/display-main-window.h" #include "spell/spells-type.h" #include "spell/spells2.h" diff --git a/src/dungeon/dungeon-file.c b/src/dungeon/dungeon-file.c index 9cb13e8b0..2172a8f72 100644 --- a/src/dungeon/dungeon-file.c +++ b/src/dungeon/dungeon-file.c @@ -60,6 +60,7 @@ #include "grid/trap.h" #include "object/artifact.h" +#include "object/sv-scroll-types.h" #include "cmd-activate.h" #include "term/gameterm.h" #include "floor/wild.h" diff --git a/src/effect/effect-item.c b/src/effect/effect-item.c index fa658a115..1318d3e31 100644 --- a/src/effect/effect-item.c +++ b/src/effect/effect-item.c @@ -4,6 +4,7 @@ #include "object/object-hook.h" #include "object/object-broken.h" #include "object/sv-other-types.h" +#include "object/sv-scroll-types.h" #include "autopick/autopick.h" #include "spell/spells-type.h" #include "spell/spells3.h" diff --git a/src/market/arena-info-table.c b/src/market/arena-info-table.c index 64e372741..8bcfd0b36 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-rod-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-staff-types.h" #include "object/sv-wand-types.h" diff --git a/src/market/articles-on-sale.c b/src/market/articles-on-sale.c index d232bc07a..66cc4d9bc 100644 --- a/src/market/articles-on-sale.c +++ b/src/market/articles-on-sale.c @@ -9,6 +9,7 @@ #include "object/sv-lite-types.h" #include "object/sv-potion-types.h" #include "object/sv-protector-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-ring-types.h" #include "object/sv-staff-types.h" #include "object/sv-wand-types.h" diff --git a/src/market/bounty-prize-table.c b/src/market/bounty-prize-table.c index 63ca2dbbd..5bcb4734d 100644 --- a/src/market/bounty-prize-table.c +++ b/src/market/bounty-prize-table.c @@ -2,6 +2,7 @@ #include "market/bounty-prize-table.h" #include "object/sv-potion-types.h" +#include "object/sv-scroll-types.h" bounty_prize_type prize_list[MAX_BOUNTY] = { { TV_POTION, SV_POTION_CURING }, diff --git a/src/monster/monster1.c b/src/monster/monster1.c index 107e820fb..eaeacb922 100644 --- a/src/monster/monster1.c +++ b/src/monster/monster1.c @@ -47,6 +47,7 @@ #include "combat/monster-attack-effect.h" #include "object/sv-other-types.h" #include "object/sv-protector-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-weapon-types.h" /* diff --git a/src/object/object1.h b/src/object/object1.h index 4c8aaf698..c1f2aa953 100644 --- a/src/object/object1.h +++ b/src/object/object1.h @@ -113,66 +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_SCROLL */ - -#define SV_SCROLL_DARKNESS 0 -#define SV_SCROLL_AGGRAVATE_MONSTER 1 -#define SV_SCROLL_CURSE_ARMOR 2 -#define SV_SCROLL_CURSE_WEAPON 3 -#define SV_SCROLL_SUMMON_MONSTER 4 -#define SV_SCROLL_SUMMON_UNDEAD 5 -#define SV_SCROLL_SUMMON_PET 6 -#define SV_SCROLL_TRAP_CREATION 7 -#define SV_SCROLL_PHASE_DOOR 8 -#define SV_SCROLL_TELEPORT 9 -#define SV_SCROLL_TELEPORT_LEVEL 10 -#define SV_SCROLL_WORD_OF_RECALL 11 -#define SV_SCROLL_IDENTIFY 12 -#define SV_SCROLL_STAR_IDENTIFY 13 -#define SV_SCROLL_REMOVE_CURSE 14 -#define SV_SCROLL_STAR_REMOVE_CURSE 15 -#define SV_SCROLL_ENCHANT_ARMOR 16 -#define SV_SCROLL_ENCHANT_WEAPON_TO_HIT 17 -#define SV_SCROLL_ENCHANT_WEAPON_TO_DAM 18 -/* xxx enchant missile? */ -#define SV_SCROLL_STAR_ENCHANT_ARMOR 20 -#define SV_SCROLL_STAR_ENCHANT_WEAPON 21 -#define SV_SCROLL_RECHARGING 22 -#define SV_SCROLL_MUNDANITY 23 -#define SV_SCROLL_LIGHT 24 -#define SV_SCROLL_MAPPING 25 -#define SV_SCROLL_DETECT_GOLD 26 -#define SV_SCROLL_DETECT_ITEM 27 -#define SV_SCROLL_DETECT_TRAP 28 -#define SV_SCROLL_DETECT_DOOR 29 -#define SV_SCROLL_DETECT_INVIS 30 -/* xxx (detect evil?) */ -#define SV_SCROLL_SATISFY_HUNGER 32 -#define SV_SCROLL_BLESSING 33 -#define SV_SCROLL_HOLY_CHANT 34 -#define SV_SCROLL_HOLY_PRAYER 35 -#define SV_SCROLL_MONSTER_CONFUSION 36 -#define SV_SCROLL_PROTECTION_FROM_EVIL 37 -#define SV_SCROLL_RUNE_OF_PROTECTION 38 -#define SV_SCROLL_TRAP_DOOR_DESTRUCTION 39 -/* xxx */ -#define SV_SCROLL_STAR_DESTRUCTION 41 -#define SV_SCROLL_DISPEL_UNDEAD 42 -#define SV_SCROLL_SPELL 43 -#define SV_SCROLL_GENOCIDE 44 -#define SV_SCROLL_MASS_GENOCIDE 45 -#define SV_SCROLL_ACQUIREMENT 46 -#define SV_SCROLL_STAR_ACQUIREMENT 47 -#define SV_SCROLL_FIRE 48 -#define SV_SCROLL_ICE 49 -#define SV_SCROLL_CHAOS 50 -#define SV_SCROLL_RUMOR 51 -#define SV_SCROLL_ARTIFACT 52 -#define SV_SCROLL_RESET_RECALL 53 -#define SV_SCROLL_SUMMON_KIN 54 -#define SV_SCROLL_AMUSEMENT 55 -#define SV_SCROLL_STAR_AMUSEMENT 56 - /* The "sval" codes for TV_FOOD */ #define SV_FOOD_POISON 0 #define SV_FOOD_BLINDNESS 1 diff --git a/src/object/sv-scroll-types.h b/src/object/sv-scroll-types.h new file mode 100644 index 000000000..e0cf359eb --- /dev/null +++ b/src/object/sv-scroll-types.h @@ -0,0 +1,62 @@ +#pragma once + +/* The "sval" codes for TV_SCROLL */ +typedef enum sv_scroll_type { + SV_SCROLL_DARKNESS = 0, + SV_SCROLL_AGGRAVATE_MONSTER = 1, + SV_SCROLL_CURSE_ARMOR = 2, + SV_SCROLL_CURSE_WEAPON = 3, + SV_SCROLL_SUMMON_MONSTER = 4, + SV_SCROLL_SUMMON_UNDEAD = 5, + SV_SCROLL_SUMMON_PET = 6, + SV_SCROLL_TRAP_CREATION = 7, + SV_SCROLL_PHASE_DOOR = 8, + SV_SCROLL_TELEPORT = 9, + SV_SCROLL_TELEPORT_LEVEL = 10, + SV_SCROLL_WORD_OF_RECALL = 11, + SV_SCROLL_IDENTIFY = 12, + SV_SCROLL_STAR_IDENTIFY = 13, + SV_SCROLL_REMOVE_CURSE = 14, + SV_SCROLL_STAR_REMOVE_CURSE = 15, + SV_SCROLL_ENCHANT_ARMOR = 16, + SV_SCROLL_ENCHANT_WEAPON_TO_HIT = 17, + SV_SCROLL_ENCHANT_WEAPON_TO_DAM = 18, + /* xxx enchant missile? */ + SV_SCROLL_STAR_ENCHANT_ARMOR = 20, + SV_SCROLL_STAR_ENCHANT_WEAPON = 21, + SV_SCROLL_RECHARGING = 22, + SV_SCROLL_MUNDANITY = 23, + SV_SCROLL_LIGHT = 24, + SV_SCROLL_MAPPING = 25, + SV_SCROLL_DETECT_GOLD = 26, + SV_SCROLL_DETECT_ITEM = 27, + SV_SCROLL_DETECT_TRAP = 28, + SV_SCROLL_DETECT_DOOR = 29, + SV_SCROLL_DETECT_INVIS = 30, + /* xxx (detect evil?) */ + SV_SCROLL_SATISFY_HUNGER = 32, + SV_SCROLL_BLESSING = 33, + SV_SCROLL_HOLY_CHANT = 34, + SV_SCROLL_HOLY_PRAYER = 35, + SV_SCROLL_MONSTER_CONFUSION = 36, + SV_SCROLL_PROTECTION_FROM_EVIL = 37, + SV_SCROLL_RUNE_OF_PROTECTION = 38, + SV_SCROLL_TRAP_DOOR_DESTRUCTION = 39, + /* xxx */ + SV_SCROLL_STAR_DESTRUCTION = 41, + SV_SCROLL_DISPEL_UNDEAD = 42, + SV_SCROLL_SPELL = 43, + SV_SCROLL_GENOCIDE = 44, + SV_SCROLL_MASS_GENOCIDE = 45, + SV_SCROLL_ACQUIREMENT = 46, + SV_SCROLL_STAR_ACQUIREMENT = 47, + SV_SCROLL_FIRE = 48, + SV_SCROLL_ICE = 49, + SV_SCROLL_CHAOS = 50, + SV_SCROLL_RUMOR = 51, + SV_SCROLL_ARTIFACT = 52, + SV_SCROLL_RESET_RECALL = 53, + SV_SCROLL_SUMMON_KIN = 54, + SV_SCROLL_AMUSEMENT = 55, + SV_SCROLL_STAR_AMUSEMENT = 56, +} sv_scroll_type; diff --git a/src/spell/spells-object.c b/src/spell/spells-object.c index efd913727..1f228e438 100644 --- a/src/spell/spells-object.c +++ b/src/spell/spells-object.c @@ -17,6 +17,7 @@ #include "object/special-object-flags.h" #include "object/sv-lite-types.h" #include "object/sv-protector-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-weapon-types.h" #include "player/player-damage.h" #include "player/player-status.h" diff --git a/src/store/store-util.c b/src/store/store-util.c index ae7267f26..0a3234d8a 100644 --- a/src/store/store-util.c +++ b/src/store/store-util.c @@ -8,6 +8,7 @@ #include "object/special-object-flags.h" #include "object/sv-lite-types.h" #include "object/sv-potion-types.h" +#include "object/sv-scroll-types.h" #include "object/sv-weapon-types.h" int cur_store_num = 0;