fix gcc build

This commit is contained in:
Enno Rehling 2021-04-05 19:40:12 +02:00
parent 4d8a3d1947
commit 5564543bfd
3 changed files with 8 additions and 9 deletions

View File

@ -1781,7 +1781,6 @@ static void do_combatspell(troop at)
int level, qi; int level, qi;
double power; double power;
int fumblechance = 0; int fumblechance = 0;
const struct locale *lang = mage->faction->locale;
sp = get_combatspell(mage, 1); sp = get_combatspell(mage, 1);
if (sp == NULL || !u_hasspell(mage, sp)) { if (sp == NULL || !u_hasspell(mage, sp)) {

View File

@ -740,7 +740,6 @@ static void add_missing_component(resource **reslist_p, const struct spell_compo
*/ */
int max_spell_level(unit * u, unit *caster, const spell * sp, int cast_level, int range, resource **reslist_p) int max_spell_level(unit * u, unit *caster, const spell * sp, int cast_level, int range, resource **reslist_p)
{ {
const resource_type *r_aura = get_resourcetype(R_AURA);
const struct spell_component *spc; const struct spell_component *spc;
int maxlevel = cast_level; int maxlevel = cast_level;

View File

@ -18,6 +18,7 @@ extern "C" {
struct sc_mage; struct sc_mage;
struct unit; struct unit;
struct resource;
extern const char *magic_school[MAXMAGIETYP]; extern const char *magic_school[MAXMAGIETYP];
extern struct attrib_type at_familiar; extern struct attrib_type at_familiar;
@ -109,6 +110,13 @@ extern "C" {
struct unit * co_get_magician(const struct castorder * co); struct unit * co_get_magician(const struct castorder * co);
struct region * co_get_region(const struct castorder * co); struct region * co_get_region(const struct castorder * co);
/* Flag Spruchkostenberechnung: */
enum spellcost_t {
SPC_FIX, /* Fixkosten */
SPC_LEVEL, /* Komponenten pro Level */
SPC_LINEAR /* Komponenten pro Level und muessen vorhanden sein */
};
typedef struct spell_component { typedef struct spell_component {
const struct resource_type *type; const struct resource_type *type;
int amount; int amount;
@ -145,13 +153,6 @@ extern "C" {
#define NOTFAMILIARCAST (1<<14) /* not used by XML? */ #define NOTFAMILIARCAST (1<<14) /* not used by XML? */
#define ANYTARGET (UNITSPELL|REGIONSPELL|BUILDINGSPELL|SHIPSPELL) /* wirkt auf alle objekttypen (unit, ship, building, region) */ #define ANYTARGET (UNITSPELL|REGIONSPELL|BUILDINGSPELL|SHIPSPELL) /* wirkt auf alle objekttypen (unit, ship, building, region) */
/* Flag Spruchkostenberechnung: */
enum spellcost_t {
SPC_FIX, /* Fixkosten */
SPC_LEVEL, /* Komponenten pro Level */
SPC_LINEAR /* Komponenten pro Level und muessen vorhanden sein */
};
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
/* Prototypen */ /* Prototypen */