OSDN Git Service

[Refactor] #39963 Separated effect-characteristics.h from floor.h
authorHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 10:41:15 +0000 (19:41 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 6 May 2020 10:41:15 +0000 (19:41 +0900)
36 files changed:
Hengband/Hengband/Hengband.vcxproj
Hengband/Hengband/Hengband.vcxproj.filters
src/Makefile.am
src/cmd/cmd-activate.c
src/combat/melee.c
src/combat/shoot.c
src/effect/effect-characteristics.h [new file with mode: 0644]
src/effect/effect-feature.c
src/effect/effect-monster.c
src/effect/effect-player.c
src/floor.c
src/floor.h
src/grid.c
src/mind.c
src/monster/monster-move.c
src/monster1.c
src/monster2.c
src/mspells1.c
src/mspells2.c
src/mspells4.c
src/object-broken.c
src/player-move.c
src/realm/realm-chaos.c
src/realm/realm-crusade.c
src/realm/realm-death.c
src/realm/realm-hex.c
src/realm/realm-hissatsu.c
src/realm/realm-nature.c
src/realm/realm-song.c
src/spell/process-effect.c
src/spells-status.c
src/spells1.c
src/spells2.c
src/spells3.c
src/trap.c
src/view/display-main-window.c

index 806e5e9..53b1e67 100644 (file)
     <ClInclude Include="..\..\src\cmd\cmd-knowledge.h" />\r
     <ClInclude Include="..\..\src\cmd\cmd-process-screen.h" />\r
     <ClInclude Include="..\..\src\cmd\dump-util.h" />\r
+    <ClInclude Include="..\..\src\effect\effect-characteristics.h" />\r
     <ClInclude Include="..\..\src\effect\effect-feature.h" />\r
     <ClInclude Include="..\..\src\effect\effect-item.h" />\r
     <ClInclude Include="..\..\src\effect\effect-monster-charm.h" />\r
index 48ca90a..8381d9c 100644 (file)
     <ClInclude Include="..\..\src\spell\process-effect.h">
       <Filter>spell</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\effect\effect-characteristics.h">
+      <Filter>effect</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\wall.bmp" />
index b512d77..10e05bb 100644 (file)
@@ -186,6 +186,7 @@ hengband_SOURCES = \
        effect/effect-player-curse.c effect/effect-player-curse.h \
        effect/effect-player-spirit.c effect/effect-player-spirit.h \
        effect/effect-player-switcher.c effect/effect-player-switcher.h \
+       effect/effect-characteristics.h \
        \
        spell/technic-info-table.c spell/technic-info-table.h \
        spell/spells-execution.c spell/spells-execution.h \
index b2586c3..d1f22f5 100644 (file)
@@ -33,6 +33,7 @@
 #include "effect/spells-effect-util.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
  * @brief 装備耐性に準じたブレス効果の選択テーブル /
index a72d5b0..93cb283 100644 (file)
@@ -30,7 +30,7 @@
 #include "object-hook.h"
 #include "grid.h"
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "dungeon.h"
 #include "spell/process-effect.h"
 #include "spell/spells-type.h"
index 5d17df2..f4bf005 100644 (file)
@@ -15,7 +15,7 @@
 #include "player-personality.h"
 #include "object-hook.h"
 #include "object-broken.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "grid.h"
 #include "object-flavor.h"
 
diff --git a/src/effect/effect-characteristics.h b/src/effect/effect-characteristics.h
new file mode 100644 (file)
index 0000000..777f54b
--- /dev/null
@@ -0,0 +1,23 @@
+#pragma once
+
+/*
+ * project()関数に用いられる、遠隔攻撃特性ビットフラグ / Bit flags for the "project()" function
+ */
+typedef enum effect_characteristics {
+    PROJECT_JUMP = 0x0001, /*!< 発動者からの軌跡を持たず、指定地点に直接発生する(予め置いたトラップ、上空からの発生などのイメージ) / Jump directly to the target location (this is a hack) */
+    PROJECT_BEAM = 0x0002, /*!< ビーム範囲を持つ。 / Work as a beam weapon (affect every grid passed through) */
+    PROJECT_THRU = 0x0004, /*!< 目標地点に到達しても射程と遮蔽の限り引き延ばす。 / Continue "through" the target (used for "bolts"/"beams") */
+    PROJECT_STOP = 0x0008, /*!< 道中にプレイヤーかモンスターがいた時点で到達地点を更新して停止する(壁や森はPROJECT_DISIがない限り最初から貫通しない) */
+    PROJECT_GRID = 0x0010, /*!< 射程内の地形に影響を及ぼす / Affect each grid in the "blast area" in some way */
+    PROJECT_ITEM = 0x0020, /*!< 射程内のアイテムに影響を及ぼす / Affect each object in the "blast area" in some way */
+    PROJECT_KILL = 0x0040, /*!< 射程内のモンスターに影響を及ぼす / Affect each monster in the "blast area" in some way */
+    PROJECT_HIDE = 0x0080, /*!< 画面上にフィードバック表示させない / Disable "visual" feedback from projection */
+    PROJECT_DISI = 0x0100, /*!< 永久壁でない壁を破壊する / Disintegrate non-permanent features */
+    PROJECT_PLAYER = 0x0200, /*!< プレーヤー自身をターゲットにする (騎乗中) / Main target is player (used for riding player) */
+    PROJECT_AIMED = 0x0400, /*!<  / Target is only player or monster, so don't affect another. Depend on PROJECT_PLAYER. (used for minimum (rad == 0) balls on riding player) */
+    PROJECT_REFLECTABLE = 0x0800, /*!< 反射可能(ボルト系魔法に利用) / Refrectable spell attacks (used for "bolts") */
+    PROJECT_NO_HANGEKI = 0x1000, /*!< 反撃させない / Avoid counter attacks of monsters */
+    PROJECT_PATH = 0x2000, /*!< 軌跡の表示 / Only used for printing project path */
+    PROJECT_FAST = 0x4000, /*!< 炸裂するまで画面上に表示しない / Hide "visual" of flying bolts until blast */
+    PROJECT_LOS = 0x8000 /*!< 視線が通っているか(?) / Line of sight */
+} effect_characteristics;
index 4f65271..f1d30ab 100644 (file)
@@ -8,6 +8,7 @@
 #include "world.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h" // 暫定、後で消す.
+#include "effect/effect-characteristics.h"
 
 /*!
  * @brief 汎用的なビーム/ボルト/ボール系による地形効果処理 / We are called from "project()" to "damage" terrain features
index f3b4920..01f242a 100644 (file)
@@ -16,6 +16,7 @@
 #include "monster-status.h"
 #include "avatar.h"
 #include "spell/spells-type.h"
+#include "effect/effect-characteristics.h"
 
 /*!
  * @brief ビーム/ボルト/ボール系魔法によるモンスターへの効果があるかないかを判定する
index 3f4f455..740544a 100644 (file)
@@ -15,6 +15,7 @@
 #include "player-move.h"
 #include "spell/spells-type.h"
 #include "player-effects.h"
+#include "effect/effect-characteristics.h"
 
 typedef enum effect_player_check_result
 {
index 83a4ec9..370242f 100644 (file)
@@ -14,6 +14,7 @@
 #include "object/object-kind.h"
 #include "trap.h"
 #include "effect/spells-effect-util.h"
+#include "effect/effect-characteristics.h"
 
 /*
  * The array of floor [MAX_WID][MAX_HGT].
index 230860c..7534943 100644 (file)
@@ -363,25 +363,6 @@ extern void try_door(player_type *player_ptr, POSITION y, POSITION x);
 extern FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat);
 extern void vault_objects(player_type *player_ptr, POSITION y, POSITION x, int num);
 
-/*
- * project()関数に用いられる、遠隔攻撃特性ビットフラグ / Bit flags for the "project()" function
- */
-#define PROJECT_JUMP        0x0001 /*!< 遠隔攻撃特性: 発動者からの軌跡を持たず、指定地点に直接発生する(予め置いたトラップ、上空からの発生などのイメージ) / Jump directly to the target location (this is a hack) */
-#define PROJECT_BEAM        0x0002 /*!< 遠隔攻撃特性: ビーム範囲を持つ。 / Work as a beam weapon (affect every grid passed through) */
-#define PROJECT_THRU        0x0004 /*!< 遠隔攻撃特性: 目標地点に到達しても射程と遮蔽の限り引き延ばす。 / Continue "through" the target (used for "bolts"/"beams") */
-#define PROJECT_STOP        0x0008 /*!< 遠隔攻撃特性: 道中にプレイヤーかモンスターがいた時点で到達地点を更新して停止する(壁や森はPROJECT_DISIがない限り最初から貫通しない) */
-#define PROJECT_GRID        0x0010 /*!< 遠隔攻撃特性: 射程内の地形に影響を及ぼす / Affect each grid in the "blast area" in some way */
-#define PROJECT_ITEM        0x0020 /*!< 遠隔攻撃特性: 射程内のアイテムに影響を及ぼす / Affect each object in the "blast area" in some way */
-#define PROJECT_KILL        0x0040 /*!< 遠隔攻撃特性: 射程内のモンスターに影響を及ぼす / Affect each monster in the "blast area" in some way */
-#define PROJECT_HIDE        0x0080 /*!< 遠隔攻撃特性: / Hack -- disable "visual" feedback from projection */
-#define PROJECT_DISI        0x0100 /*!< 遠隔攻撃特性: / Disintegrate non-permanent features */
-#define PROJECT_PLAYER      0x0200 /*!< 遠隔攻撃特性: / Main target is player (used for riding player) */
-#define PROJECT_AIMED       0x0400 /*!< 遠隔攻撃特性: / Target is only player or monster, so don't affect another. Depend on PROJECT_PLAYER. (used for minimum (rad == 0) balls on riding player) */
-#define PROJECT_REFLECTABLE 0x0800 /*!< 遠隔攻撃特性: 反射可能(ボルト系魔法に利用) / Refrectable spell attacks (used for "bolts") */
-#define PROJECT_NO_HANGEKI  0x1000 /*!< 遠隔攻撃特性: / Avoid counter attacks of monsters */
-#define PROJECT_PATH        0x2000 /*!< 遠隔攻撃特性: / Only used for printing project path */
-#define PROJECT_FAST        0x4000 /*!< 遠隔攻撃特性: / Hide "visual" of flying bolts until blast */
-#define PROJECT_LOS         0x8000 /*!< 遠隔攻撃特性: /  */
 extern sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
 
 extern void set_floor(player_type *player_ptr, POSITION x, POSITION y);
index f5440e9..1b33ddb 100644 (file)
@@ -37,6 +37,7 @@
 #include "view/display-main-window.h"
 #include "realm/realm-song.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 #define MONSTER_FLOW_DEPTH 32 /*!< 敵のプレイヤーに対する移動道のりの最大値(この値以上は処理を打ち切る) / OPTION: Maximum flow depth when using "MONSTER_FLOW" */
 
index cf0e96e..cd5ce16 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "mind.h"
 
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "melee.h"
 #include "spells-summon.h"
 #include "avatar.h"
index 8729f3b..6cf0f1e 100644 (file)
@@ -15,6 +15,7 @@
 #include "player-move.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_ptr)
 {
index 847d9ed..6a340ba 100644 (file)
@@ -19,7 +19,7 @@
 #include "cmd/cmd-dump.h"
 #include "market/building.h"
 #include "cmd-pet.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "object/object-kind-hook.h"
 #include "player-personality.h"
 #include "monster.h"
index d3697e8..cb6f6bd 100644 (file)
@@ -19,7 +19,7 @@
 #include "cmd/cmd-dump.h"
 #include "cmd-pet.h"
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "object-flavor.h"
 #include "monsterrace-hook.h"
 #include "monster-status.h"
index 0645a65..973f434 100644 (file)
@@ -41,7 +41,7 @@
 #include "angband.h"
 #include "util.h"
 
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "dungeon.h"
 #include "grid.h"
 #include "object-curse.h"
index 0ac4bff..d278738 100644 (file)
@@ -16,7 +16,7 @@
 #include "main/sound-definitions-table.h"
 
 #include "cmd-pet.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "grid.h"
 #include "quest.h"
 #include "realm/realm-hex.h"
index e01f965..02e57f6 100644 (file)
@@ -9,7 +9,7 @@
 #include "util.h"
 #include "main/sound-definitions-table.h"
 
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "grid.h"
 #include "spells-summon.h"
 #include "artifact.h"
index f34e095..fb89e32 100644 (file)
@@ -3,6 +3,7 @@
 #include "snipe.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
 * @brief アイテムが酸で破損するかどうかを判定する
index 4daf536..fe3fa7b 100644 (file)
 #include "realm/realm-song.h"
 #include "autopick/autopick.h"
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "melee.h"
 #include "grid.h"
 #include "trap.h"
index fed2ce7..00cae1a 100644 (file)
@@ -14,6 +14,7 @@
 #include "realm/realm-chaos.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
 * @brief カオス領域魔法の各処理を行う
index 900291c..cd7f3b2 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "world.h"
 #include "cmd-spell.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "spell/spells-type.h"
 #include "spells-object.h"
 #include "spells-summon.h"
index c7dcc9e..9ae2b24 100644 (file)
@@ -14,6 +14,7 @@
 #include "player-race.h"
 #include "realm/realm-death.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
 * @brief 暗黒領域魔法の各処理を行う
index 4ad38b6..ea1a7ce 100644 (file)
@@ -18,7 +18,7 @@
 #include "angband.h"
 #include "util.h"
 
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "cmd-spell.h"
 #include "cmd-quaff.h"
 #include "object-flavor.h"
index 92a7b2e..0e64017 100644 (file)
@@ -5,7 +5,7 @@
 #include "cmd-spell.h"
 #include "cmd-basic.h"
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "melee.h"
 #include "monsterrace-hook.h"
 #include "artifact.h"
index 63c5753..86d8704 100644 (file)
@@ -16,6 +16,7 @@
 #include "realm/realm-nature.h"
 #include "spell/spells-type.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
 * @brief 自然領域魔法の各処理を行う
index a283393..e1b72fe 100644 (file)
@@ -11,6 +11,7 @@
 #include "view/display-main-window.h"
 #include "realm/realm-song.h"
 #include "spell/process-effect.h"
+#include "effect/effect-characteristics.h"
 
 /*!
 * @brief 歌の開始を処理する / Start singing if the player is a Bard
index 09e0a9d..a06f174 100644 (file)
@@ -11,6 +11,7 @@
 #include "main/sound-definitions-table.h"
 #include "spell/spells-type.h"
 #include "view/display-main-window.h" // 暫定、後で消すかも.
+#include "effect/effect-characteristics.h"
 
 /*!
  * @brief 配置した鏡リストの次を取得する /
index c973b9c..6b671f1 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "cmd-magiceat.h"
 #include "avatar.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "object-flavor.h"
 #include "player-status.h"
 #include "player-class.h"
index 344d17f..b32fb05 100644 (file)
@@ -26,6 +26,7 @@
 #include "effect/effect-feature.h"
 #include "effect/effect-item.h"
 #include "effect/effect-monster.h"
+#include "effect/effect-characteristics.h"
 
 /*
  * Find the distance from (x, y) to a line.
index 5c9cf94..06f1e36 100644 (file)
@@ -22,7 +22,7 @@
 #include "io/write-diary.h"
 #include "cmd/cmd-pet.h"
 #include "cmd/cmd-dump.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "grid.h"
 #include "trap.h"
 #include "monsterrace-hook.h"
index ad04abe..6f04fa9 100644 (file)
@@ -22,7 +22,7 @@
 #include "creature.h"
 
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "floor-town.h"
 #include "object-boost.h"
 #include "object-flavor.h"
index f87eaae..4d9a4b6 100644 (file)
@@ -18,7 +18,7 @@
 #include "player-status.h"
 #include "grid.h"
 #include "spell/spells-type.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "floor-save.h"
 #include "init.h"
 #include "files.h"
index 27764f0..d88bc3c 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "grid.h"
 #include "dungeon.h"
-#include "floor.h"
+#include "effect/effect-characteristics.h"
 #include "floor-town.h"
 #include "feature.h"
 #include "object/object-kind.h"