]> git.pond.sub.org Git - empserver/blobdiff - include/prototypes.h
Move pln_oninit(), lnd_oninit(), nuk_oninit() to filetable.c
[empserver] / include / prototypes.h
index 55a2be7f6fa6e987267e7d5367150f15bac42cd3..a520ea206a5c7bd3d620bf82dcec6961d99b36e9 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -40,7 +39,6 @@
 #include <string.h>
 #include <time.h>
 #include "item.h"
-#include "nsc.h"
 #include "misc.h"
 #include "types.h"
 
@@ -96,7 +94,6 @@ int buil(void);
 int buy(void);
 int capi(void);
 int carg(void);
-int cede(void);
 int cens(void);
 int chan(void);
 int coas(void);
@@ -254,8 +251,6 @@ int zdon(void);
 /*
  * src/lib/common/ *.c
  */
-/* bestpath.c */
-extern char *bestownedpath(char *, char *, int, int, int, int, int);
 /* conftab.c */
 extern int read_builtin_tables(void);
 extern int read_custom_tables(void);
@@ -284,17 +279,6 @@ extern int mapdist(int, int, int, int);
 /* in path.h */
 /* nstreval.c */
 /* in nsc.h */
-/* path.c */
-extern void bp_enable_cachepath(void);
-extern void bp_disable_cachepath(void);
-extern void bp_clear_cachepath(void);
-extern char *BestDistPath(char *, struct sctstr *, struct sctstr *,
-                         double *);
-extern char *BestLandPath(char *, struct sctstr *, struct sctstr *,
-                         double *, int);
-extern char *BestShipPath(char *, int, int, int, int, int);
-extern char *BestAirPath(char *, int, int, int, int);
-extern double pathcost(struct sctstr *, char *, int);
 /* rdsched.c */
 extern int read_schedule(char *, time_t[], int, time_t, time_t);
 /* res_pop.c */
@@ -337,8 +321,6 @@ extern char *numstr(char buf[], int n);
 extern char *esplur(int n);
 extern char *splur(int n);
 extern char *iesplur(int n);
-extern char *plurize(char *buf, int max_len, int n);
-/* more in misc.h */
 
 /*
  * src/lib/global/ *.c
@@ -381,6 +363,7 @@ extern int natpass(natid, char *);
 extern struct player *player;  /* current player's context */
 extern char *praddr(struct player *);
 extern void player_main(struct player *);
+extern void make_stale_if_command_arg(char *);
 /* more under Commands */
 /* recvclient.c */
 extern int recvclient(char *, int);
@@ -439,6 +422,7 @@ extern void ef_fin_srv(void);
 extern int sd(natid, natid, coord, coord, int, int, int);
 extern int dd(natid, natid, coord, coord, int, int);
 extern int shipdef(natid, natid, coord, coord);
+extern int feels_like_helping(natid, natid, natid);
 /* getbit.c */
 extern int emp_getbit(int, int, unsigned char *);
 extern void emp_setbit(int, int, unsigned char *);
@@ -447,7 +431,6 @@ extern void bitinit2(struct nstr_sect *, unsigned char *, int);
 extern int getele(char *, char *);
 /* land.c */
 extern char *prland(struct lndstr *);
-extern void lnd_oninit(void *);
 extern void lnd_postread(int, void *);
 extern void lnd_prewrite(int, void *, void *);
 /* landgun.c */
@@ -465,11 +448,7 @@ extern int has_units(coord, coord, natid, struct lndstr *);
 extern int adj_units(coord, coord, natid);
 extern int islist(char *);
 /* maps.c */
-extern int do_map(int bmap, int unit_type, char *arg1, char *arg2);
-extern int display_region_map(int bmap, int unit_type, coord curx,
-                             coord cury, char *arg);
-extern int bmaps_intersect(natid, natid);
-extern int share_bmap(natid, natid, struct nstr_sect *, char, char *);
+/* in map.h */
 /* mission.c */
 extern char *mission_name(int);
 extern int collateral_damage(coord, coord, int);
@@ -485,7 +464,7 @@ extern int cando(int, int);
 extern int check_lmines(coord, coord, double);
 extern int move_ground(struct sctstr *, struct sctstr *,
                       double, char *,
-                      int (*)(coord, coord, char *),
+                      int (*)(coord, coord, char *, char *),
                       int, int *);
 extern int fly_map(coord, coord);
 /* mslsub.c */
@@ -509,18 +488,15 @@ extern void init_nreport(void);
 extern void nreport(natid, int, natid, int);
 /* nuke.c */
 extern char *prnuke(struct nukstr *);
