• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision89e004fbceeeb5061fa545413b3271aca96a85dd (tree)
Time2019-05-03 10:39:53
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 spells1.h, spells2.h の宣言を整理.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -342,142 +342,6 @@ extern bool load_player(void);
342342 extern void remove_loc(void);
343343 extern bool save_floor(saved_floor_type *sf_ptr, BIT_FLAGS mode);
344344
345-/* spells1.c */
346-extern PERCENTAGE beam_chance(void);
347-extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
348-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);
349-extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
350-extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
351-extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
352-extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
353-extern int project_length;
354-extern bool binding_field(HIT_POINT dam);
355-extern void seal_of_mirror(HIT_POINT dam);
356-extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
357-
358-/* spells2.c */
359-extern bool detect_traps(POSITION range, bool known);
360-extern bool detect_doors(POSITION range);
361-extern bool detect_stairs(POSITION range);
362-extern bool detect_treasure(POSITION range);
363-extern bool detect_objects_gold(POSITION range);
364-extern bool detect_objects_normal(POSITION range);
365-extern bool detect_objects_magic(POSITION range);
366-extern bool detect_monsters_normal(POSITION range);
367-extern bool detect_monsters_invis(POSITION range);
368-extern bool detect_monsters_evil(POSITION range);
369-extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
370-extern bool detect_monsters_string(POSITION range, concptr);
371-extern bool detect_monsters_nonliving(POSITION range);
372-extern bool detect_monsters_mind(POSITION range);
373-extern bool detect_all(POSITION range);
374-extern bool wall_stone(void);
375-extern bool speed_monsters(void);
376-extern bool slow_monsters(int power);
377-extern bool sleep_monsters(int power);
378-extern void aggravate_monsters(MONSTER_IDX who);
379-extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
380-extern bool symbol_genocide(int power, bool player_cast);
381-extern bool mass_genocide(int power, bool player_cast);
382-extern bool mass_genocide_undead(int power, bool player_cast);
383-extern bool probing(void);
384-extern bool banish_evil(int dist);
385-extern bool dispel_evil(HIT_POINT dam);
386-extern bool dispel_good(HIT_POINT dam);
387-extern bool dispel_undead(HIT_POINT dam);
388-extern bool dispel_monsters(HIT_POINT dam);
389-extern bool dispel_living(HIT_POINT dam);
390-extern bool dispel_demons(HIT_POINT dam);
391-extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
392-extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
393-extern bool crusade(void);
394-extern bool turn_undead(void);
395-extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
396-extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
397-extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
398-extern void lite_room(POSITION y1, POSITION x1);
399-extern bool starlight(bool magic);
400-extern void unlite_room(POSITION y1, POSITION x1);
401-extern bool lite_area(HIT_POINT dam, POSITION rad);
402-extern bool unlite_area(HIT_POINT dam, POSITION rad);
403-extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
404-extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
405-extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
406-extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
407-extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
408-extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
409-extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
410-extern void call_chaos(void);
411-extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
412-extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
413-extern bool lite_line(DIRECTION dir, HIT_POINT dam);
414-extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
415-extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
416-extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
417-extern bool destroy_door(DIRECTION dir);
418-extern bool disarm_trap(DIRECTION dir);
419-extern bool wizard_lock(DIRECTION dir);
420-extern bool teleport_monster(DIRECTION dir, int distance);
421-extern bool door_creation(void);
422-extern bool trap_creation(POSITION y, POSITION x);
423-extern bool tree_creation(void);
424-extern bool glyph_creation(void);
425-extern bool destroy_doors_touch(void);
426-extern bool disarm_traps_touch(void);
427-extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
428-extern bool sleep_monsters_touch(void);
429-extern bool activate_ty_curse(bool stop_ty, int *count);
430-extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
431-extern void wall_breaker(void);
432-extern bool confuse_monsters(HIT_POINT dam);
433-extern bool charm_monsters(HIT_POINT dam);
434-extern bool charm_animals(HIT_POINT dam);
435-extern bool stun_monsters(HIT_POINT dam);
436-extern bool stasis_monsters(HIT_POINT dam);
437-extern bool banish_monsters(int dist);
438-extern bool turn_monsters(HIT_POINT dam);
439-extern bool turn_evil(HIT_POINT dam);
440-extern bool deathray_monsters(void);
441-extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
442-extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
443-extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
444-extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
445-extern bool mindblast_monsters(HIT_POINT dam);
446-extern s32b flag_cost(object_type *o_ptr, int plusses);
447-extern bool teleport_swap(DIRECTION dir);
448-extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
449-extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
450-extern bool eat_magic(int power);
451-extern void discharge_minion(void);
452-extern bool kawarimi(bool success);
453-extern bool rush_attack(bool *mdeath);
454-extern void remove_all_mirrors(bool explode);
455-extern void ring_of_power(DIRECTION dir);
456-extern void wild_magic(int spell);
457-extern void cast_meteor(HIT_POINT dam, POSITION rad);
458-extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
459-extern void cast_wonder(DIRECTION dir);
460-extern void cast_invoke_spirits(DIRECTION dir);
461-extern void cast_shuffle(void);
462-extern void stop_mouth(void);
463-extern bool_hack vampirism(void);
464-extern bool panic_hit(void);
465-extern bool psychometry(void);
466-extern bool draconian_breath(player_type *creature_ptr);
467-extern bool android_inside_weapon(player_type *creature_ptr);
468-extern bool create_ration(player_type *crature_ptr);
469-extern void hayagake(player_type *creature_ptr);
470-extern bool double_attack(player_type *creature_ptr);
471-extern bool comvert_hp_to_mp(player_type *creature_ptr);
472-extern bool comvert_mp_to_hp(player_type *creature_ptr);
473-extern bool demonic_breath(player_type *creature_ptr);
474-extern bool mirror_concentration(player_type *creature_ptr);
475-extern bool sword_dancing(player_type *creature_ptr);
476-extern bool confusing_light(player_type *creature_ptr);
477-extern bool rodeo(player_type *creature_ptr);
478-extern bool clear_mind(player_type *creature_ptr);
479-extern bool concentration(player_type *creature_ptr);
480-
481345 /* xtra1.c */
482346 extern void handle_stuff(void);
483347 extern void update_output(void);
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -31,6 +31,7 @@
3131 #include "files.h"
3232 #include "player-effects.h"
3333 #include "world.h"
34+#include "spells.h"
3435
3536 static FLOOR_IDX new_floor_id; /*!<次のフロアのID / floor_id of the destination */
3637 static u32b change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
--- a/src/floor-streams.c
+++ b/src/floor-streams.c
@@ -28,6 +28,7 @@
2828 #include "feature.h"
2929 #include "object-flavor.h"
3030 #include "object-hook.h"
31+#include "spells.h"
3132
3233
3334 /*!
--- a/src/geometry.c
+++ b/src/geometry.c
@@ -1,6 +1,6 @@
11 #include "angband.h"
22 #include "floor.h"
3-
3+#include "spells.h"
44
55 /*!
66 * @brief 2点間の距離をニュートン・ラプソン法で算出する / Distance between two points via Newton-Raphson technique
--- a/src/monster-status.c
+++ b/src/monster-status.c
@@ -8,6 +8,7 @@
88 #include "monster-status.h"
99 #include "monster-spell.h"
1010 #include "monster-process.h"
11+#include "spells.h"
1112 #include "spells-summon.h"
1213 #include "monsterrace-hook.h"
1314 #include "object-curse.h"
--- a/src/object.h
+++ b/src/object.h
@@ -171,4 +171,6 @@ extern void display_koff(KIND_OBJECT_IDX k_idx);
171171 extern void torch_flags(object_type *o_ptr, BIT_FLAGS *flgs);
172172 extern void torch_dice(object_type *o_ptr, DICE_NUMBER *dd, DICE_SID *ds);
173173 extern void torch_lost_fuel(object_type *o_ptr);
174-extern concptr essence_name[];
\ No newline at end of file
174+extern concptr essence_name[];
175+
176+extern s32b flag_cost(object_type *o_ptr, int plusses);
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -10,6 +10,7 @@ struct kamae
1010 };
1111
1212 /* effects.c */
13+extern int take_hit(int damage_type, HIT_POINT damage, concptr kb_str, int monspell);
1314 extern void set_action(ACTION_IDX typ);
1415 extern void reset_tim_flags(void);
1516 extern void dispel_player(void);
--- a/src/spells-summon.c
+++ b/src/spells-summon.c
@@ -1,6 +1,7 @@
11 #include "angband.h"
22 #include "util.h"
33
4+#include "spells.h"
45 #include "spells-summon.h"
56 #include "monster-status.h"
67 #include "floor.h"
--- a/src/spells.h
+++ b/src/spells.h
@@ -128,6 +128,140 @@ struct magic_type
128128
129129 extern const magic_type technic_info[NUM_TECHNIC][32];
130130
131+/* spells1.c */
132+extern PERCENTAGE beam_chance(void);
133+extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
134+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);
135+extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ);
136+extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
137+extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell);
138+extern int project_length;
139+extern bool binding_field(HIT_POINT dam);
140+extern void seal_of_mirror(HIT_POINT dam);
141+extern concptr spell_category_name(OBJECT_TYPE_VALUE tval);
142+
143+/* spells2.c */
144+extern bool detect_traps(POSITION range, bool known);
145+extern bool detect_doors(POSITION range);
146+extern bool detect_stairs(POSITION range);
147+extern bool detect_treasure(POSITION range);
148+extern bool detect_objects_gold(POSITION range);
149+extern bool detect_objects_normal(POSITION range);
150+extern bool detect_objects_magic(POSITION range);
151+extern bool detect_monsters_normal(POSITION range);
152+extern bool detect_monsters_invis(POSITION range);
153+extern bool detect_monsters_evil(POSITION range);
154+extern bool detect_monsters_xxx(POSITION range, u32b match_flag);
155+extern bool detect_monsters_string(POSITION range, concptr);
156+extern bool detect_monsters_nonliving(POSITION range);
157+extern bool detect_monsters_mind(POSITION range);
158+extern bool detect_all(POSITION range);
159+extern bool wall_stone(void);
160+extern bool speed_monsters(void);
161+extern bool slow_monsters(int power);
162+extern bool sleep_monsters(int power);
163+extern void aggravate_monsters(MONSTER_IDX who);
164+extern bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, concptr spell_name);
165+extern bool symbol_genocide(int power, bool player_cast);
166+extern bool mass_genocide(int power, bool player_cast);
167+extern bool mass_genocide_undead(int power, bool player_cast);
168+extern bool probing(void);
169+extern bool banish_evil(int dist);
170+extern bool dispel_evil(HIT_POINT dam);
171+extern bool dispel_good(HIT_POINT dam);
172+extern bool dispel_undead(HIT_POINT dam);
173+extern bool dispel_monsters(HIT_POINT dam);
174+extern bool dispel_living(HIT_POINT dam);
175+extern bool dispel_demons(HIT_POINT dam);
176+extern bool cleansing_nova(player_type *creature_ptr, bool magic, bool powerful);
177+extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
178+extern bool crusade(void);
179+extern bool turn_undead(void);
180+extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
181+extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
182+extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
183+extern void lite_room(POSITION y1, POSITION x1);
184+extern bool starlight(bool magic);
185+extern void unlite_room(POSITION y1, POSITION x1);
186+extern bool lite_area(HIT_POINT dam, POSITION rad);
187+extern bool unlite_area(HIT_POINT dam, POSITION rad);
188+extern bool fire_ball(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
189+extern bool fire_breath(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
190+extern bool fire_rocket(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
191+extern bool fire_ball_hide(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
192+extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
193+extern bool fire_bolt(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
194+extern bool fire_blast(EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
195+extern void call_chaos(void);
196+extern bool fire_beam(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
197+extern bool fire_bolt_or_beam(PERCENTAGE prob, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
198+extern bool lite_line(DIRECTION dir, HIT_POINT dam);
199+extern bool hypodynamic_bolt(DIRECTION dir, HIT_POINT dam);
200+extern bool death_ray(DIRECTION dir, PLAYER_LEVEL plev);
201+extern bool wall_to_mud(DIRECTION dir, HIT_POINT dam);
202+extern bool destroy_door(DIRECTION dir);
203+extern bool disarm_trap(DIRECTION dir);
204+extern bool wizard_lock(DIRECTION dir);
205+extern bool teleport_monster(DIRECTION dir, int distance);
206+extern bool door_creation(void);
207+extern bool trap_creation(POSITION y, POSITION x);
208+extern bool tree_creation(void);
209+extern bool glyph_creation(void);
210+extern bool destroy_doors_touch(void);
211+extern bool disarm_traps_touch(void);
212+extern bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x);
213+extern bool sleep_monsters_touch(void);
214+extern bool activate_ty_curse(bool stop_ty, int *count);
215+extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet);
216+extern void wall_breaker(void);
217+extern bool confuse_monsters(HIT_POINT dam);
218+extern bool charm_monsters(HIT_POINT dam);
219+extern bool charm_animals(HIT_POINT dam);
220+extern bool stun_monsters(HIT_POINT dam);
221+extern bool stasis_monsters(HIT_POINT dam);
222+extern bool banish_monsters(int dist);
223+extern bool turn_monsters(HIT_POINT dam);
224+extern bool turn_evil(HIT_POINT dam);
225+extern bool deathray_monsters(void);
226+extern bool charm_monster(DIRECTION dir, PLAYER_LEVEL plev);
227+extern bool control_one_undead(DIRECTION dir, PLAYER_LEVEL plev);
228+extern bool control_one_demon(DIRECTION dir, PLAYER_LEVEL plev);
229+extern bool charm_animal(DIRECTION dir, PLAYER_LEVEL plev);
230+extern bool mindblast_monsters(HIT_POINT dam);
231+extern bool teleport_swap(DIRECTION dir);
232+extern bool project_hook(EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, BIT_FLAGS flg);
233+extern bool project_all_los(EFFECT_ID typ, HIT_POINT dam);
234+extern bool eat_magic(int power);
235+extern void discharge_minion(void);
236+extern bool kawarimi(bool success);
237+extern bool rush_attack(bool *mdeath);
238+extern void remove_all_mirrors(bool explode);
239+extern void ring_of_power(DIRECTION dir);
240+extern void wild_magic(int spell);
241+extern void cast_meteor(HIT_POINT dam, POSITION rad);
242+extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
243+extern void cast_wonder(DIRECTION dir);
244+extern void cast_invoke_spirits(DIRECTION dir);
245+extern void cast_shuffle(void);
246+extern void stop_mouth(void);
247+extern bool_hack vampirism(void);
248+extern bool panic_hit(void);
249+extern bool psychometry(void);
250+extern bool draconian_breath(player_type *creature_ptr);
251+extern bool android_inside_weapon(player_type *creature_ptr);
252+extern bool create_ration(player_type *crature_ptr);
253+extern void hayagake(player_type *creature_ptr);
254+extern bool double_attack(player_type *creature_ptr);
255+extern bool comvert_hp_to_mp(player_type *creature_ptr);
256+extern bool comvert_mp_to_hp(player_type *creature_ptr);
257+extern bool demonic_breath(player_type *creature_ptr);
258+extern bool mirror_concentration(player_type *creature_ptr);
259+extern bool sword_dancing(player_type *creature_ptr);
260+extern bool confusing_light(player_type *creature_ptr);
261+extern bool rodeo(player_type *creature_ptr);
262+extern bool clear_mind(player_type *creature_ptr);
263+extern bool concentration(player_type *creature_ptr);
264+
131265 /* spells3.c */
132266 extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
133267 extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode);
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -35,6 +35,7 @@
3535 #include "feature.h"
3636 #include "quest.h"
3737 #include "dungeon.h"
38+#include "spells.h"
3839
3940 /*!
4041 * @brief コンソール上におけるマップ表示の左上位置を返す /
Show on old repository browser