(build_ship, orde, qorde, nav_loadship, load_it, unload_it): Store

item types instead of mnemo characters in shpstr members shp_tstart[]
and shp_tend[].
(com_num): No longer used, remove.

(orde): Simplify swap code.

(prhold): New, factored out of qorde().
This commit is contained in:
Markus Armbruster 2004-04-08 19:14:09 +00:00
parent 7b42409c9a
commit e42f7e8210
5 changed files with 35 additions and 67 deletions

View file

@ -158,8 +158,7 @@ static int
nav_loadship(register struct shpstr *sp, natid cnum)
{
struct sctstr *sectp;
s_char item;
int i, landown, shipown, level, didsomething[TMAX], rel;
int i, landown, shipown, didsomething[TMAX], rel;
for (i = 0; i < TMAX; i++)
didsomething[i] = 0;
@ -182,12 +181,9 @@ nav_loadship(register struct shpstr *sp, natid cnum)
/* loop through each field for that ship */
for (i = 0; i < TMAX; ++i) {
item = sp->shp_tend[i]; /* commodity */
level = sp->shp_lend[i]; /* amount */
/* check and see if the data fields have been set. */
if (item == ' ' || level == 0) {
if (sp->shp_tend[i] == I_NONE || sp->shp_lend[i] == 0) {
/* nothing to do move on. */
didsomething[i] = 1;
continue;