(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:
parent
308430e751
commit
d30942632b
38 changed files with 143 additions and 134 deletions
|
@ -52,9 +52,10 @@
|
|||
void
|
||||
item_damage(int pct, short *item)
|
||||
{
|
||||
int i, lose;
|
||||
int lose;
|
||||
i_type i;
|
||||
|
||||
for (i = 1; i <= I_MAX; ++i) {
|
||||
for (i = I_NONE + 1; i <= I_MAX; ++i) {
|
||||
if (opt_SUPER_BARS && i == I_BAR)
|
||||
continue;
|
||||
lose = roundavg((double)item[i] * pct * 0.01);
|
||||
|
@ -192,7 +193,7 @@ effdamage(register int amt, int dam)
|
|||
}
|
||||
|
||||
int
|
||||
commdamage(register int amt, int dam, int vtype)
|
||||
commdamage(int amt, int dam, i_type vtype)
|
||||
{
|
||||
int lost;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue