summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.h
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-18 22:54:01 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-18 22:54:01 -0800
commit12db5eb08d4339481322699c330d539dbe1ed0df (patch)
tree815f6581b25252641e6104cc229c35286ce258ce /crawl-ref/source/spl-cast.h
parent92a3159b0568592e2ee0453ed0c318d8068ae021 (diff)
downloadcrawl-ref-12db5eb08d4339481322699c330d539dbe1ed0df.tar.gz
crawl-ref-12db5eb08d4339481322699c330d539dbe1ed0df.zip
list_spells(): tiles menu, selector callback
The list_spells() menu can now optionally be a tiles menu, and it can be passed a callback to select which spells to list or not (and to select which spells should be greyed-out). Also made _calc_spell_range() a globally available function.
Diffstat (limited to 'crawl-ref/source/spl-cast.h')
-rw-r--r--crawl-ref/source/spl-cast.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index b5b17a4f02..d8ea84b81f 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -45,11 +45,16 @@ enum spret_type
SPRET_SUCCESS
};
+typedef bool (*spell_selector)(spell_type spell, bool &grey);
+
int list_spells(bool toggle_with_I = true, bool viewing = false,
- int minRange = -1);
+ int minRange = -1, spell_selector selector = NULL,
+ bool text_only = true);
int spell_fail( spell_type spell );
int calc_spell_power(spell_type spell, bool apply_intel,
bool fail_rate_chk = false, bool cap_power = true);
+int calc_spell_range(spell_type spell, int power = 0,
+ bool real_cast = false);
int spell_enhancement( unsigned int typeflags );
void exercise_spell(spell_type spell_ex, bool spc, bool divide);