OSDN Git Service

[Refactor] #40414 Separated spells-beam.c/h from spells2.c/h
authorHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 09:55:48 +0000 (18:55 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 09:55:48 +0000 (18:55 +0900)
14 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/mind/racial.c
src/realm/realm-arcane.c
src/realm/realm-crusade.c
src/realm/realm-nature.c
src/spell/spells-beam.c [new file with mode: 0644]
src/spell/spells-beam.h [new file with mode: 0644]
src/spell/spells2.c
src/spell/spells2.h

index cf8df28..2ee6762 100644 (file)
     <ClCompile Include="..\..\src\mspell\mspell-summon.c" />\r
     <ClCompile Include="..\..\src\mspell\mspell-util.c" />\r
     <ClCompile Include="..\..\src\mspell\mspell-ball.c" />\r
+    <ClCompile Include="..\..\src\spell\spells-beam.c" />\r
     <ClCompile Include="..\..\src\spell\spells-describer.c" />\r
     <ClCompile Include="..\..\src\spell\spells-detection.c" />\r
     <ClCompile Include="..\..\src\spell\spells-genocide.c" />\r
     <ClInclude Include="..\..\src\object-enchant\special-object-flags.h" />\r
     <ClInclude Include="..\..\src\realm\realm-hex-numbers.h" />\r
     <ClInclude Include="..\..\src\realm\realm-song-numbers.h" />\r
+    <ClInclude Include="..\..\src\spell\spells-beam.h" />\r
     <ClInclude Include="..\..\src\spell\spells-describer.h" />\r
     <ClInclude Include="..\..\src\spell\spells-genocide.h" />\r
     <ClInclude Include="..\..\src\spell\spells-hex.h" />\r
index e13e407..2fc7ffb 100644 (file)
     <ClCompile Include="..\..\src\spell\spells-pet.c">
       <Filter>spell</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\spell\spells-beam.c">
+      <Filter>spell</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\cmd\cmd-basic.h">
     <ClInclude Include="..\..\src\spell\spells-pet.h">
       <Filter>spell</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\spell\spells-beam.h">
+      <Filter>spell</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index 9c5a6c4..fa85363 100644 (file)
@@ -390,6 +390,7 @@ hengband_SOURCES = \
        spell/range-calc.c spell/range-calc.h \
        spell/spells2.c spell/spells2.h \
        spell/spells3.c spell/spells3.h \
+       spell/spells-beam.c spell/spells-beam.h \
        spell/spells-describer.c spell/spells-describer.h \
        spell/spells-detection.c spell/spells-detection.h \
        spell/spells-diceroll.c spell/spells-diceroll.h \
index db8a49a..9b4b851 100644 (file)
@@ -28,6 +28,7 @@
 #include "player/player-effects.h"
 #include "player/player-races-table.h"
 #include "spell/process-effect.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-genocide.h"
index 0fabb1d..38566cb 100644 (file)
@@ -15,6 +15,7 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-launcher.h"
index 54ad809..8248de5 100644 (file)
@@ -15,6 +15,7 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-launcher.h"
 #include "spell/spells-lite.h"
 #include "spell/spells-status.h"
index 2f7b326..34d82bb 100644 (file)
@@ -33,6 +33,7 @@
 #include "player/player-races-table.h"
 #include "player/player-status.h"
 #include "mind/racial-mirror-master.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-floor.h"
 #include "spell/spells-hex.h"
index 210eda5..4797c6e 100644 (file)
@@ -4,6 +4,7 @@
 #include "player/avatar.h"
 #include "player/player-effects.h"
 #include "player/player-status.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
@@ -14,7 +15,6 @@
 #include "spell/spells-summon.h"
 #include "spell/spells-teleport.h"
 #include "spell/spells-type.h"
-#include "spell/spells2.h"
 #include "spell/spells3.h"
 #include "util/util.h"
 
index 1b4d9df..9d4b281 100644 (file)
@@ -6,6 +6,7 @@
 #include "player/player-class.h"
 #include "player/player-effects.h"
 #include "spell/process-effect.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
index 012d7e1..7734766 100644 (file)
@@ -12,6 +12,7 @@
 #include "player/player-effects.h"
 #include "player/player-races-table.h"
 #include "spell/process-effect.h"
+#include "spell/spells-beam.h"
 #include "spell/spells-detection.h"
 #include "spell/spells-diceroll.h"
 #include "spell/spells-floor.h"
diff --git a/src/spell/spells-beam.c b/src/spell/spells-beam.c
new file mode 100644 (file)
index 0000000..7e64cfa
--- /dev/null
@@ -0,0 +1,53 @@
+#include "spell/spells-beam.h"
+#include "effect/effect-characteristics.h"
+#include "spell/spells-type.h"
+#include "spell/spells-launcher.h"
+
+/*!
+ * @brief 岩石溶解処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool wall_to_mud(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam)
+{
+    BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+    return (project_hook(caster_ptr, GF_KILL_WALL, dir, dam, flg));
+}
+
+/*!
+ * @brief 魔法の施錠処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool wizard_lock(player_type *caster_ptr, DIRECTION dir)
+{
+    BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+    return (project_hook(caster_ptr, GF_JAM_DOOR, dir, 20 + randint1(30), flg));
+}
+
+/*!
+ * @brief ドア破壊処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool destroy_door(player_type *caster_ptr, DIRECTION dir)
+{
+    BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+    return (project_hook(caster_ptr, GF_KILL_DOOR, dir, 0, flg));
+}
+
+/*!
+ * @brief トラップ解除処理
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool disarm_trap(player_type *caster_ptr, DIRECTION dir)
+{
+    BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+    return (project_hook(caster_ptr, GF_KILL_TRAP, dir, 0, flg));
+}
diff --git a/src/spell/spells-beam.h b/src/spell/spells-beam.h
new file mode 100644 (file)
index 0000000..afb4e8c
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+#include "system/angband.h"
+
+bool wall_to_mud(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
+bool wizard_lock(player_type *caster_ptr, DIRECTION dir);
+bool destroy_door(player_type *caster_ptr, DIRECTION dir);
+bool disarm_trap(player_type *caster_ptr, DIRECTION dir);
index af74d43..a396925 100644 (file)
@@ -84,59 +84,6 @@ bool hypodynamic_bolt(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam)
 
 
 /*!
- * @brief 岩石溶解処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @param dam 威力
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool wall_to_mud(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam)
-{
-       BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-       return (project_hook(caster_ptr, GF_KILL_WALL, dir, dam, flg));
-}
-
-
-/*!
- * @brief 魔法の施錠処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool wizard_lock(player_type *caster_ptr, DIRECTION dir)
-{
-       BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
-       return (project_hook(caster_ptr, GF_JAM_DOOR, dir, 20 + randint1(30), flg));
-}
-
-
-/*!
- * @brief ドア破壊処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool destroy_door(player_type *caster_ptr, DIRECTION dir)
-{
-       BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
-       return (project_hook(caster_ptr, GF_KILL_DOOR, dir, 0, flg));
-}
-
-
-/*!
- * @brief トラップ解除処理
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
- * @return 作用が実際にあった場合TRUEを返す
- */
-bool disarm_trap(player_type *caster_ptr, DIRECTION dir)
-{
-       BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
-       return (project_hook(caster_ptr, GF_KILL_TRAP, dir, 0, flg));
-}
-
-
-/*!
  * @brief 死の光線処理
  * @param caster_ptr プレーヤーへの参照ポインタ
  * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
index e673e9d..b073fd8 100644 (file)
@@ -6,11 +6,7 @@ bool wall_stone(player_type *caster_ptr);
 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 wall_to_mud(player_type* caster_ptr, DIRECTION dir, HIT_POINT dam);
-bool destroy_door(player_type* caster_ptr, DIRECTION dir);
-bool disarm_trap(player_type* caster_ptr, DIRECTION dir);
-bool wizard_lock(player_type* caster_ptr, DIRECTION dir);
-bool door_creation(player_type* caster_ptr, POSITION y, POSITION x);
+bool door_creation(player_type *caster_ptr, POSITION y, POSITION x);
 bool trap_creation(player_type* caster_ptr, POSITION y, POSITION x);
 bool tree_creation(player_type* caster_ptr, POSITION y, POSITION x);
 bool glyph_creation(player_type* caster_ptr, POSITION y, POSITION x);