diff options
Diffstat (limited to 'crawl-ref/source/spl-util.h')
-rw-r--r-- | crawl-ref/source/spl-util.h | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index 8a76c039b5..6bbbfdd9b8 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -62,11 +62,8 @@ struct spell_desc bool is_valid_spell(spell_type spell); - -//* * called from: acr void init_spell_descs(void); - -void init_spell_name_cache(); +void init_spell_name_cache(); spell_type spell_by_name(std::string name, bool partial_match = false); int get_spell_slot_by_letter( char letter ); @@ -75,14 +72,8 @@ spell_type get_spell_by_letter( char letter ); bool add_spell_to_memory( spell_type spell ); bool del_spell_from_memory_by_slot( int slot ); -// * called from: spell int spell_hunger(spell_type which_spell); - -// * called from: it_use3 - spell - spells3 int spell_mana(spell_type which_spell); - -// * called from: chardump - it_use3 - player - spell - spl-book - -// * spells0 - spells3 int spell_difficulty(spell_type which_spell); int spell_power_cap(spell_type spell); @@ -98,36 +89,28 @@ int spell_levels_required(spell_type which_spell); unsigned int get_spell_flags( spell_type which_spell ); -// * called from: chardump - spell - spl-book - spells0 bool spell_typematch(spell_type which_spell, unsigned int which_discipline); unsigned int get_spell_disciplines( spell_type which_spell ); int count_bits( unsigned int bits ); -// * called from: chardump - command - debug - spl-book - spells0 const char *spell_title(spell_type which_spell); - const char* spelltype_short_name( int which_spelltype ); -//int spell_restriction(int which_spell, int which_restriction); - -int apply_area_visible(int (*func) (int, int, int, int), int power, +typedef int cell_func(coord_def where, int pow, int aux); +int apply_area_visible(cell_func cf, int power, bool pass_through_trans = false); -int apply_area_square(int (*func) (int, int, int, int), - int cx, int cy, int power); +int apply_area_square(cell_func cf, const coord_def& where, int power); -int apply_area_around_square( int (*func) (int, int, int, int), - int targ_x, int targ_y, int power ); +int apply_area_around_square(cell_func cf, const coord_def& where, int power ); -int apply_random_around_square( int (*func) (int, int, int, int), - int targ_x, int targ_y, bool hole_in_middle, - int power, int max_targs ); +int apply_random_around_square( cell_func cf, const coord_def& where, + bool hole_in_middle, int power, int max_targs ); -int apply_one_neighbouring_square(int (*func) (int, int, int, int), - int power); +int apply_one_neighbouring_square(cell_func cf, int power); -int apply_area_within_radius(int (*func) (int, int, int, int), - int x, int y, int pow, int radius, int ctype); +int apply_area_within_radius(cell_func cf, const coord_def& where, + int pow, int radius, int ctype); bool spell_direction( dist &spelld, bolt &pbolt, targeting_type restrict = DIR_NONE, |