]> git.pond.sub.org Git - empserver/blobdiff - include/nat.h
Extend the common header of struct empobj to include uid
[empserver] / include / nat.h
index 4adf6add33165b2bda3659d881eedea631b790be..b54c8bf9ebde001422ccfa564bb8a97f68f07da9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -39,6 +39,8 @@
 #include <time.h>
 #include "types.h"
 
+#define NATID_BAD 255
+
 #define        MAXNOR          50      /* max # realms */
 
 /* Nation status */
@@ -67,9 +69,9 @@ typedef enum {
 struct realmstr {
     /* initial part must match struct empobj */
     short ef_type;
+    short r_uid;               /* realm table index */
     natid r_cnum;              /* country number */
     /* end of part matching struct empobj */
-    short r_uid;               /* realm table index */
     unsigned short r_realm;    /* realm number */
     short r_xl, r_xh;          /* horizontal bounds */
     short r_yl, r_yh;          /* vertical bounds */
@@ -79,6 +81,7 @@ struct realmstr {
 struct natstr {
     /* initial part must match struct empobj */
     short ef_type;
+    short nat_uid;             /* equals nat_cnum */
     natid nat_cnum;            /* our country number */
     /* end of part matching struct empobj */
     nat_status nat_stat;
@@ -109,14 +112,6 @@ struct natstr {
     long nat_flags;            /* nation flags */
 };
 
-       /* nstat values */
-#define VIS            bit(0)
-#define SANCT          (bit(1) | VIS)
-#define NORM           (bit(2) | VIS)
-#define GOD            (bit(3) | NORM | VIS)
-#define        CAP             bit(6)
-#define        MONEY           bit(7)
-
        /* nation relation codes */
 #define        AT_WAR          0
 #define SITZKRIEG       1