/*
* src/lib/update/ *.c
*/
-/* age.c */
-extern int age_people(int, int);
-extern void age_levels(int);
-/* anno.c */
-extern void delete_old_announcements(void);
-/* bp.c */
/* in update.h */
-/* deliver.c */
-extern void dodeliver(struct sctstr *);
-/* distribute.c */
-extern int dodistribute(struct sctstr *, int, double);
-/* finish.c */
-extern void finish_sects(int);
-/* human.c */
-extern void do_feed(struct sctstr *, struct natstr *, int, int);
-extern int feed_people(short *, int);
-extern double food_needed(short *, int);
-extern int famine_victims(short *, int);
-/* land.c */
-extern int prod_land(int, int, struct bp *, int);
-/* main.c */
-/* in server.h */
-/* material.c */
-extern int get_materials(struct sctstr *, short[], int);
-/* mobility.c */
-extern void mob_sect(void);
-extern void mob_ship(void);
-extern void mob_land(void);
-extern void mob_plane(void);
-extern void sct_do_upd_mob(struct sctstr *sp);
-extern void shp_do_upd_mob(struct shpstr *sp);
-extern void lnd_do_upd_mob(struct lndstr *lp);
-extern void pln_do_upd_mob(struct plnstr *pp);
-/* move_sat.c */
-extern void move_sat(struct plnstr *);
-/* nat.c */
-extern void prod_nat(int);
-/* nxtitemp.c */
-/* in nsc.h */
-/* plague.c */
-extern void do_plague(struct sctstr *, int);
-extern int plague_people(struct natstr *, short *, int *, int *, int);
-/* plane.c */
-extern int prod_plane(int, int, struct bp *, int);
-/* populace.c */
-extern void populace(struct sctstr *, int);
-extern int total_work(int, int, int, int, int, int);
-/* prepare.c */
-extern void tax(struct sctstr *, int, int *, int *, int *, int *);
-extern int upd_slmilcosts(natid, int);
-extern void prepare_sects(int);
-extern int bank_income(struct sctstr *, 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 double prod_eff(int, float);
-/* removewants.c */
-extern int update_removewants(void);
-/* revolt.c */
-extern void revolt(struct sctstr *);
-extern void guerrilla(struct sctstr *);
-/* sect.c */
-extern double buildeff(struct sctstr *);
-extern void do_fallout(struct sctstr *, int);
-extern void spread_fallout(struct sctstr *, int);
-extern void decay_fallout(struct sctstr *, int);
-extern void produce_sect(struct natstr *, int, struct bp *, int[][2]);
-/* ship.c */
-extern int prod_ship(int, int, struct bp *, int);
/*
* src/server
#define SCT_MAINT (SCT_TYPE_MAX + 2)
#define SCT_BUDG_MAX SCT_MAINT
-struct bp *bp_alloc(void);
-void bp_set_from_sect(struct bp *, struct sctstr *);
-void bp_to_sect(struct bp *, struct sctstr *);
-
+/* main.c */
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];
+/* age.c */
+extern int age_people(int, int);
+extern void age_levels(int);
+/* anno.c */
+extern void delete_old_announcements(void);
+/* bp.c */
+extern struct bp *bp_alloc(void);
+extern void bp_set_from_sect(struct bp *, struct sctstr *);
+extern void bp_to_sect(struct bp *, struct sctstr *);
+/* deliver.c */
+extern void dodeliver(struct sctstr *);
+/* distribute.c */
+extern int dodistribute(struct sctstr *, int, double);
+/* finish.c */
+extern void finish_sects(int);
+/* human.c */
+extern void do_feed(struct sctstr *, struct natstr *, int, int);
+extern int feed_people(short *, int);
+extern double food_needed(short *, int);
+extern int famine_victims(short *, int);
+/* land.c */
+extern int prod_land(int, int, struct bp *, int);
+/* main.c */
+/* in server.h */
+/* material.c */
+extern int get_materials(struct sctstr *, short[], int);
+/* mobility.c */
+extern void mob_sect(void);
+extern void mob_ship(void);
+extern void mob_land(void);
+extern void mob_plane(void);
+extern void sct_do_upd_mob(struct sctstr *sp);
+extern void shp_do_upd_mob(struct shpstr *sp);
+extern void lnd_do_upd_mob(struct lndstr *lp);
+extern void pln_do_upd_mob(struct plnstr *pp);
+/* move_sat.c */
+extern void move_sat(struct plnstr *);
+/* nat.c */
+extern void prod_nat(int);
+/* nxtitemp.c */
+/* in nsc.h */
+/* plague.c */
+extern void do_plague(struct sctstr *, int);
+extern int plague_people(struct natstr *, short *, int *, int *, int);
+/* plane.c */
+extern int prod_plane(int, int, struct bp *, int);
+/* populace.c */
+extern void populace(struct sctstr *, int);
+extern int total_work(int, int, int, int, int, int);
+/* prepare.c */
+extern void tax(struct sctstr *, int, int *, int *, int *, int *);
+extern int upd_slmilcosts(natid, int);
+extern void prepare_sects(int);
+extern int bank_income(struct sctstr *, 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 double prod_eff(int, float);
+/* removewants.c */
+extern int update_removewants(void);
+/* revolt.c */
+extern void revolt(struct sctstr *);
+extern void guerrilla(struct sctstr *);
+/* sect.c */
+extern double buildeff(struct sctstr *);
+extern void do_fallout(struct sctstr *, int);
+extern void spread_fallout(struct sctstr *, int);
+extern void decay_fallout(struct sctstr *, int);
+extern void produce_sect(struct natstr *, int, struct bp *, int[][2]);
+/* ship.c */
+extern int prod_ship(int, int, struct bp *, int);
+
#endif
#include "commands.h"
#include "item.h"
#include "optlist.h"
+#include "update.h"
int
newe(void)
#include "item.h"
#include "optlist.h"
#include "product.h"
+#include "update.h"
static void prprod(struct sctstr *, double, double, char,
double, double, double, char[], int[], int[], int);
#include "land.h"
#include "optlist.h"
#include "ship.h"
+#include "update.h"
static void starv_sects(char *range);
static void starv_ships(char *range);
#include "commands.h"
#include "land.h"
#include "optlist.h"
+#include "update.h"
int
work(void)
#include "player.h"
#include "prototypes.h"
#include "unit.h"
+#include "update.h"
void
lnd_postread(int n, void *ptr)
#include "player.h"
#include "prototypes.h"
#include "unit.h"
+#include "update.h"
void
pln_postread(int n, void *ptr)
#include "player.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
#include "xy.h"
void
#include "prototypes.h"
#include "ship.h"
#include "unit.h"
+#include "update.h"
void
shp_postread(int n, void *ptr)
#include "prototypes.h"
#include "sect.h"
#include "ship.h"
+#include "update.h"
static int s_commod(struct empobj *, short *, i_type, int, int, int);
static int get_minimum(struct lndstr *, i_type);
#include "file.h"
#include "nat.h"
#include "optlist.h"
-#include "prototypes.h"
+#include "update.h"
int
age_people(int n, int etu)
#include "optlist.h"
#include "prototypes.h"
#include "tel.h"
+#include "update.h"
static int copy_and_expire(FILE *, FILE *, char *, time_t);
static int copy_sink(char *, size_t, void *);
#include "plague.h"
#include "sect.h"
#include "prototypes.h"
+#include "update.h"
#define DELIVER_BONUS 4.0
#include "plague.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
#ifdef DISTRIBUTE_DEBUG
#define DPRINTF(fmt, ...) ((void)printf(fmt , ## __VA_ARGS__))
#include "path.h"
#include "sect.h"
#include "prototypes.h"
+#include "update.h"
static void assemble_dist_paths(double *);
#include "player.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
#include "xy.h"
static int new_work(struct sctstr *, int);
#include "chance.h"
#include "sect.h"
-#include "prototypes.h"
+#include "update.h"
/*
* Get build materials from sector @sp.
#include "land.h"
#include "optlist.h"
#include "plane.h"
-#include "prototypes.h"
#include "sect.h"
#include "server.h"
#include "ship.h"
+#include "update.h"
static int do_upd_checking;
#include "plane.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
#ifndef PI
#define PI 3.14159265358979323846
#include "plague.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
static int infect_people(struct natstr *, struct sctstr *);
#include "prototypes.h"
#include "nat.h"
#include "sect.h"
+#include "update.h"
void
populace(struct sctstr *sp, int etu)
#include "file.h"
#include "nat.h"
-#include "prototypes.h"
+#include "update.h"
int
update_removewants(void)
#include "plane.h"
#include "prototypes.h"
#include "sect.h"
+#include "update.h"
static void take_casualties(struct sctstr *, int);
static void lnd_dies_fighting_che(struct lndstr *);