Don't store plane stats in struct plnstr
New pln_att(), pln_def(), pln_acc(), pln_range_max(), pln_load() replace the struct plnstr members with the same names. Make plane selectors att and def virtual.
This commit is contained in:
parent
d1a193ff07
commit
ffc5d0cfd7
15 changed files with 111 additions and 73 deletions
|
@ -84,3 +84,33 @@ pl_load(struct plchrstr *pcp, int tech)
|
|||
{
|
||||
return PLN_LOAD(pcp->pl_load, MAX(0, tech - pcp->pl_tech));
|
||||
}
|
||||
|
||||
int
|
||||
pln_att(struct plnstr *pp)
|
||||
{
|
||||
return pl_att(plchr + pp->pln_type, pp->pln_tech);
|
||||
}
|
||||
|
||||
int
|
||||
pln_def(struct plnstr *pp)
|
||||
{
|
||||
return pl_def(plchr + pp->pln_type, pp->pln_tech);
|
||||
}
|
||||
|
||||
int
|
||||
pln_acc(struct plnstr *pp)
|
||||
{
|
||||
return pl_acc(plchr + pp->pln_type, pp->pln_tech);
|
||||
}
|
||||
|
||||
int
|
||||
pln_range_max(struct plnstr *pp)
|
||||
{
|
||||
return pl_range(plchr + pp->pln_type, pp->pln_tech);
|
||||
}
|
||||
|
||||
int
|
||||
pln_load(struct plnstr *pp)
|
||||
{
|
||||
return pl_load(plchr + pp->pln_type, pp->pln_tech);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue