Declare all configuration variables in optlist.h. Include that
instead of declaring them all over the place. This uncovered type errors: (s_p_etu, adj_update): Defined long, sometimes declared int. Kills big endian machines where sizeof(long) != sizeof(int). Change to int. (set_option, delete_option, optstrset, intset, floatset, doubleset, longset, optionset, optiondel, worldxset): Change linkage to static.
This commit is contained in:
parent
80aae5b8e6
commit
8cd0160176
62 changed files with 143 additions and 258 deletions
|
|
@ -2608,8 +2608,6 @@ static void
|
|||
take_move_in_mob(int combat_mode, struct llist *llp, struct combat *off,
|
||||
struct combat *def)
|
||||
{
|
||||
extern int etu_per_update;
|
||||
extern float land_mob_scale;
|
||||
int mobcost;
|
||||
int new;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ extern int etu_per_update;
|
|||
int
|
||||
attack_val(int combat_mode, struct lndstr *lp)
|
||||
{
|
||||
extern double assault_penalty;
|
||||
int men;
|
||||
int value;
|
||||
struct lchrstr *lcp;
|
||||
|
|
@ -102,7 +101,6 @@ attack_val(int combat_mode, struct lndstr *lp)
|
|||
int
|
||||
defense_val(struct lndstr *lp)
|
||||
{
|
||||
extern int land_mob_max;
|
||||
int men;
|
||||
double value;
|
||||
struct lchrstr *lcp;
|
||||
|
|
@ -1359,7 +1357,6 @@ lnd_can_attack(struct lndstr *lp)
|
|||
int
|
||||
lnd_fortify (struct lndstr *lp, int hard_amt)
|
||||
{
|
||||
extern int land_mob_max;
|
||||
int mob_used;
|
||||
int eng;
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ ground_interdict(coord x, coord y, natid victim, s_char *s)
|
|||
int
|
||||
collateral_damage(coord x, coord y, int dam, struct emp_qelem *list)
|
||||
{
|
||||
extern double collateral_dam;
|
||||
int coll;
|
||||
struct sctstr sect;
|
||||
|
||||
|
|
@ -439,8 +438,6 @@ static int
|
|||
perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
||||
int mission, s_char *s, int hardtarget)
|
||||
{
|
||||
extern int land_max_interdiction_range;
|
||||
extern int ship_max_interdiction_range;
|
||||
struct emp_qelem *qp, missiles, bombers, escorts, airp, b, e;
|
||||
struct emp_qelem *newqp;
|
||||
struct genlist *glp;
|
||||
|
|
@ -456,7 +453,6 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
|||
natid plane_owner = 0;
|
||||
int gun, shell, md, air_dam = 0;
|
||||
double range2, prb, range, mobcost, hitchance;
|
||||
extern int torpedo_damage;
|
||||
|
||||
getsect(x, y, §);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ setrel(natid us, natid them, int rel)
|
|||
int n_down = 0;
|
||||
s_char *addendum = 0;
|
||||
int theirrel;
|
||||
extern int War_Cost;
|
||||
|
||||
if (rel < AT_WAR)
|
||||
rel = AT_WAR;
|
||||
|
|
|
|||
|
|
@ -228,9 +228,6 @@ lookup(int key, struct lookup *table)
|
|||
void
|
||||
show_bridge(int tlev)
|
||||
{
|
||||
extern double buil_bt, buil_bc;
|
||||
extern int buil_bh;
|
||||
|
||||
if (tlev < buil_bt)
|
||||
return;
|
||||
pr("Bridges require %g tech,", buil_bt);
|
||||
|
|
@ -246,9 +243,6 @@ show_bridge(int tlev)
|
|||
void
|
||||
show_tower(int tlev)
|
||||
{
|
||||
extern double buil_tower_bt, buil_tower_bc;
|
||||
extern int buil_tower_bh;
|
||||
|
||||
if (tlev < buil_tower_bt)
|
||||
return;
|
||||
pr("Bridge Towers require %g tech,", buil_tower_bt);
|
||||
|
|
@ -273,7 +267,6 @@ show_nuke_build(int tlev)
|
|||
register struct nchrstr *np;
|
||||
register int n;
|
||||
register int avail;
|
||||
extern float drnuke_const;
|
||||
|
||||
if (opt_DRNUKE)
|
||||
pr("%13s lcm hcm oil rad avail tech res $\n", "");
|
||||
|
|
@ -309,7 +302,6 @@ show_nuke_capab(int tlev)
|
|||
register struct nchrstr *np;
|
||||
register int i, j, n;
|
||||
s_char *p;
|
||||
extern float drnuke_const;
|
||||
|
||||
if (opt_DRNUKE)
|
||||
pr("%13s blst dam lbs tech res $%7s abilities\n", "", "");
|
||||
|
|
|
|||
|
|
@ -630,7 +630,6 @@ static int
|
|||
shp_fort_interdiction(struct emp_qelem *list, coord newx, coord newy,
|
||||
natid victim)
|
||||
{
|
||||
extern int fort_max_interdiction_range;
|
||||
struct nstr_sect ns;
|
||||
struct sctstr fsect;
|
||||
int trange;
|
||||
|
|
|
|||
|
|
@ -123,8 +123,6 @@ resupply_commod(struct lndstr *lp, int type)
|
|||
}
|
||||
|
||||
if (opt_FUEL && type == I_PETROL) {
|
||||
extern float land_mob_scale;
|
||||
extern int etu_per_update;
|
||||
int fuel_needed = (lp->lnd_fuelu * (((float)etu_per_update
|
||||
* land_mob_scale)) / 10.0);
|
||||
|
||||
|
|
@ -180,8 +178,6 @@ s_commod(int own, int x, int y, int type, int total_wanted,
|
|||
int can_move;
|
||||
double move_cost, weight, mobcost;
|
||||
int packing;
|
||||
extern double eatrate;
|
||||
extern int etu_per_update;
|
||||
struct dchrstr *dp;
|
||||
struct ichrstr *ip;
|
||||
s_char buf[1024];
|
||||
|
|
@ -484,9 +480,6 @@ get_minimum(struct lndstr *lp, int type)
|
|||
{
|
||||
struct lchrstr *lcp;
|
||||
int max, want = 0;
|
||||
extern double eatrate;
|
||||
extern int etu_per_update;
|
||||
extern float land_mob_scale;
|
||||
|
||||
lcp = &lchr[(int)lp->lnd_type];
|
||||
max = vl_find(V_ITEM(type), lcp->l_vtype, lcp->l_vamt, (int)lcp->l_nv);
|
||||
|
|
|
|||
|
|
@ -64,8 +64,6 @@ takeover(register struct sctstr *sp, natid newown)
|
|||
struct nstr_item ni;
|
||||
struct plnstr p;
|
||||
struct lndstr land;
|
||||
extern int etu_per_update;
|
||||
extern int sect_mob_neg_factor;
|
||||
|
||||
/* Wipe all the distribution info */
|
||||
memset(vec, 0, sizeof(vec));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue