OSDN Git Service

[Refactor] #39963 Moved PROJECT_WHO_* from spells.h to spells-util.h and made them...
authorHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 14:12:19 +0000 (23:12 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 14:12:19 +0000 (23:12 +0900)
src/effect/effect-player.c
src/spell/spells-type.h
src/spell/spells-util.h
src/spells.h

index 2804872..d67ddbb 100644 (file)
@@ -25,7 +25,7 @@
 
 /*!
  * @brief 汎用的なビーム/ボルト/ボール系によるプレイヤーへの効果処理 / Helper function for "project()" below.
- * @param who 魔法を発動したモンスター(0ならばプレイヤー) / Index of "source" monster (zero for "player")
+ * @param who 魔法を発動したモンスター(0ならばプレイヤー、負値ならば自然発生) / Index of "source" monster (zero for "player")
  * @param who_name 効果を起こしたモンスターの名前
  * @param r 効果半径(ビーム/ボルト = 0 / ボール = 1以上) / Radius of explosion (0 = beam/bolt, 1 to 9 = ball)
  * @param y 目標Y座標 / Target y location (or location to travel "towards")
index 4d64e82..dd0a556 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-typedef enum
+typedef enum spells_type
 {
        GF_ELEC = 1,                            /*!< 魔法効果: 電撃*/
        GF_POIS = 2,                            /*!< 魔法効果: 毒*/
@@ -101,5 +101,5 @@ typedef enum
        GF_CRUSADE = 114,                       /*!< 魔法効果: 聖戦*/
        GF_STASIS_EVIL = 115,           /*!< 魔法効果: 邪悪拘束*/
        GF_WOUNDS = 116,                        /*!< 魔法効果: 創傷*/
-       MAX_GF = 117,
+       MAX_GF = 117,                           /*!< 欠番を無視した最大サイズ (直上の値+1) */
 } spells_type;
index 787b287..39bbbe1 100644 (file)
@@ -29,3 +29,9 @@ typedef enum teleport_flags
        TELEPORT_PASSIVE                = 0x0002,
        TELEPORT_DEC_VALOUR             = 0x0004
 } teleport_flags;
+
+typedef enum autogenesis_magical_effect
+{
+       PROJECT_WHO_UNCTRL_POWER = -1, /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
+       PROJECT_WHO_GLASS_SHARDS = -2 /*!< 魔法効果の自然発生要因: 破壊されたガラス地形の破片 */
+} autogenesis_magical_effect;
index 1c306c5..073a6ad 100644 (file)
@@ -5,11 +5,7 @@
 extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
 extern void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
 extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-
-#define PROJECT_WHO_UNCTRL_POWER -1 /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
-#define PROJECT_WHO_GLASS_SHARDS -2 /*!< 魔法効果の自然発生要因: 破壊されたガラス地形の破片 */
 extern bool project(player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
-
 extern bool binding_field(player_type *caster_ptr, HIT_POINT dam);
 extern void seal_of_mirror(player_type *caster_ptr, HIT_POINT dam);
 extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);