]> git.pond.sub.org Git - empserver/blobdiff - include/empobj.h
Rearrange struct sctstr slightly to expose commonalities with units
[empserver] / include / empobj.h
index 713f2f4a50e118773e748c849faaf291d8bd9200..0cf52d4a797482e1bc777c99f0f8bf9ca6ec9bd0 100644 (file)
@@ -55,19 +55,21 @@ struct empobj {
      * initial part must match struct emptypedstr
      * valid if EFF_TYPED is set in table's flags
      */
-    short ef_type;
-    short uid;
-    unsigned seqno;
+    signed ef_type: 8;
+    unsigned seqno: 12;
+    unsigned generation: 12;
+    int uid;
     time_t timestamp;
     /* end of part matching struct emptypedstr */
     natid own;         /* valid if EFF_OWNER is in table's flags */
     coord x;           /* valid if EFF_XY    is in table's flags */
     coord y;           /* valid if EFF_XY    is in table's flags */
-    signed char type;  /* valid for sectors and units */
-    /* remaining are valid for units */
+    /* remaining are valid for sectors and units */
+    signed char type;
     signed char effic;
     signed char mobil;
     unsigned char off;
+    /* remaining are valid for units */
     short tech;
     char group;                /* valid if EFF_GROUP is in table's flags */
     coord opx, opy;
@@ -76,7 +78,6 @@ struct empobj {
 };
 
 union empobj_storage {
-    short ef_type;
     struct empobj gen;
     struct comstr comm;
     struct gamestr game;
@@ -84,7 +85,6 @@ union empobj_storage {
     struct lonstr loan;
     struct loststr lost;
     struct natstr nat;
-    struct nwsstr news;
     struct nukstr nuke;
     struct plnstr plane;
     struct realmstr realm;