Re-fix altar compiler warning

Implement a better fix for commit 2f4f7d22d ("Fix align type
mixup wth align mask") which was reverted in commit 4e35e8b5a
("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:
Dean Luick
2021-02-07 22:25:25 -06:00
parent ebc2dfdcf2
commit 5eaf028c0f
5 changed files with 48 additions and 41 deletions

View File

@@ -621,7 +621,7 @@ extern void find_hell(d_level *);
extern void goto_hell(boolean, boolean);
extern void assign_level(d_level *, d_level *);
extern void assign_rnd_level(d_level *, d_level *, int);
extern int induced_align(int);
extern unsigned int induced_align(int);
extern boolean Invocation_lev(d_level *);
extern xchar level_difficulty(void);
extern schar lev_by_name(const char *);