(mchrstr, lchrstr): Change from variable-style storage of load

capacities to straight arrays.  Users now subscript the array instead
of calling vl_find() or walking the variable data structure.
(mchr, lchr): Initializers adapted.
(vl_find): No longer used.  Remove file.
This commit is contained in:
Markus Armbruster 2004-08-17 14:09:04 +00:00
parent a965b2d25e
commit 8a0854b6b8
22 changed files with 168 additions and 697 deletions

View file

@ -121,8 +121,7 @@ tend(void)
return RET_FAIL;
}
vbase = &mchr[(int)tender.shp_type];
maxtender = vl_find(ip->i_vtype, vbase->m_vtype,
vbase->m_vamt, (int)vbase->m_nv);
maxtender = vbase->m_item[ip->i_vtype];
if (maxtender == 0) {
pr("A %s cannot hold any %s\n",
mchr[(int)tender.shp_type].m_name, ip->i_name);
@ -150,8 +149,7 @@ tend(void)
continue;
}
vbase = &mchr[(int)target.shp_type];
maxtarget = vl_find(ip->i_vtype, vbase->m_vtype,
vbase->m_vamt, (int)vbase->m_nv);
maxtarget = vbase->m_item[ip->i_vtype];
if (amt < 0) {
if (!player->owner)
amt = 0;