]> git.pond.sub.org Git - empserver/blobdiff - include/ship.h
Update copyright notice.
[empserver] / include / ship.h
index 9887beb2eec4a729d60794f0bcb79d69ff05b56d..d88d0c6c899a4157462e972012910314d72ac7f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
 
 /* bit masks for the autonav mode flags */
 
-/*
-#define AN_SAILDIR  1
-#define AN_AUTONAV  2
-#define AN_STANDBY  4
-#define AN_LOADING  8
- */
 #define AN_SAILDIR bit(1)
 #define AN_AUTONAV bit(2)
 #define AN_STANDBY bit(3)
@@ -134,9 +128,7 @@ struct fltheadstr {
 };
 
 struct mchrstr {
-    u_char m_nv;               /* number of variables it can hold */
-    u_char m_vtype[MAXCHRNV];
-    u_short m_vamt[MAXCHRNV];
+    u_short m_item[I_MAX+1];   /* load limit */
     int m_lcm;                 /* units of lcm to build */
     int m_hcm;                 /* units of hcm to build */
     int m_armor;               /* how well armored it is */
@@ -185,9 +177,9 @@ struct mchrstr {
 #define M_ANTIMISSILE   bit(20)        /* Shoot down missile */
 
 #define getship(n, p) \
-       ef_read(EF_SHIP, n, (caddr_t)p)
+       ef_read(EF_SHIP, n, p)
 #define putship(n, p) \
-       ef_write(EF_SHIP, n, (caddr_t)p)
+       ef_write(EF_SHIP, n, p)
 #define getshipp(n) \
        (struct shpstr *) ef_ptr(EF_SHIP, n)
 
@@ -212,6 +204,9 @@ struct mlist {
 #define SHP_FIR(b, t) (t ? (b * (logx((double)t, (double)60.0) < 1.0 ? 1.0 : \
                             logx((double)t, (double)60.0))) : b)
 
+/* Work required for building 100% */
+#define SHP_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm))
+
  /* return codes from shp_check_nav */
 #define CN_NAVIGABLE   (0)
 #define CN_LANDLOCKED  (1)
@@ -219,7 +214,8 @@ struct mlist {
 #define CN_ERROR       (-1)
 
 enum {
-    M_TORP_SHELLS = 3          /* number of shells used by a torpedo */
+    SHP_AIROPS_EFF = 50,       /* min. efficiency for air ops */
+    SHP_TORP_SHELLS = 3                /* number of shells used by a torpedo */
 };
 
 #endif /* _SHIP_H_ */