OSDN Git Service

[Refactor] #40414 Separated spells-specific-bolt.c/h from spells2.c/h
authorHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 10:18:08 +0000 (19:18 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 10:18:08 +0000 (19:18 +0900)
12 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd-item/cmd-activate.c
src/cmd-item/cmd-zaprod.c
src/cmd-item/cmd-zapwand.c
src/realm/realm-death.c
src/spell/spells-specific-bolt.c [new file with mode: 0644]
src/spell/spells-specific-bolt.h [new file with mode: 0644]
src/spell/spells-summon.c
src/spell/spells2.c
src/spell/spells2.h

index 44d5820..edb0bec 100644 (file)
     <ClCompile Include="..\..\src\spell\spells-neighbor.c" />\r
     <ClCompile Include="..\..\src\spell\spells-pet.c" />\r
     <ClCompile Include="..\..\src\spell\spells-sight.c" />\r
+    <ClCompile Include="..\..\src\spell\spells-specific-bolt.c" />\r
     <ClCompile Include="..\..\src\spell\spells-staff-only.c" />\r
     <ClCompile Include="..\..\src\spell\spells-teleport.c" />\r
     <ClCompile Include="..\..\src\system\system-variables.c" />\r
     <ClInclude Include="..\..\src\spell\spells-neighbor.h" />\r
     <ClInclude Include="..\..\src\spell\spells-pet.h" />\r
     <ClInclude Include="..\..\src\spell\spells-sight.h" />\r
+    <ClInclude Include="..\..\src\spell\spells-specific-bolt.h" />\r
     <ClInclude Include="..\..\src\spell\spells-staff-only.h" />\r
     <ClInclude Include="..\..\src\spell\spells-teleport.h" />\r
     <ClInclude Include="..\..\src\sv-definition\sv-amulet-types.h" />\r
index 3f15fb0..d0c94f8 100644 (file)
     <ClCompile Include="..\..\src\spell\spells-neighbor.c">
       <Filter>spell</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\spell\spells-specific-bolt.c">
+      <Filter>spell</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\cmd\cmd-basic.h">
     <ClInclude Include="..\..\src\spell\spells-neighbor.h">
       <Filter>spell</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\spell\spells-specific-bolt.h">
+      <Filter>spell</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index c751f83..32dacc5 100644 (file)
@@ -404,6 +404,7 @@ hengband_SOURCES = \
        spell/spells-object.c spell/spells-object.h \
        spell/spells-pet.c spell/spells-pet.h \
        spell/spells-sight.c spell/spells-sight.h \
+       spell/spells-specific-bolt.c spell/spells-specific-bolt.h \
        spell/spells-summon.c spell/spells-summon.h \
        spell/spells-staff-only.c spell/spells-staff-only.h \
        spell/spells-status.c spell/spells-status.h \
index f693bf8..af4aac1 100644 (file)
@@ -38,6 +38,7 @@
 #include "spell/spells-neighbor.h"
 #include "spell/spells-object.h"
 #include "spell/spells-sight.h"
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
index 37e3b22..a3ca17f 100644 (file)
@@ -22,6 +22,7 @@
 #include "spell/spells-lite.h"
 #include "spell/spells-neighbor.h"
 #include "spell/spells-sight.h"
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index 0241231..28c6d96 100644 (file)
@@ -19,6 +19,7 @@
 #include "spell/spells-launcher.h"
 #include "spell/spells-lite.h"
 #include "spell/spells-neighbor.h"
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
index fc82333..0e6f919 100644 (file)
@@ -16,6 +16,7 @@
 #include "spell/spells-neighbor.h"
 #include "spell/spells-object.h"
 #include "spell/spells-sight.h"
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-type.h"
diff --git a/src/spell/spells-specific-bolt.c b/src/spell/spells-specific-bolt.c
new file mode 100644 (file)
index 0000000..dcd94c1
--- /dev/null
@@ -0,0 +1,30 @@
+#include "spell/spells-specific-bolt.h"
+#include "effect/effect-characteristics.h"
+#include "spell/spells-launcher.h"
+#include "spell/spells-type.h"
+
+/*!
+ * @brief 衰弱ボルト処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool hypodynamic_bolt(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam)
+{
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+    return (project_hook(caster_ptr, GF_HYPODYNAMIA, dir, dam, flg));
+}
+
+/*!
+ * @brief 死の光線処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev プレイヤーレベル(効力はplev*200)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool death_ray(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev)
+{
+    BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+    return (project_hook(caster_ptr, GF_DEATH_RAY, dir, plev * 200, flg));
+}
diff --git a/src/spell/spells-specific-bolt.h b/src/spell/spells-specific-bolt.h
new file mode 100644 (file)
index 0000000..5463741
--- /dev/null
@@ -0,0 +1,6 @@
+#pragma once
+
+#include "system/angband.h"
+
+bool hypodynamic_bolt(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
+bool death_ray(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
index f78dd3f..d75f52b 100644 (file)
@@ -14,7 +14,7 @@
 #include "spell/spells-launcher.h"
 #include "spell/spells-lite.h"
 #include "spell/spells-sight.h"
-#include "spell/spells2.h" // todo 後で消す.
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-type.h"
 #include "sv-definition/sv-other-types.h"
index db2dbe4..c7a5b10 100644 (file)
@@ -58,6 +58,7 @@
 #include "spell/spells-lite.h"
 #include "spell/spells-neighbor.h"
 #include "spell/spells-sight.h"
+#include "spell/spells-specific-bolt.h"
 #include "spell/spells-status.h"
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
 #include "world/world.h"
 
 /*!
- * @brief 衰弱ボルト処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool hypodynamic_bolt(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam)
-{
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
-       return (project_hook(caster_ptr, GF_HYPODYNAMIA, dir, dam, flg));
-}
-
-
-/*!
- * @brief 死の光線処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param plev プレイヤーレベル(効力はplev*200)
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool death_ray(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev)
-{
-       BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
-       return (project_hook(caster_ptr, GF_DEATH_RAY, dir, plev * 200, flg));
-}
-
-
-/*!
  * @brief 混沌招来処理
  * @return 作用が実際にあった場合TRUEを返す
  */
index c5f61ac..b86d29a 100644 (file)
@@ -3,8 +3,6 @@
 #include "system/angband.h"
 
 void call_chaos(player_type* caster_ptr);
-bool hypodynamic_bolt(player_type* caster_ptr, DIRECTION dir, HIT_POINT dam);
-bool death_ray(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
 bool activate_ty_curse(player_type* target_ptr, bool stop_ty, int* count);
 void wall_breaker(player_type* caster_ptr);
 bool charm_monster(player_type* caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);