Declare update related variables in budg.h. Remove some redundant
declarations elsewhere.
This commit is contained in:
parent
966eb40899
commit
2c5a4b4563
8 changed files with 11 additions and 16 deletions
|
@ -37,4 +37,12 @@ int gt_bg_nmbr(int *bp, struct sctstr *sp, int comm);
|
||||||
void pt_bg_nmbr(int *bp, struct sctstr *sp, int comm, int amount);
|
void pt_bg_nmbr(int *bp, struct sctstr *sp, int comm, int amount);
|
||||||
void get_materials(struct sctstr *sp, int *bp, int *mvec, int check);
|
void get_materials(struct sctstr *sp, int *bp, int *mvec, int check);
|
||||||
|
|
||||||
|
extern long money[MAXNOC];
|
||||||
|
extern long pops[MAXNOC];
|
||||||
|
extern long sea_money[MAXNOC];
|
||||||
|
extern long lnd_money[MAXNOC];
|
||||||
|
extern long air_money[MAXNOC];
|
||||||
|
extern long tpops[MAXNOC];
|
||||||
|
extern float levels[MAXNOC][4];
|
||||||
|
|
||||||
extern int mil_dbl_pay;
|
extern int mil_dbl_pay;
|
||||||
|
|
|
@ -342,10 +342,6 @@ calc_all(long int (*p_sect)[2], int *taxes, int *Ncivs, int *Nuws,
|
||||||
int etu = etu_per_update;
|
int etu = etu_per_update;
|
||||||
int vec[I_MAX + 1];
|
int vec[I_MAX + 1];
|
||||||
long tmp_money;
|
long tmp_money;
|
||||||
extern long sea_money[MAXNOC];
|
|
||||||
extern long lnd_money[MAXNOC];
|
|
||||||
extern long air_money[MAXNOC];
|
|
||||||
extern long tpops[MAXNOC];
|
|
||||||
|
|
||||||
lnd_money[player->cnum] = sea_money[player->cnum] = 0;
|
lnd_money[player->cnum] = sea_money[player->cnum] = 0;
|
||||||
air_money[player->cnum] = 0;
|
air_money[player->cnum] = 0;
|
||||||
|
|
|
@ -72,7 +72,6 @@ prod_land(int etus, int natnum, int *bp, int build)
|
||||||
struct sctstr *sp;
|
struct sctstr *sp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
int n, k = 0;
|
int n, k = 0;
|
||||||
extern long lnd_money[MAXNOC];
|
|
||||||
int start_money;
|
int start_money;
|
||||||
int lastx = 9999, lasty = 9999;
|
int lastx = 9999, lasty = 9999;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "subs.h"
|
#include "subs.h"
|
||||||
|
#include "budg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hap and edu avg mean that the weight on current happiness is
|
* hap and edu avg mean that the weight on current happiness is
|
||||||
|
@ -128,11 +129,6 @@ limit_level(double level, int type, int flag)
|
||||||
void
|
void
|
||||||
prod_nat(int etu)
|
prod_nat(int etu)
|
||||||
{
|
{
|
||||||
extern long money[MAXNOC];
|
|
||||||
extern long pops[MAXNOC];
|
|
||||||
extern long sea_money[MAXNOC];
|
|
||||||
extern long lnd_money[MAXNOC];
|
|
||||||
extern long air_money[MAXNOC];
|
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
float hap;
|
float hap;
|
||||||
float edu;
|
float edu;
|
||||||
|
|
|
@ -59,7 +59,6 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
|
||||||
|
|
||||||
/* Build = 1, maintain =0 */
|
/* Build = 1, maintain =0 */
|
||||||
{
|
{
|
||||||
extern long air_money[MAXNOC];
|
|
||||||
register struct plnstr *pp;
|
register struct plnstr *pp;
|
||||||
register struct plchrstr *plp;
|
register struct plchrstr *plp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
|
|
|
@ -57,7 +57,6 @@ extern float levels[MAXNOC][4];
|
||||||
void
|
void
|
||||||
prepare_sects(int etu, int *bp)
|
prepare_sects(int etu, int *bp)
|
||||||
{
|
{
|
||||||
extern long pops[];
|
|
||||||
register struct sctstr *sp;
|
register struct sctstr *sp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
int n, civ_tax, uw_tax, mil_pay;
|
int n, civ_tax, uw_tax, mil_pay;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "subs.h"
|
#include "subs.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
|
#include "budg.h"
|
||||||
|
|
||||||
static void materials_charge(struct pchrstr *, register int *,
|
static void materials_charge(struct pchrstr *, register int *,
|
||||||
register int);
|
register int);
|
||||||
|
@ -56,8 +57,6 @@ int
|
||||||
produce(struct natstr *np, struct sctstr *sp, int *vec, int work,
|
produce(struct natstr *np, struct sctstr *sp, int *vec, int work,
|
||||||
int sctwork, int desig, int neweff, int *cost, int *amount)
|
int sctwork, int desig, int neweff, int *cost, int *amount)
|
||||||
{
|
{
|
||||||
extern float levels[MAXNOC][4];
|
|
||||||
extern long tpops[];
|
|
||||||
register struct pchrstr *product;
|
register struct pchrstr *product;
|
||||||
int vtype;
|
int vtype;
|
||||||
double p_e;
|
double p_e;
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "subs.h"
|
#include "subs.h"
|
||||||
#include "gen.h"
|
#include "gen.h"
|
||||||
#include "lost.h"
|
#include "lost.h"
|
||||||
|
#include "budg.h"
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||||
|
@ -68,7 +69,6 @@ prod_ship(int etus, int natnum, int *bp, int build)
|
||||||
register struct shpstr *sp;
|
register struct shpstr *sp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
int n, k = 0;
|
int n, k = 0;
|
||||||
extern long sea_money[MAXNOC];
|
|
||||||
int start_money;
|
int start_money;
|
||||||
int lastx = 9999, lasty = 9999;
|
int lastx = 9999, lasty = 9999;
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ upd_ship(register struct shpstr *sp, int shipno, register int etus,
|
||||||
struct natstr *np, int *bp, int build)
|
struct natstr *np, int *bp, int build)
|
||||||
/* build = 1, maintain = 0 */
|
/* build = 1, maintain = 0 */
|
||||||
{
|
{
|
||||||
extern long pops[];
|
|
||||||
struct sctstr *sectp;
|
struct sctstr *sectp;
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
int vec[I_MAX + 1];
|
int vec[I_MAX + 1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue