From 5564543bfd091fbceecea267e0e6df5a9c2357d0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 5 Apr 2021 19:40:12 +0200 Subject: [PATCH] fix gcc build --- src/battle.c | 1 - src/magic.c | 1 - src/magic.h | 15 ++++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/battle.c b/src/battle.c index e1ea88759..236f2703e 100644 --- a/src/battle.c +++ b/src/battle.c @@ -1781,7 +1781,6 @@ static void do_combatspell(troop at) int level, qi; double power; int fumblechance = 0; - const struct locale *lang = mage->faction->locale; sp = get_combatspell(mage, 1); if (sp == NULL || !u_hasspell(mage, sp)) { diff --git a/src/magic.c b/src/magic.c index 6a1f1b5dd..7a2acb523 100644 --- a/src/magic.c +++ b/src/magic.c @@ -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) { - const resource_type *r_aura = get_resourcetype(R_AURA); const struct spell_component *spc; int maxlevel = cast_level; diff --git a/src/magic.h b/src/magic.h index a0abd5564..89c09d4f6 100644 --- a/src/magic.h +++ b/src/magic.h @@ -18,6 +18,7 @@ extern "C" { struct sc_mage; struct unit; + struct resource; extern const char *magic_school[MAXMAGIETYP]; extern struct attrib_type at_familiar; @@ -109,6 +110,13 @@ extern "C" { struct unit * co_get_magician(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 { const struct resource_type *type; int amount; @@ -145,13 +153,6 @@ extern "C" { #define NOTFAMILIARCAST (1<<14) /* not used by XML? */ #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 */