OSDN Git Service

[Refactor] #40399 Separated sv-scroll-types.h from object.h
authorHourier <hourier@users.sourceforge.jp>
Fri, 29 May 2020 11:25:44 +0000 (20:25 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 29 May 2020 11:25:44 +0000 (20:25 +0900)
15 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/birth/initial-equipments-table.c
src/birth/inventory-initializer.c
src/cmd/cmd-read.c
src/dungeon/dungeon-file.c
src/effect/effect-item.c
src/market/arena-info-table.c
src/market/articles-on-sale.c
src/market/bounty-prize-table.c
src/monster/monster1.c
src/object/object1.h
src/object/sv-scroll-types.h [new file with mode: 0644]
src/spell/spells-object.c
src/store/store-util.c

index e77a364..3b52d77 100644 (file)
     <ClInclude Include="..\..\src\object\sv-protector-types.h" />\r
     <ClInclude Include="..\..\src\object\sv-ring-types.h" />\r
     <ClInclude Include="..\..\src\object\sv-rod-types.h" />\r
+    <ClInclude Include="..\..\src\object\sv-scroll-types.h" />\r
     <ClInclude Include="..\..\src\object\sv-staff-types.h" />\r
     <ClInclude Include="..\..\src\object\sv-wand-types.h" />\r
     <ClInclude Include="..\..\src\object\sv-weapon-types.h" />\r
index bcaaed3..9183831 100644 (file)
     <ClInclude Include="..\..\src\object\sv-rod-types.h">
       <Filter>object</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\object\sv-scroll-types.h">
+      <Filter>object</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 363fe90..b811a79 100644 (file)
@@ -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"
 
index f8ef34f..5a1d597 100644 (file)
@@ -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"
index 7b05477..a884ac1 100644 (file)
@@ -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"
index 9cb13e8..2172a8f 100644 (file)
@@ -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"
index fa658a1..1318d3e 100644 (file)
@@ -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"
index 64e3727..8bcfd0b 100644 (file)
@@ -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"
 
index d232bc0..66cc4d9 100644 (file)
@@ -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"
index 63ca2db..5bcb473 100644 (file)
@@ -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 },
index 107e820..eaeacb9 100644 (file)
@@ -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"
 
  /*
index 4c8aaf6..c1f2aa9 100644 (file)
@@ -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 (file)
index 0000000..e0cf359
--- /dev/null
@@ -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;
index efd9137..1f228e4 100644 (file)
@@ -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"
index ae7267f..0a3234d 100644 (file)
@@ -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;