]> git.pond.sub.org Git - empserver/blobdiff - include/update.h
production: Use update code instead of duplicating it
[empserver] / include / update.h
index 3a20f4b09351c7a6808c5478a722dae27867c96f..a81684e33a4cfb536434df2437d6aeac89df8b5a 100644 (file)
@@ -52,7 +52,7 @@ enum {
 };
 
 struct budg_item {
-    int money;                 /* money delta */
+    double money;              /* money delta */
     int count;                 /* #things making/consuming the money */
 };
 
@@ -62,17 +62,16 @@ struct budget {
     struct budg_item prod[SCT_TYPE_MAX + 1];
     /* building and maintenance */
     struct budg_item bm[BUDG_BLD_MAX + 1];
-    /* military payroll */
-    struct budg_item mil;
+    /* population, taxes, military payroll, bank interest */
+    struct budg_item civ, mil, uw, bars;
+    /* treasury */
+    int start_money;           /* at beginning of update */
+    double money;              /* current */
 };
 
 /* main.c */
 extern struct budget nat_budget[MAXNOC];
-extern int money[MAXNOC];
 extern int pops[MAXNOC];
-extern int sea_money[MAXNOC];
-extern int lnd_money[MAXNOC];
-extern int air_money[MAXNOC];
 extern int tpops[MAXNOC];
 /* nat.c */
 extern float levels[MAXNOC][4];
@@ -128,14 +127,15 @@ extern void populace(struct sctstr *, int);
 extern int total_work(int, int, int, int, int, int);
 /* prepare.c */
 extern void prepare_sects(int);
-extern void tax(struct sctstr *, int, int *, int *, int *);
+extern void tax(struct sctstr *, int, int *);
 extern void upd_slmilcosts(int, natid);
-extern int bank_income(struct sctstr *, int);
+extern void bank_income(struct sctstr *, int);
 extern void pay_reserve(struct natstr *, int);
 /* produce.c */
-extern int produce(struct natstr *, struct sctstr *, int *);
-extern int prod_materials_cost(struct pchrstr *, short[], int *);
-extern int prod_resource_limit(struct pchrstr *, unsigned char *);
+extern void produce(struct natstr *, struct sctstr *);
+extern double prod_output(struct sctstr *, double);
+extern double prod_materials_cost(struct pchrstr *, short[], int *);
+extern double prod_resource_limit(struct pchrstr *, unsigned char *);
 extern double prod_eff(int, float);
 /* removewants.c */
 extern int update_removewants(void);