Re-fix altar compiler warning
Implement a better fix for commit2f4f7d22d("Fix align type mixup wth align mask") which was reverted in commit4e35e8b5a("Revert "Fix align type mixup wth align mask""). In the present code, the field align in both struct altar and struct monster is not an aligntyp, but an align mask with extra flags. Change the type to match its actual use and improve the naming. Consolidate duplicated code into a single routine. Change the return type of induced_align() to be unsigned to match amask usage. Change the special level align mask values to be separate from the normal align mask values.
This commit is contained in:
@@ -1869,7 +1869,8 @@ assign_rnd_level(d_level *dest, d_level *src, int range)
|
||||
dest->dlevel = 1;
|
||||
}
|
||||
|
||||
int
|
||||
/* return an alignment mask */
|
||||
unsigned int
|
||||
induced_align(int pct)
|
||||
{
|
||||
s_level *lev = Is_special(&u.uz);
|
||||
|
||||
Reference in New Issue
Block a user