/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* plane.h: Definitions for planes and plane types
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Ken Stevens, 1995
* Steve McClure, 1998
+ * Markus Armbruster, 2004-2009
*/
#ifndef PLANE_H
/* initial part must match struct empobj */
short ef_type;
short pln_uid; /* plane unit id */
+ unsigned pln_seqno;
+ unsigned pln_generation;
+ time_t pln_timestamp; /* Last time this plane was touched */
natid pln_own; /* owning country */
coord pln_x; /* plane x-y */
coord pln_y;
short pln_radius; /* mission radius */
/* end of part matching struct empobj */
unsigned char pln_range; /* total distance, not radius */
- unsigned char pln_range_max; /* max range for this plane */
short pln_ship; /* pointer to carrier */
short pln_land; /* pointer to carrier */
- int pln_att; /* plane air-air attack/defense values */
- int pln_def;
- int pln_acc;
- int pln_load;
- int pln_fuel; /* (unused) */
signed char pln_harden; /* for missiles */
- signed char pln_nuketype; /* type of nuclear armament (if any) */
signed char pln_flags; /* State of the plane */
short pln_access; /* Last tick mob was updated (MOB_ACCESS) */
- time_t pln_timestamp; /* Last time this plane was touched */
float pln_theta; /* position in orbital sine wave */
};
-#define PLN_LAUNCHED bit(0) /* A satellite that's in orbit */
+#define PLN_LAUNCHED bit(0) /* Flying (satellite: in orbit) */
#define PLN_SYNCHRONOUS bit(1) /* A satellite in geo-synchronous orbit */
#define PLN_AIRBURST bit(2) /* Airburst the nuke we're armed with */
extern int pl_acc(struct plchrstr *, int);
extern int pl_range(struct plchrstr *, int);
extern int pl_load(struct plchrstr *, int);
+extern int pln_att(struct plnstr *);
+extern int pln_def(struct plnstr *);
+extern int pln_acc(struct plnstr *);
+extern int pln_range_max(struct plnstr *);
+extern int pln_load(struct plnstr *);
+
+/* src/lib/common/cargo.c */
+extern void pln_carrier_change(struct plnstr *, int, int, int);
+extern int pln_first_on_ship(struct shpstr *);
+extern int pln_first_on_land(struct lndstr *);
+extern int pln_next_on_unit(int);
/* src/lib/subs/aircombat.c */
-extern void ac_combat_headers(natid, natid);
-extern void ac_airtoair(struct emp_qelem *, struct emp_qelem *);
extern int ac_flak_dam(int, int, int);
extern void ac_encounter(struct emp_qelem *, struct emp_qelem *, coord,
- coord, char *, int, int,
- struct emp_qelem *, struct emp_qelem *);
-extern int ac_isflying(struct plnstr *, struct emp_qelem *);
-extern void sam_intercept(struct emp_qelem *, struct emp_qelem *,
- natid, natid, coord, coord, int);
+ coord, char *, int);
/* src/lib/subs/aswplnsubs.c */
extern int on_shiplist(short, struct shiplist *);