(I_NONE, I_CIVIL, I_MILIT, I_SHELL, I_GUN, I_PETROL, I_IRON, I_DUST,

I_BAR, I_FOOD, I_OIL, I_LCM, I_HCM, I_UW, I_RAD, I_MAX): Turn macros
into enumeration constants.
(i_type): New.  Use where appropriate.  No functional changes, except
that I_NONE is now catched properly in a few places.
This commit is contained in:
Marc Olzheim 2004-09-16 21:18:01 +00:00
parent 308430e751
commit d30942632b
38 changed files with 143 additions and 134 deletions

View file

@ -167,13 +167,13 @@ enlist(short *vec, int etu, int *cost)
/* Fallout is calculated here. */
static void
meltitems(int etus, int fallout, int own, short *vec, int type, int x, int y,
meltitems(int etus, int fallout, int own, short *vec, i_type type, int x, int y,
int uid)
{
int n;
i_type n;
int melt;
for (n = 1; n <= I_MAX; n++) {
for (n = I_NONE + 1; n <= I_MAX; n++) {
melt = roundavg(vec[n] * etus * (long)fallout
/ (1000.0 * melt_item_denom[n]));
if (melt > vec[n])