Don't store ship stats in struct shpstr

New shp_armor(), shp_speed(), shp_visib(), shp_frnge(), shp_glim()
replace the struct shpstr members with the same names.
This commit is contained in:
Markus Armbruster 2008-03-04 21:15:59 +01:00
parent ffc5d0cfd7
commit f86d726406
13 changed files with 73 additions and 45 deletions

View file

@ -88,3 +88,33 @@ m_glim(struct mchrstr *mcp, int tech)
{
return SHP_FIR(mcp->m_glim, MAX(0, tech - mcp->m_tech));
}
int
shp_armor(struct shpstr *sp)
{
return m_armor(mchr + sp->shp_type, sp->shp_tech);
}
int
shp_speed(struct shpstr *sp)
{
return m_speed(mchr + sp->shp_type, sp->shp_tech);
}
int
shp_visib(struct shpstr *sp)
{
return m_visib(mchr + sp->shp_type, sp->shp_tech);
}
int
shp_frnge(struct shpstr *sp)
{
return m_frnge(mchr + sp->shp_type, sp->shp_tech);
}
int
shp_glim(struct shpstr *sp)
{
return m_glim(mchr + sp->shp_type, sp->shp_tech);
}