]> git.pond.sub.org Git - empserver/blobdiff - include/update.h
ship: Unbreak MOB_ACCESS real-time mobility update for ships
[empserver] / include / update.h
index 241b3fcd20a6fae601eba5a5102cf8f041e00dae..8138ad769ca67abbd239106efb8bcbcf6f9f26b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Ville Virrankoski, 1995
- *     Markus Armbruster, 2004-2016
+ *     Markus Armbruster, 2004-2020
  */
 
 #ifndef UPDATE_H
@@ -59,7 +59,7 @@ struct budg_item {
 /* A nation's budget for an update */
 struct budget {
     /* production by sector type */
-    struct budg_item prod[SCT_TYPE_MAX + 1];
+    struct budg_item prod[ARRAY_SIZE(dchr) - 1];
     /* level production output */
     float level[4];
     /* building and maintenance */
@@ -84,12 +84,17 @@ extern void age_levels(int);
 extern void delete_old_announcements(void);
 /* bp.c */
 extern struct bp *bp_alloc(void);
+extern int bp_skip_sect(struct bp *, struct sctstr *);
+extern int bp_skip_unit(struct bp *, struct empobj *);
+extern void bp_consider_unit(struct bp *, struct empobj *);
 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);
+/* fallout.c */
+extern void fallout(int);
 /* finish.c */
 extern void finish_sects(int);
 /* human.c */
@@ -98,7 +103,7 @@ extern int feed_people(short *, int);
 extern double food_needed(short *, int);
 extern int famine_victims(short *, int);
 /* land.c */
-extern void prep_lands(int);
+extern void prep_lands(int, struct bp *);
 extern void prod_land(int, struct bp *, int);
 /* main.c */
 /* in server.h */
@@ -122,19 +127,19 @@ extern void do_plague(struct sctstr *, int);
 extern int plague_people(struct natstr *, short *, int *, int *, int);
 extern void plague_report(natid, int, int, int, int, char *, char *);
 /* plane.c */
-extern void prep_planes(int);
+extern void prep_planes(int, struct bp *);
 extern void prod_plane(int, struct bp *, int);
 /* populace.c */
+extern void check_pop_loss(struct sctstr *);
 extern void populace(struct sctstr *, int);
 extern int total_work(int, int, int, int, int, int);
 /* prepare.c */
 extern void prepare_sects(int, struct bp *);
+extern void prep_one_sect(struct sctstr *, int, struct bp *);
 extern void pay_reserve(struct natstr *, int);
 /* produce.c */
 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);
@@ -143,12 +148,9 @@ 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 *);
+extern void produce_sect(int, struct bp *);
 /* ship.c */
-extern void prep_ships(int);
+extern void prep_ships(int, struct bp *);
 extern void prod_ship(int, struct bp *, int);
 
 #endif