OSDN Git Service

[Refactor] #37353 spells1.h, spells2.h の宣言を整理.
authordeskull <deskull@users.sourceforge.jp>
Fri, 3 May 2019 01:39:53 +0000 (10:39 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Fri, 3 May 2019 01:39:53 +0000 (10:39 +0900)
src/externs.h
src/floor-save.c
src/floor-streams.c
src/geometry.c
src/monster-status.c
src/object.h
src/player-effects.h
src/spells-summon.c
src/spells.h
src/xtra2.c

index 60b17a6..bf9a773 100644 (file)
@@ -342,142 +342,6 @@ extern bool load_player(void);
 extern void remove_loc(void);
 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
 
-/* spells1.c */
-extern PERCENTAGE beam_chance(void);
-extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern void breath_shape(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 int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
-extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
-extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
-extern int project_length;
-extern bool binding_field(HIT_POINT dam);
-extern void seal_of_mirror(HIT_POINT dam);
-extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
-
-/* spells2.c */
-extern bool detect_traps(POSITION range, bool known);
-extern bool detect_doors(POSITION range);
-extern bool detect_stairs(POSITION range);
-extern bool detect_treasure(POSITION range);
-extern bool detect_objects_gold(POSITION range);
-extern bool detect_objects_normal(POSITION range);
-extern bool detect_objects_magic(POSITION range);
-extern bool detect_monsters_normal(POSITION range);
-extern bool detect_monsters_invis(POSITION range);
-extern bool detect_monsters_evil(POSITION range);
-extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
-extern bool detect_monsters_string(POSITION range, concptr);
-extern bool detect_monsters_nonliving(POSITION range);
-extern bool detect_monsters_mind(POSITION range);
-extern bool detect_all(POSITION range);
-extern bool wall_stone(void);
-extern bool speed_monsters(void);
-extern bool slow_monsters(int power);
-extern bool sleep_monsters(int power);
-extern void aggravate_monsters(MONSTER_IDX who);
-extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
-extern bool symbol_genocide(int power, bool player_cast);
-extern bool mass_genocide(int power, bool player_cast);
-extern bool mass_genocide_undead(int power, bool player_cast);
-extern bool probing(void);
-extern bool banish_evil(int dist);
-extern bool dispel_evil(HIT_POINT dam);
-extern bool dispel_good(HIT_POINT dam);
-extern bool dispel_undead(HIT_POINT dam);
-extern bool dispel_monsters(HIT_POINT dam);
-extern bool dispel_living(HIT_POINT dam);
-extern bool dispel_demons(HIT_POINT dam);
-extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
-extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
-extern bool crusade(void);
-extern bool turn_undead(void);
-extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
-extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
-extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
-extern void lite_room(POSITION y1, POSITION x1);
-extern bool starlight(bool magic);
-extern void unlite_room(POSITION y1, POSITION x1);
-extern bool lite_area(HIT_POINT dam, POSITION rad);
-extern bool unlite_area(HIT_POINT dam, POSITION rad);
-extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
-extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
-extern void call_chaos(void);
-extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
-extern bool lite_line(DIRECTION dir, HIT_POINT dam);
-extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
-extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
-extern bool destroy_door(DIRECTION dir);
-extern bool disarm_trap(DIRECTION dir);
-extern bool wizard_lock(DIRECTION dir);
-extern bool teleport_monster(DIRECTION dir, int distance);
-extern bool door_creation(void);
-extern bool trap_creation(POSITION y, POSITION x);
-extern bool tree_creation(void);
-extern bool glyph_creation(void);
-extern bool destroy_doors_touch(void);
-extern bool disarm_traps_touch(void);
-extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
-extern bool sleep_monsters_touch(void);
-extern bool activate_ty_curse(bool stop_ty, int *count);
-extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
-extern void wall_breaker(void);
-extern bool confuse_monsters(HIT_POINT dam);
-extern bool charm_monsters(HIT_POINT dam);
-extern bool charm_animals(HIT_POINT dam);
-extern bool stun_monsters(HIT_POINT dam);
-extern bool stasis_monsters(HIT_POINT dam);
-extern bool banish_monsters(int dist);
-extern bool turn_monsters(HIT_POINT dam);
-extern bool turn_evil(HIT_POINT dam);
-extern bool deathray_monsters(void);
-extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
-extern bool mindblast_monsters(HIT_POINT dam);
-extern s32b flag_cost(object_type *o_ptr, int plusses);
-extern bool teleport_swap(DIRECTION dir);
-extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
-extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
-extern bool eat_magic(int power);
-extern void discharge_minion(void);
-extern bool kawarimi(bool success);
-extern bool rush_attack(bool *mdeath);
-extern void remove_all_mirrors(bool explode);
-extern void ring_of_power(DIRECTION dir);
-extern void wild_magic(int spell);
-extern void cast_meteor(HIT_POINT dam, POSITION rad);
-extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
-extern void cast_wonder(DIRECTION dir);
-extern void cast_invoke_spirits(DIRECTION dir);
-extern void cast_shuffle(void);
-extern void stop_mouth(void);
-extern bool_hack vampirism(void);
-extern bool panic_hit(void);
-extern bool psychometry(void);
-extern bool draconian_breath(player_type *creature_ptr);
-extern bool android_inside_weapon(player_type *creature_ptr);
-extern bool create_ration(player_type *crature_ptr);
-extern void hayagake(player_type *creature_ptr);
-extern bool double_attack(player_type *creature_ptr);
-extern bool comvert_hp_to_mp(player_type *creature_ptr);
-extern bool comvert_mp_to_hp(player_type *creature_ptr);
-extern bool demonic_breath(player_type *creature_ptr);
-extern bool mirror_concentration(player_type *creature_ptr);
-extern bool sword_dancing(player_type *creature_ptr);
-extern bool confusing_light(player_type *creature_ptr);
-extern bool rodeo(player_type *creature_ptr);
-extern bool clear_mind(player_type *creature_ptr);
-extern bool concentration(player_type *creature_ptr);
-
 /* xtra1.c */
 extern void handle_stuff(void);
 extern void update_output(void);
index 288de45..e31d4ad 100644 (file)
@@ -31,6 +31,7 @@
 #include "files.h"
 #include "player-effects.h"
 #include "world.h"
+#include "spells.h"
 
 static FLOOR_IDX new_floor_id;  /*!<次のフロアのID / floor_id of the destination */
 static u32b change_floor_mode;  /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
index 1eb85b8..e80ff5e 100644 (file)
@@ -28,6 +28,7 @@
 #include "feature.h"
 #include "object-flavor.h"
 #include "object-hook.h"
+#include "spells.h"
 
 
 /*!
index 4d4fe81..075d78a 100644 (file)
@@ -1,6 +1,6 @@
 #include "angband.h"
 #include "floor.h"
-
+#include "spells.h"
 
 /*!
  * @brief 2点間の距離をニュートン・ラプソン法で算出する / Distance between two points via Newton-Raphson technique
index fe3df25..b0075e0 100644 (file)
@@ -8,6 +8,7 @@
 #include "monster-status.h"
 #include "monster-spell.h"
 #include "monster-process.h"
+#include "spells.h"
 #include "spells-summon.h"
 #include "monsterrace-hook.h"
 #include "object-curse.h"
index ba37c6b..70047eb 100644 (file)
@@ -171,4 +171,6 @@ extern void display_koff(KIND_OBJECT_IDX k_idx);
 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);
-extern concptr essence_name[];
\ No newline at end of file
+extern concptr essence_name[];
+
+extern s32b flag_cost(object_type *o_ptr, int plusses);
index 5a1f203..b3c91b2 100644 (file)
@@ -10,6 +10,7 @@ struct kamae
 };
 
 /* effects.c */
+extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
 extern void set_action(ACTION_IDX typ);
 extern void reset_tim_flags(void);
 extern void dispel_player(void);
index a4348fe..fbbeb4d 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "util.h"
 
+#include "spells.h"
 #include "spells-summon.h"
 #include "monster-status.h"
 #include "floor.h"
index f01c62f..1ce2dcb 100644 (file)
@@ -128,6 +128,140 @@ struct magic_type
 
 extern const magic_type technic_info[NUM_TECHNIC][32];
 
+/* spells1.c */
+extern PERCENTAGE beam_chance(void);
+extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+extern void breath_shape(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 u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
+extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
+extern int project_length;
+extern bool binding_field(HIT_POINT dam);
+extern void seal_of_mirror(HIT_POINT dam);
+extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
+
+/* spells2.c */
+extern bool detect_traps(POSITION range, bool known);
+extern bool detect_doors(POSITION range);
+extern bool detect_stairs(POSITION range);
+extern bool detect_treasure(POSITION range);
+extern bool detect_objects_gold(POSITION range);
+extern bool detect_objects_normal(POSITION range);
+extern bool detect_objects_magic(POSITION range);
+extern bool detect_monsters_normal(POSITION range);
+extern bool detect_monsters_invis(POSITION range);
+extern bool detect_monsters_evil(POSITION range);
+extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
+extern bool detect_monsters_string(POSITION range, concptr);
+extern bool detect_monsters_nonliving(POSITION range);
+extern bool detect_monsters_mind(POSITION range);
+extern bool detect_all(POSITION range);
+extern bool wall_stone(void);
+extern bool speed_monsters(void);
+extern bool slow_monsters(int power);
+extern bool sleep_monsters(int power);
+extern void aggravate_monsters(MONSTER_IDX who);
+extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
+extern bool symbol_genocide(int power, bool player_cast);
+extern bool mass_genocide(int power, bool player_cast);
+extern bool mass_genocide_undead(int power, bool player_cast);
+extern bool probing(void);
+extern bool banish_evil(int dist);
+extern bool dispel_evil(HIT_POINT dam);
+extern bool dispel_good(HIT_POINT dam);
+extern bool dispel_undead(HIT_POINT dam);
+extern bool dispel_monsters(HIT_POINT dam);
+extern bool dispel_living(HIT_POINT dam);
+extern bool dispel_demons(HIT_POINT dam);
+extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
+extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
+extern bool crusade(void);
+extern bool turn_undead(void);
+extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
+extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
+extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
+extern void lite_room(POSITION y1, POSITION x1);
+extern bool starlight(bool magic);
+extern void unlite_room(POSITION y1, POSITION x1);
+extern bool lite_area(HIT_POINT dam, POSITION rad);
+extern bool unlite_area(HIT_POINT dam, POSITION rad);
+extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
+extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
+extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
+extern void call_chaos(void);
+extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
+extern bool lite_line(DIRECTION dir, HIT_POINT dam);
+extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
+extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
+extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
+extern bool destroy_door(DIRECTION dir);
+extern bool disarm_trap(DIRECTION dir);
+extern bool wizard_lock(DIRECTION dir);
+extern bool teleport_monster(DIRECTION dir, int distance);
+extern bool door_creation(void);
+extern bool trap_creation(POSITION y, POSITION x);
+extern bool tree_creation(void);
+extern bool glyph_creation(void);
+extern bool destroy_doors_touch(void);
+extern bool disarm_traps_touch(void);
+extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
+extern bool sleep_monsters_touch(void);
+extern bool activate_ty_curse(bool stop_ty, int *count);
+extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
+extern void wall_breaker(void);
+extern bool confuse_monsters(HIT_POINT dam);
+extern bool charm_monsters(HIT_POINT dam);
+extern bool charm_animals(HIT_POINT dam);
+extern bool stun_monsters(HIT_POINT dam);
+extern bool stasis_monsters(HIT_POINT dam);
+extern bool banish_monsters(int dist);
+extern bool turn_monsters(HIT_POINT dam);
+extern bool turn_evil(HIT_POINT dam);
+extern bool deathray_monsters(void);
+extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
+extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
+extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
+extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
+extern bool mindblast_monsters(HIT_POINT dam);
+extern bool teleport_swap(DIRECTION dir);
+extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
+extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
+extern bool eat_magic(int power);
+extern void discharge_minion(void);
+extern bool kawarimi(bool success);
+extern bool rush_attack(bool *mdeath);
+extern void remove_all_mirrors(bool explode);
+extern void ring_of_power(DIRECTION dir);
+extern void wild_magic(int spell);
+extern void cast_meteor(HIT_POINT dam, POSITION rad);
+extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
+extern void cast_wonder(DIRECTION dir);
+extern void cast_invoke_spirits(DIRECTION dir);
+extern void cast_shuffle(void);
+extern void stop_mouth(void);
+extern bool_hack vampirism(void);
+extern bool panic_hit(void);
+extern bool psychometry(void);
+extern bool draconian_breath(player_type *creature_ptr);
+extern bool android_inside_weapon(player_type *creature_ptr);
+extern bool create_ration(player_type *crature_ptr);
+extern void hayagake(player_type *creature_ptr);
+extern bool double_attack(player_type *creature_ptr);
+extern bool comvert_hp_to_mp(player_type *creature_ptr);
+extern bool comvert_mp_to_hp(player_type *creature_ptr);
+extern bool demonic_breath(player_type *creature_ptr);
+extern bool mirror_concentration(player_type *creature_ptr);
+extern bool sword_dancing(player_type *creature_ptr);
+extern bool confusing_light(player_type *creature_ptr);
+extern bool rodeo(player_type *creature_ptr);
+extern bool clear_mind(player_type *creature_ptr);
+extern bool concentration(player_type *creature_ptr);
+
 /* spells3.c */
 extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
 extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode);
index 29da228..a3934bb 100644 (file)
@@ -35,6 +35,7 @@
 #include "feature.h"
 #include "quest.h"
 #include "dungeon.h"
+#include "spells.h"
 
 /*!
  * @brief コンソール上におけるマップ表示の左上位置を返す /