factions have spellbooks and the read/write function for spellbooks is now accessible from other places (we'll need this for units)

This commit is contained in:
Enno Rehling 2012-05-24 22:26:05 -07:00
parent 707349d014
commit 8ecda7b203
2 changed files with 5 additions and 2 deletions

View File

@ -1204,7 +1204,7 @@ static ally **addally(const faction * f, ally ** sfp, int aid, int state)
return &sf->next; return &sf->next;
} }
static struct spellbook *read_spellbook(struct storage *store) struct spellbook *read_spellbook(struct storage *store)
{ {
spellbook * book = 0; spellbook * book = 0;
int level; int level;
@ -1239,7 +1239,7 @@ static struct spellbook *read_spellbook(struct storage *store)
return book; return book;
} }
static void write_spellbook(const struct spellbook *book, struct storage *store) void write_spellbook(const struct spellbook *book, struct storage *store)
{ {
quicklist *ql; quicklist *ql;
int qi; int qi;

View File

@ -47,6 +47,9 @@ extern "C" {
extern void read_items(struct storage *store, struct item **it); extern void read_items(struct storage *store, struct item **it);
extern void write_items(struct storage *store, struct item *it); extern void write_items(struct storage *store, struct item *it);
extern struct spellbook *read_spellbook(struct storage *store);
extern void write_spellbook(const struct spellbook *book, struct storage *store);
extern void write_unit(struct storage *store, const struct unit *u); extern void write_unit(struct storage *store, const struct unit *u);
extern struct unit *read_unit(struct storage *store); extern struct unit *read_unit(struct storage *store);