forked from github/server
delete unused functions
This commit is contained in:
parent
7a289ceb86
commit
931e705b05
32
src/magic.c
32
src/magic.c
|
@ -231,26 +231,6 @@ bool FactionSpells(void)
|
||||||
return rule != 0;
|
return rule != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void read_spells(struct selist **slistp, magic_t mtype,
|
|
||||||
struct storage *store)
|
|
||||||
{
|
|
||||||
for (;;) {
|
|
||||||
spell *sp;
|
|
||||||
char spname[64];
|
|
||||||
|
|
||||||
READ_TOK(store, spname, sizeof(spname));
|
|
||||||
if (strcmp(spname, "end") == 0)
|
|
||||||
break;
|
|
||||||
sp = find_spell(spname);
|
|
||||||
if (!sp) {
|
|
||||||
log_error("read_spells: could not find spell '%s' in school '%s'\n", spname, magic_school[mtype]);
|
|
||||||
}
|
|
||||||
if (sp) {
|
|
||||||
add_spell(slistp, sp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_spell_level_mage(const spell * sp, void * cbdata)
|
int get_spell_level_mage(const spell * sp, void * cbdata)
|
||||||
{
|
{
|
||||||
sc_mage *mage = (sc_mage *)cbdata;
|
sc_mage *mage = (sc_mage *)cbdata;
|
||||||
|
@ -305,18 +285,6 @@ static int read_mage(attrib * a, void *owner, struct gamedata *data)
|
||||||
return AT_READ_OK;
|
return AT_READ_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_spells(struct selist *slist, struct storage *store)
|
|
||||||
{
|
|
||||||
selist *ql;
|
|
||||||
int qi;
|
|
||||||
|
|
||||||
for (ql = slist, qi = 0; ql; selist_advance(&ql, &qi, 1)) {
|
|
||||||
spell *sp = (spell *)selist_get(ql, qi);
|
|
||||||
WRITE_TOK(store, sp->sname);
|
|
||||||
}
|
|
||||||
WRITE_TOK(store, "end");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_mage(const attrib * a, const void *owner, struct storage *store)
|
write_mage(const attrib * a, const void *owner, struct storage *store)
|
||||||
{
|
{
|
||||||
|
|
|
@ -349,10 +349,6 @@ extern "C" {
|
||||||
struct order *ord, const struct spllprm *spobj);
|
struct order *ord, const struct spllprm *spobj);
|
||||||
bool FactionSpells(void);
|
bool FactionSpells(void);
|
||||||
|
|
||||||
void write_spells(struct selist *slist, struct storage *store);
|
|
||||||
void read_spells(struct selist **slistp, magic_t mtype,
|
|
||||||
struct storage *store);
|
|
||||||
|
|
||||||
struct spellbook * get_spellbook(const char * name);
|
struct spellbook * get_spellbook(const char * name);
|
||||||
void free_spellbooks(void);
|
void free_spellbooks(void);
|
||||||
void free_spellbook(struct spellbook *sb);
|
void free_spellbook(struct spellbook *sb);
|
||||||
|
|
Loading…
Reference in New Issue