2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure, Markus Armbruster
6 * Empire is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * See files README, COPYING and CREDITS in the root of the source
22 * tree for related information and legal notices. It is expected
23 * that future projects/authors will amend these files as needed.
27 * update.h: Definitions related to the update
29 * Known contributors to this file:
30 * Ville Virrankoski, 1995
31 * Markus Armbruster, 2004-2016
51 BUDG_BLD_MAX = BUDG_SCT_MAINT
55 double money; /* money delta */
56 int count; /* #things making/consuming the money */
59 /* A nation's budget for an update */
61 /* production by sector type */
62 struct budg_item prod[SCT_TYPE_MAX + 1];
63 /* level production output */
65 /* building and maintenance */
66 struct budg_item bm[BUDG_BLD_MAX + 1];
67 /* population, taxes, military payroll, bank interest */
68 struct budg_item civ, mil, uw, bars;
70 int start_money; /* at beginning of update */
71 double money; /* current */
72 /* population before growth */
77 extern int update_running;
78 extern struct budget nat_budget[MAXNOC];
81 extern int age_people(int, int);
82 extern void age_levels(int);
84 extern void delete_old_announcements(void);
86 extern struct bp *bp_alloc(void);
87 extern void bp_set_from_sect(struct bp *, struct sctstr *);
88 extern void bp_to_sect(struct bp *, struct sctstr *);
90 extern void dodeliver(struct sctstr *);
92 extern int dodistribute(struct sctstr *, int, double);
94 extern void finish_sects(int);
96 extern void do_feed(struct sctstr *, struct natstr *, int, int);
97 extern int feed_people(short *, int);
98 extern double food_needed(short *, int);
99 extern int famine_victims(short *, int);
101 extern void prep_lands(int, natid);
102 extern void prod_land(int, int, struct bp *, int);
106 extern int get_materials(struct sctstr *, short[], int);
108 extern void mob_inc_all(int);
109 extern void mob_inc_sect(struct sctstr *, int);
110 extern void mob_inc_ship(struct shpstr *, int);
111 extern void mob_inc_plane(struct plnstr *, int);
112 extern void mob_inc_land(struct lndstr *, int);
113 extern void mob_access_all(void);
115 extern void move_sat(struct plnstr *);
117 extern void prod_nat(int);
121 extern void do_plague(struct sctstr *, int);
122 extern int plague_people(struct natstr *, short *, int *, int *, int);
123 extern void plague_report(natid, int, int, int, int, char *, char *);
125 extern void prep_planes(int, natid);
126 extern void prod_plane(int, int, struct bp *, int);
128 extern void populace(struct sctstr *, int);
129 extern int total_work(int, int, int, int, int, int);
131 extern void prepare_sects(int);
132 extern void tax(struct sctstr *, int);
133 extern void bank_income(struct sctstr *, int);
134 extern void pay_reserve(struct natstr *, int);
136 extern void produce(struct natstr *, struct sctstr *);
137 extern double prod_output(struct sctstr *, double);
138 extern double prod_materials_cost(struct pchrstr *, short[], int *);
139 extern double prod_resource_limit(struct pchrstr *, unsigned char *);
140 extern double prod_eff(int, float);
142 extern int update_removewants(void);
144 extern void revolt(struct sctstr *);
145 extern void guerrilla(struct sctstr *);
147 extern double buildeff(struct sctstr *);
148 extern void do_fallout(struct sctstr *, int);
149 extern void spread_fallout(struct sctstr *, int);
150 extern void decay_fallout(struct sctstr *, int);
151 extern void produce_sect(struct natstr *, int, struct bp *);
153 extern void prep_ships(int, natid);
154 extern void prod_ship(int, int, struct bp *, int);