/*
* 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
#include "queue.h"
#include "misc.h"
#include "retreat.h"
+#include "var.h"
#define SHIP_MINEFF 20
/* 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)
#define TMAX 6
-#define MAXSHPV 12
-
#define MAXSHPPATH 28
#define MAXSHPNAMLEN 24
short shp_lstart[TMAX]; /* How much do we pick up at the start */
short shp_lend[TMAX]; /* How much do we pick up at the end */
u_char shp_autonav; /* autonavigation flags */
- s_char shp_nv; /* current number of variables */
- u_char shp_vtype[MAXSHPV];
- u_short shp_vamt[MAXSHPV];
+ short shp_item[I_MAX+1]; /* amount of items on board */
+ u_short shp_pstage; /* plague stage */
+ u_short shp_ptime; /* how many etus remain in this stage */
time_t shp_access; /* Last time mob was updated (MOB_ACCESS) */
time_t shp_timestamp; /* Last time this ship was touched. */
u_char shp_mobquota; /* mobility quota */
};
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 */
#define M_CHOPPER bit(16) /* can hold choppers */
#define M_OILER bit(17) /* can re-fuel ships */
#define M_SUPPLY bit(18) /* Can supply units/sects/ships */
-/* M_XUNIT will be automatically set in init_global() if m_nland > 0 */
+/* M_UNIT will be automatically set in init_global() if m_nland > 0 */
#define M_UNIT bit(19) /* Can carry units */
#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)
#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)
#define CN_CONSTRUCTION (2)
#define CN_ERROR (-1)
+enum {
+ SHP_AIROPS_EFF = 50, /* min. efficiency for air ops */
+ SHP_TORP_SHELLS = 3 /* number of shells used by a torpedo */
+};
+
#endif /* _SHIP_H_ */