-extern void nuk_oninit(void *);
 extern void nuk_postread(int, void *);
 extern void nuk_prewrite(int, void *, void *);
 /* nxtitem.c */
-extern int nxtitem(struct nstr_item *, void *);
 /* nxtsct.c */
-extern int nxtsct(struct nstr_sect *, struct sctstr *);
+/* in nsc.h */
 /* onearg.c */
 extern int onearg(char *, char *);
 /* plane.c */
 extern char *prplane(struct plnstr *);
-extern void pln_oninit(void *);
 extern void pln_postread(int, void *);
 extern void pln_prewrite(int, void *, void *);
 /* plnsub.c */
@@ -573,25 +549,21 @@ extern int prmptrd(char *prompt, char *str, int size);
 extern int uprmptrd(char *prompt, char *str, int size);
 extern void prdate(void);
 extern void prxy(char *, coord, coord);
-extern void PR(int, char *, ...) ATTRIBUTE((format (printf, 2, 3)));
-extern void PRdate(natid cn);
 extern void pr_beep(void);
 extern void mpr(int, char *, ...) ATTRIBUTE((format (printf, 2, 3)));
 extern size_t copy_ascii_no_funny(char *, char *);
 extern size_t copy_utf8_no_funny(char *, char *);
 extern size_t copy_utf8_to_ascii_no_funny(char *, char *);
 extern int ufindpfx(char *, int);
-
 /* radmap.c */
 extern int deltx(struct range *, coord);
 extern int delty(struct range *, coord);
-extern void radmap(int, int, int, int, double);
-extern void radmapnopr(int, int, int, int, double);
-extern void radmapupd(int, int, int, int, int, double);
+extern void radmap(int, int, int, double, int, double);
+extern void rad_map_set(natid, int, int, int, double, int);
 /* rej.c */
-extern int setrel(natid, natid, int);
-extern int setcont(natid, natid, int);
-extern int setrej(natid, natid, int, int);
+extern void setrel(natid, natid, int);
+extern void setcont(natid, natid, int);
+extern void setrej(natid, natid, int, int);
 /* retreat.c */
 extern void retreat_ship(struct shpstr *, char);
 extern void retreat_land(struct lndstr *, char);
@@ -606,7 +578,7 @@ extern int sarg_list(char *, int *, int);
 /* satmap.c */
 extern void satdisp_sect(struct sctstr *, int);
 extern void satdisp_units(coord, coord);
-extern void satmap(int, int, int, int, int, int);
+extern int satmap(int, int, int, int, int, int);
 extern void sathead(void);
 /* sect.c */
 extern void sct_postread(int, void *);
@@ -655,23 +627,8 @@ extern void shp_missdef(struct shpstr *, natid);
 extern double shp_mobcost(struct shpstr *);
 extern void shp_set_tech(struct shpstr *, int);
 /* snxtitem.c */
-extern int snxtitem(struct nstr_item *, int, char *, char *);
-extern void snxtitem_area(struct nstr_item *, int, struct range *);
-extern void snxtitem_dist(struct nstr_item *, int, int, int, int);
-extern void snxtitem_xy(struct nstr_item *, int, coord, coord);
-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 *);
-extern void xydist_range(coord, coord, int, struct range *);
-extern void xysize_range(struct range *);
-extern void snxtsct_all(struct nstr_sect *);
-extern void snxtsct_rewind(struct nstr_sect *);
-extern void snxtsct_dist(struct nstr_sect *, coord, coord, int);
+/* in nsc.h */
 /* supply.c */
 extern int sct_supply(struct sctstr *, i_type, int);
 extern int shp_supply(struct shpstr *, i_type, int);
@@ -707,7 +664,7 @@ extern void delete_old_announcements(void);
 /* deliver.c */
 extern void dodeliver(struct sctstr *);
 /* distribute.c */
-extern int dodistribute(struct sctstr *, int, char *, double, double);
+extern int dodistribute(struct sctstr *, int, double);
 /* finish.c */
 extern void finish_sects(int);
 /* human.c */
@@ -741,7 +698,7 @@ extern int nav_ship(struct shpstr *);
 extern int load_it(struct shpstr *, struct sctstr *, int);
 extern void unload_it(struct shpstr *);
 /* nxtitemp.c */
-extern void *nxtitemp(struct nstr_item *);
+/* in nsc.h */
 /* plague.c */
 extern void do_plague(struct sctstr *, struct natstr *, int);
 extern int plague_people(struct natstr *, short *, int *, int *, int);