Rename plane_caps() to pln_caps() and give it external linkage
This commit is contained in:
parent
fa03ba9aad
commit
f760150d8f
3 changed files with 22 additions and 19 deletions
|
@ -545,6 +545,7 @@ extern void pln_dropoff(struct emp_qelem *, struct ichrstr *,
|
|||
coord, coord, int);
|
||||
extern void pln_mine(struct emp_qelem *, coord, coord);
|
||||
extern int pln_capable(struct plnstr *, int, int);
|
||||
extern int pln_caps(struct emp_qelem *);
|
||||
extern int pln_airbase_ok(struct plnstr *, int, int);
|
||||
extern int carrier_planes(struct shpstr *, int);
|
||||
extern void pln_sel(struct nstr_item *, struct emp_qelem *,
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
|
||||
#define FLAK_GUN_MAX 14
|
||||
|
||||
static int plane_caps(struct emp_qelem *);
|
||||
static void sam_intercept(struct emp_qelem *, struct emp_qelem *,
|
||||
natid, natid, coord, coord, int);
|
||||
static void ac_intercept(struct emp_qelem *, struct emp_qelem *,
|
||||
|
@ -106,7 +105,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
|
|||
getilists(ilist, rel, plane_owner);
|
||||
|
||||
if (mission_flags & PM_R) {
|
||||
flags = plane_caps(bomb_list);
|
||||
flags = pln_caps(bomb_list);
|
||||
if (flags & P_S) {
|
||||
PR(plane_owner, "\nSPY Plane report\n");
|
||||
PRdate(plane_owner);
|
||||
|
@ -137,7 +136,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
|
|||
}
|
||||
|
||||
if (mission_flags & PM_R) {
|
||||
flags = plane_caps(bomb_list);
|
||||
flags = pln_caps(bomb_list);
|
||||
if (opt_HIDDEN)
|
||||
setcont(plane_owner, sect.sct_own, FOUND_FLY);
|
||||
if (sect.sct_type == SCT_WATER) {
|
||||
|
@ -261,22 +260,6 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
|
|||
pln_put(&ilist[cn]);
|
||||
}
|
||||
|
||||
static int
|
||||
plane_caps(struct emp_qelem *list)
|
||||
{
|
||||
struct emp_qelem *qp;
|
||||
struct plist *plp;
|
||||
int fl;
|
||||
|
||||
fl = 0;
|
||||
for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
|
||||
plp = (struct plist *)qp;
|
||||
fl |= plp->pcp->pl_flags;
|
||||
}
|
||||
|
||||
return fl;
|
||||
}
|
||||
|
||||
static void
|
||||
sam_intercept(struct emp_qelem *att_list, struct emp_qelem *def_list,
|
||||
natid def_own, natid plane_owner, coord x, coord y,
|
||||
|
|
|
@ -391,6 +391,25 @@ pln_capable(struct plnstr *pp, int wantflags, int nowantflags)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return union of capabilities of planes in LIST.
|
||||
*/
|
||||
int
|
||||
pln_caps(struct emp_qelem *list)
|
||||
{
|
||||
struct emp_qelem *qp;
|
||||
struct plist *plp;
|
||||
int fl;
|
||||
|
||||
fl = 0;
|
||||
for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
|
||||
plp = (struct plist *)qp;
|
||||
fl |= plp->pcp->pl_flags;
|
||||
}
|
||||
|
||||
return fl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find plane types that can operate from carrier SP.
|
||||
* If MSL find missile types, else non-missile types.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue