New SCT_BUDG_MAX
This commit is contained in:
parent
48ff09664b
commit
1f60baf818
3 changed files with 4 additions and 3 deletions
|
@ -38,6 +38,7 @@
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
|
||||||
#define SCT_EFFIC (SCT_TYPE_MAX + 1)
|
#define SCT_EFFIC (SCT_TYPE_MAX + 1)
|
||||||
|
#define SCT_BUDG_MAX SCT_EFFIC
|
||||||
|
|
||||||
struct bp *bp_alloc(void);
|
struct bp *bp_alloc(void);
|
||||||
void bp_set_from_sect(struct bp *, struct sctstr *);
|
void bp_set_from_sect(struct bp *, struct sctstr *);
|
||||||
|
|
|
@ -57,7 +57,7 @@ int
|
||||||
budg(void)
|
budg(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
long p_sect[SCT_TYPE_MAX+2][2];
|
long p_sect[SCT_BUDG_MAX+1][2];
|
||||||
int taxes, Ncivs, Nuws, bars, Nbars, mil;
|
int taxes, Ncivs, Nuws, bars, Nbars, mil;
|
||||||
int ships, sbuild, nsbuild, smaint;
|
int ships, sbuild, nsbuild, smaint;
|
||||||
int units, lbuild, nlbuild, lmaint;
|
int units, lbuild, nlbuild, lmaint;
|
||||||
|
@ -190,7 +190,7 @@ calc_all(long p_sect[][2],
|
||||||
struct sctstr *sp;
|
struct sctstr *sp;
|
||||||
int etu = etu_per_update;
|
int etu = etu_per_update;
|
||||||
|
|
||||||
memset(p_sect, 0, sizeof(**p_sect) * (SCT_TYPE_MAX+2) * 2);
|
memset(p_sect, 0, sizeof(**p_sect) * (SCT_BUDG_MAX+1) * 2);
|
||||||
*taxes = *Ncivs = *Nuws = *bars = *Nbars = *mil = 0;
|
*taxes = *Ncivs = *Nuws = *bars = *Nbars = *mil = 0;
|
||||||
*ships = *sbuild = *nsbuild = *smaint = 0;
|
*ships = *sbuild = *nsbuild = *smaint = 0;
|
||||||
*units = *lbuild = *nlbuild = *lmaint = 0;
|
*units = *lbuild = *nlbuild = *lmaint = 0;
|
||||||
|
|
|
@ -101,7 +101,7 @@ update_main(void)
|
||||||
logerror("done preparing sectors.");
|
logerror("done preparing sectors.");
|
||||||
logerror("producing for countries...");
|
logerror("producing for countries...");
|
||||||
for (i = 0; i < MAXNOC; i++) {
|
for (i = 0; i < MAXNOC; i++) {
|
||||||
long p_sect[SCT_TYPE_MAX+2][2];
|
long p_sect[SCT_BUDG_MAX+1][2];
|
||||||
|
|
||||||
memset(p_sect, 0, sizeof(p_sect));
|
memset(p_sect, 0, sizeof(p_sect));
|
||||||
if (!(np = getnatp(i)))
|
if (!(np = getnatp(i)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue