summaryrefslogtreecommitdiffstats
path: root/trunk/source/spl-util.h
diff options
context:
space:
mode:
authorpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2005-07-21 02:34:44 +0000
committerpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2005-07-21 02:34:44 +0000
commit673bdae75485d14f759af597c3c62b99601f9a43 (patch)
tree368103f29fe0ce5dcf98060d9b5faa04590085fb /trunk/source/spl-util.h
parent7e900be770db24b0405fd2162491c405a425873e (diff)
downloadcrawl-ref-673bdae75485d14f759af597c3c62b99601f9a43.tar.gz
crawl-ref-673bdae75485d14f759af597c3c62b99601f9a43.zip
Initial revision
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'trunk/source/spl-util.h')
-rw-r--r--trunk/source/spl-util.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/trunk/source/spl-util.h b/trunk/source/spl-util.h
new file mode 100644
index 0000000000..848530dbbf
--- /dev/null
+++ b/trunk/source/spl-util.h
@@ -0,0 +1,87 @@
+/*
+ * File: spl-util.h
+ * Summary: data handlers for player spell list
+ * Written by: don brodale <dbrodale@bigfootinteractive.com>
+ *
+ * Changelog(most recent first):
+ *
+ * 24jun2000 jmf simplified structures
+ * <00> 12jun2000 dlb created after much thought
+ */
+
+
+#ifndef SPL_UTIL_H
+#define SPL_UTIL_H
+
+#include "enum.h" // just for NUM_SPELL_TYPES and TARG_ENEMY
+#include "direct.h" // just for DIR_NONE
+
+struct playerspell
+{
+ int id;
+ const char *title;
+ unsigned int disciplines; //jmf: a bitfield
+ unsigned int level;
+};
+
+
+//* * called from: acr
+void init_playerspells(void);
+
+int get_spell_slot_by_letter( char letter );
+int get_spell_by_letter( char letter );
+
+bool add_spell_to_memory( int spell );
+bool del_spell_from_memory_by_slot( int slot );
+
+// * called from: spell
+int spell_hunger(int which_spell);
+
+// * called from: it_use3 - spell - spells3
+int spell_mana(int which_spell);
+
+// * called from: chardump - it_use3 - player - spell - spl-book -
+// * spells0 - spells3
+int spell_difficulty(int which_spell);
+
+int spell_levels_required(int which_spell);
+
+// * called from: chardump - spell - spl-book - spells0
+bool spell_typematch(int which_spell, unsigned int which_discipline);
+unsigned int spell_type( int which_spell ); //jmf: simplification of above
+int count_bits( unsigned int bits );
+
+// * called from: chardump - command - debug - spl-book - spells0
+const char *spell_title(int which_spell);
+
+//int spell_restriction(int which_spell, int which_restriction);
+
+int apply_area_visible(int (*func) (int, int, int, int), int power);
+
+int apply_area_square(int (*func) (int, int, int, int),
+ int cx, int cy, int power);
+
+int apply_area_around_square( int (*func) (int, int, int, int),
+ int targ_x, int targ_y, 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_one_neighbouring_square(int (*func) (int, int, int, int),
+ int power);
+
+int apply_area_within_radius(int (*func) (int, int, int, int),
+ int x, int y, int pow, int radius, int ctype);
+
+char spell_direction( struct dist &spelld, struct bolt &pbolt,
+ int restrict = DIR_NONE, int mode = TARG_ENEMY );
+
+void apply_area_cloud(int (*func) (int, int, int, int), int x, int y,
+ int pow, int number, int ctype);
+
+const char *spelltype_name(unsigned int which_spelltype);
+
+int spell_type2skill (unsigned int which_spelltype);
+
+#endif