- * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
- * Ken Stevens, Steve McClure
+ * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Ken Stevens, Steve McClure, Markus Armbruster
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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/>.
time_t lnd_timestamp; /* Last time this unit was touched */
natid lnd_own; /* owner's country num */
coord lnd_x; /* x location in abs coords */
time_t lnd_timestamp; /* Last time this unit was touched */
natid lnd_own; /* owner's country num */
coord lnd_x; /* x location in abs coords */
short lnd_mission; /* mission code */
short lnd_radius; /* mission radius */
/* end of part matching struct empobj */
short lnd_mission; /* mission code */
short lnd_radius; /* mission radius */
/* end of part matching struct empobj */
signed char lnd_harden; /* fortification */
short lnd_retreat; /* retreat percentage */
int lnd_rflags; /* When do I retreat? */
signed char lnd_harden; /* fortification */
short lnd_retreat; /* retreat percentage */
int lnd_rflags; /* When do I retreat? */
short lnd_item[I_MAX+1]; /* amount of items on board */
short lnd_pstage; /* plague stage */
short lnd_ptime; /* how many etus remain in this stage */
short lnd_item[I_MAX+1]; /* amount of items on board */
short lnd_pstage; /* plague stage */
short lnd_ptime; /* how many etus remain in this stage */
unsigned char l_nxlight; /* maximum number of xlight planes */
unsigned char l_nland; /* maximum number of units */
signed char l_type; /* index in lchr[] */
unsigned char l_nxlight; /* maximum number of xlight planes */
unsigned char l_nland; /* maximum number of units */
signed char l_type; /* index in lchr[] */
-#define L_ENGINEER bit(1) /* Do engineering things */
-#define L_SUPPLY bit(2) /* supply other units/sects */
-#define L_SECURITY bit(3) /* anti-terrorist troops */
-#define L_LIGHT bit(4) /* can go on ships */
-#define L_MARINE bit(5) /* marine units, good at assaulting */
-#define L_RECON bit(6) /* recon units, good at spying */
+#define L_ENGINEER bit(1) /* Do engineering things */
+#define L_SUPPLY bit(2) /* supply other units/sects */
+#define L_SECURITY bit(3) /* anti-terrorist troops */
+#define L_LIGHT bit(4) /* can go on ships */
+#define L_MARINE bit(5) /* marine units, good at assaulting */
+#define L_RECON bit(6) /* recon units, good at spying */
#define L_RADAR bit(7) /* radar unit */
#define L_ASSAULT bit(8) /* can assault */
#define L_FLAK bit(9) /* flak unit */
#define L_RADAR bit(7) /* radar unit */
#define L_ASSAULT bit(8) /* can assault */
#define L_FLAK bit(9) /* flak unit */
-#define L_SPY bit(10) /* spy unit - way cool */
-#define L_TRAIN bit(11) /* train unit - neato */
-#define L_HEAVY bit(12) /* heavy unit - can't go on trains */
+#define L_SPY bit(10) /* spy unit - way cool */
+#define L_TRAIN bit(11) /* train unit - neato */
+#define L_HEAVY bit(12) /* heavy unit - can't go on trains */
/* Work required for building 100% */
#define LND_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm))
/* Work required for building 100% */
#define LND_BLD_WORK(lcm, hcm) (20 + (lcm) + 2 * (hcm))
extern float l_att(struct lchrstr *, int);
extern float l_def(struct lchrstr *, int);
extern int l_vul(struct lchrstr *, int);
extern float l_att(struct lchrstr *, int);
extern float l_def(struct lchrstr *, int);
extern int l_vul(struct lchrstr *, int);
-extern void lnd_sweep(struct emp_qelem *, int, int, natid);
+extern int lnd_sweep(struct emp_qelem *, int, int, natid);
extern int lnd_interdict(struct emp_qelem *, coord, coord, natid);
extern int lnd_interdict(struct emp_qelem *, coord, coord, natid);
extern double lnd_pathcost(struct lndstr *, double);
extern int lnd_mobtype(struct lndstr *);
extern double lnd_mobcost(struct lndstr *, struct sctstr *);
extern double lnd_pathcost(struct lndstr *, double);
extern int lnd_mobtype(struct lndstr *);
extern double lnd_mobcost(struct lndstr *, struct sctstr *);
extern double attack_val(int, struct lndstr *);
extern double defense_val(struct lndstr *);
extern int lnd_reaction_range(struct lndstr *);
extern double attack_val(int, struct lndstr *);
extern double defense_val(struct lndstr *);
extern int lnd_reaction_range(struct lndstr *);
-extern void lnd_print(struct ulist *, char *);
-extern void lnd_delete(struct ulist *, char *);
+extern void lnd_print(natid, struct ulist *, char *);
extern int lnd_take_casualty(int, struct ulist *, int);
extern void lnd_submil(struct lndstr *, int);
extern void lnd_takemob(struct emp_qelem *, double);
extern int lnd_spyval(struct lndstr *);
extern void intelligence_report(int, struct lndstr *, int, char *);
extern int lnd_take_casualty(int, struct ulist *, int);
extern void lnd_submil(struct lndstr *, int);
extern void lnd_takemob(struct emp_qelem *, double);
extern int lnd_spyval(struct lndstr *);
extern void intelligence_report(int, struct lndstr *, int, char *);
-extern void lnd_mar(struct emp_qelem *, double *, double *, int *, natid);
+extern void lnd_mar_stay_behind(struct emp_qelem *, natid);
+extern void lnd_mar_put(struct emp_qelem *, natid);
+extern void lnd_put(struct emp_qelem *);
+extern void lnd_put_one(struct ulist *);
-extern int lnd_mar_one_sector(struct emp_qelem *, int, natid, int);
+extern int lnd_abandon_askyn(struct emp_qelem *);
+extern int lnd_mar_dir(struct emp_qelem *, int, natid);
+extern int lnd_mar_gauntlet(struct emp_qelem *, int, natid);
extern int lnd_support(natid, natid, coord, coord, int);
extern int lnd_can_attack(struct lndstr *);
extern int lnd_support(natid, natid, coord, coord, int);
extern int lnd_can_attack(struct lndstr *);