]> git.pond.sub.org Git - empserver/blobdiff - include/prototypes.h
Fix automatic supply of defending and reacting units
[empserver] / include / prototypes.h
index 3afaaa6deeb314ad330537641b43baaa81d75b0f..1d3ac26fc1a30e1e167a7754dd0bbe197164d0cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  prototypes.h: Prototypes for server functions
- * 
+ *
  *  Known contributors to this file:
  *     Curtis Larsen, 1998
  *     Steve McClure, 1998,2000
@@ -54,7 +54,7 @@ extern void finish_server(void);
 /* in empthread.h */
 
 /*
- * src/lib/commands/ *.c 
+ * src/lib/commands/ *.c
  */
 extern int check_market(void);
 extern void gift(natid, natid, void *, char *);
@@ -66,7 +66,6 @@ extern int do_unit_move(struct emp_qelem *land_list, int *together,
             double *minmob, double *maxmob);
 extern int count_pop(int);
 extern int scuttle_tradeship(struct shpstr *, int);
-extern void scuttle_ship(struct shpstr *);
 extern void resnoise(struct sctstr *sptr, int public_amt, char *name,
                     int old, int new);
 extern int line_of_sight(char **rad, int ax, int ay, int bx, int by);
@@ -78,6 +77,7 @@ extern void trdswitchown(int, void *, int);
 extern int do_look(short);
 extern int radar(short);
 extern void update_power(void);
+extern int show_first_tel(char *);
 /* Commands */
 int acce(void);
 int add(void);
@@ -150,7 +150,6 @@ int load(void);
 int look(void);
 int lost(void);
 int lrad(void);
-int lrange(void);
 int lretr(void);
 int lsta(void);
 int ltend(void);
@@ -254,7 +253,7 @@ int xedit(void);
 int zdon(void);
 
 /*
- * src/lib/common/ *.c 
+ * src/lib/common/ *.c
  */
 /* bestpath.c */
 extern char *bestownedpath(char *, char *, int, int, int, int, int);
@@ -316,7 +315,7 @@ extern int demandupdatecheck(void);
 /* in xdump.h */
 
 /*
- * src/lib/gen/ *.c 
+ * src/lib/gen/ *.c
  */
 /* fnameat.c */
 extern char *fnameat(const char *, const char *);
@@ -345,13 +344,13 @@ extern char *plurize(char *buf, int max_len, int n);
 /* more in misc.h */
 
 /*
- * src/lib/global/ *.c 
+ * src/lib/global/ *.c
  */
 extern void global_init(void);
 
 
 /*
- * src/lib/player/ *.c 
+ * src/lib/player/ *.c
  */
 /* accept.c */
 extern void player_init(void);
@@ -367,9 +366,10 @@ extern int dispatch(char *, char *);
 extern int getcommand(char *);
 extern void init_player_commands(void);
 extern void log_last_commands(void);
-extern int gamedown(void);
-extern void daychange(time_t);
-extern int getminleft(time_t, int);
+extern void update_timeused_login(time_t now);
+extern void update_timeused(time_t now);
+extern void enforce_minimum_session_time(void);
+extern int may_play_now(struct natstr *, time_t);
 /* more under Commands */
 /* empmod.c */
 /* init_nats.c */
@@ -393,7 +393,7 @@ extern void stop_service(void);
 /* more in service.h */
 
 /*
- * src/lib/subs/ *.c 
+ * src/lib/subs/ *.c
  */
 /* askyn.c */
 extern int confirm(char *);
@@ -484,11 +484,9 @@ extern int ground_interdict(coord, coord, natid, char *);
 extern int unit_interdict(coord, coord, natid, char *, int, int);
 extern int off_support(coord, coord, natid, natid);
 extern int def_support(coord, coord, natid, natid);
-extern int oprange(struct empobj *, int *);
+extern int oprange(struct empobj *);
+extern int in_oparea(struct empobj *, coord, coord);
 extern int cando(int, int);
-extern void show_mission(int, struct nstr_item *);
-extern int air_defense(coord, coord, natid, struct emp_qelem *,
-                      struct emp_qelem *);
 /* move.c */
 extern int check_lmines(coord, coord, double);
 extern int move_ground(struct sctstr *, struct sctstr *,
@@ -551,13 +549,10 @@ extern int pln_airbase_ok(struct plnstr *, int, int);
 extern int carrier_planes(struct shpstr *, int);
 extern void pln_sel(struct nstr_item *, struct emp_qelem *,
                    struct sctstr *, int, int, int, int);
-extern int pln_arm(struct emp_qelem *, int, char, struct ichrstr *,
-                  int, int);
+extern void pln_arm(struct emp_qelem *, int, char, struct ichrstr *, int);
 extern int pln_mobcost(int, struct plnstr *, int);
 extern void pln_put(struct emp_qelem *);
 extern void pln_put1(struct plist *);
-extern void take_plane_off_ship(struct plnstr *, struct shpstr *);
-extern void take_plane_off_land(struct plnstr *, struct lndstr *);
 extern void plane_sweep(struct emp_qelem *, coord, coord);
 extern int put_plane_on_land(struct plnstr *, struct lndstr *);
 extern int pln_hitchance(struct plnstr *, int, int);
@@ -674,6 +669,7 @@ extern void snxtitem_all(struct nstr_item *, int);
 extern void snxtitem_group(struct nstr_item *, int, char);
 extern void snxtitem_rewind(struct nstr_item *);
 extern int snxtitem_list(struct nstr_item *, int, int *, int);
+extern void snxtitem_cargo(struct nstr_item *, int, int, int);
 /* snxtsct.c */
 extern int snxtsct(struct nstr_sect *, char *);
 extern void snxtsct_area(struct nstr_sect *, struct range *);
@@ -686,11 +682,12 @@ extern void snxtsct_dist(struct nstr_sect *, coord, coord, int);
 extern void resupply_all(struct lndstr *);
 extern void resupply_commod(struct lndstr *, i_type);
 extern int supply_commod(int, int, int, i_type, int);
-extern int has_supply(struct lndstr *);
+extern int lnd_in_supply(struct lndstr *);
+extern int lnd_could_be_supplied(struct lndstr *);
 /* takeover.c */
-extern void takeover_land(struct lndstr *, natid, int);
+extern void takeover_land(struct lndstr *, natid);
 extern void takeover(struct sctstr *, natid);
-extern void takeover_ship(struct shpstr *, natid, int);
+extern void takeover_ship(struct shpstr *, natid);
 extern void takeover_plane(struct plnstr *, natid);
 /* trdsub.c */
 /* trechk.c */
@@ -703,9 +700,10 @@ extern int typed_wu(natid, natid, char *, int);
 extern int wu(natid, natid, char *, ...) ATTRIBUTE((format (printf, 3, 4)));
 
 /*
- * src/lib/update/ *.c 
+ * 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);