]> git.pond.sub.org Git - empserver/blobdiff - include/nat.h
Move setting nat_cnam, nat_pnam into nat_reset()
[empserver] / include / nat.h
index d64f8036c796a7575b7ea42405e22e36043f42fc..21a6d0b2ebb90abaf6d63187503b5398517085d5 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, 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/>.
  *
  *  ---
  *
@@ -32,7 +31,7 @@
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
  *     Ron Koenderink, 2005-2008
- *     Markus Armbruster, 2005-2008
+ *     Markus Armbruster, 2005-2011
  */
 
 #ifndef NAT_H
@@ -43,7 +42,7 @@
 
 #define NATID_BAD 255
 
-#define        MAXNOR          50      /* max # realms */
+#define MAXNOR         50      /* max # realms */
 
 /* Nation status */
 enum nat_status {
@@ -119,24 +118,22 @@ struct natstr {
 };
 
        /* nation relation codes */
-#define        AT_WAR          0
-#define SITZKRIEG       1
-#define MOBILIZATION    2
-#define        HOSTILE         3
-#define        NEUTRAL         4
-#define FRIENDLY        5
-#define        ALLIED          6
+#define AT_WAR         0
+#define HOSTILE                1
+#define NEUTRAL                2
+#define FRIENDLY       3
+#define ALLIED         4
 
        /* nation reject codes */
-#define        REJ_TELE        bit(0)  /* dont allow telegrams to be sent */
-#define        REJ_TREA        bit(1)  /* dont allow treaties to be offered */
-#define        REJ_ANNO        bit(2)  /* don't receive announcements */
-#define        REJ_LOAN        bit(3)  /* don't allow loans to be offered */
+#define REJ_TELE       bit(0)  /* dont allow telegrams to be sent */
+#define REJ_TREA       bit(1)  /* dont allow treaties to be offered */
+#define REJ_ANNO       bit(2)  /* don't receive announcements */
+#define REJ_LOAN       bit(3)  /* don't allow loans to be offered */
 
-#define        NAT_TLEV        0
-#define        NAT_RLEV        1
-#define        NAT_ELEV        2
-#define        NAT_HLEV        3
+#define NAT_TLEV       0
+#define NAT_RLEV       1
+#define NAT_ELEV       2
+#define NAT_HLEV       3
 
 /*
  * Number of updates contact lasts for various ways of making contact.
@@ -172,6 +169,7 @@ extern char *relatename(struct natstr *np, natid other);
 extern char *rejectname(struct natstr *np, natid other);
 extern char *natstate(struct natstr *np);
 extern int getrel(struct natstr *np, natid them);
+extern int relations_with(natid, natid);
 extern int getrejects(natid them, struct natstr *np);
 extern int getcontact(struct natstr *np, natid them);
 extern void putrel(struct natstr *np, natid them, int relate);
@@ -179,11 +177,12 @@ extern void putreject(struct natstr *np, natid them, int how, int what);
 extern void putcontact(struct natstr *np, natid them, int contact);
 extern void agecontact(struct natstr *np);
 extern int influx(struct natstr *np);
+extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
+                               enum nat_status);
 
-extern struct natstr *nat_reset(struct natstr *, enum nat_status, coord, coord);
-extern int check_nat_name(char *cname);
+extern int check_nat_name(char *, natid);
 
-extern int grant_btus(struct natstr *, int );
+extern int grant_btus(struct natstr *, int);
 
 /* nation flags */
 #define NF_INFORM      bit(0)  /* Inform me of telegrams right away */
@@ -191,7 +190,7 @@ extern int grant_btus(struct natstr *, int );
 #define NF_BEEP                bit(2)  /* Make beeping sounds when appropriate */
 #define NF_COASTWATCH  bit(3)  /* Turn auto-coastwatch on */
 #define NF_SONAR       bit(4)  /* Turn auto-sonar on */
-#define NF_TECHLISTS    bit(5) /* Sort lists by tech not type */
-#define NF_SACKED       bit(6) /* Capital was sacked, and hasn't been reset yet */
+#define NF_TECHLISTS   bit(5)  /* Sort lists by tech not type */
+#define NF_SACKED      bit(6)  /* Capital was sacked, and hasn't been reset yet */
 
 #endif