diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-24 10:38:05 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-24 10:38:05 +0000 |
commit | 111787503763e9d3eeb4eef2248926bf4a4eeb98 (patch) | |
tree | 8af6fcd44ef05ff7cb092dfe3084c13f58e3ba74 /crawl-ref/source/spl-util.h | |
parent | a7ba97bc95fa25180bd402a52943f223da2bf04a (diff) | |
download | crawl-ref-111787503763e9d3eeb4eef2248926bf4a4eeb98.tar.gz crawl-ref-111787503763e9d3eeb4eef2248926bf4a4eeb98.zip |
More cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6669 c06c8d41-db1a-0410-9941-cceddc491573
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, |