]> git.pond.sub.org Git - empserver/blobdiff - include/update.h
production: Use update code instead of duplicating it
[empserver] / include / update.h
index 53d7ec41123d69b2168ec991e1a2e94e996189e2..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 */
 };
 
@@ -64,15 +64,14 @@ struct budget {
     struct budg_item bm[BUDG_BLD_MAX + 1];
     /* 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];
@@ -133,9 +132,10 @@ extern void upd_slmilcosts(int, natid);
 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);