Designate high altars with dedicated altarmask bit
High altars and normal temple altars had identical altarmasks, so there was no way to distinguish between the two based on the altarmask alone. Instead, anywhere it was necessary to determine whether an altar was a high altar included a check whether the hero was currently the Astral Plane or Moloch's Sanctum, and assumed any temple altar was the high altar. Since there's an extra, unused bit in altarmask anyway, use it to explicitly mark high altars -- the lua level files already distinguish between normal temple altars and so-called 'sanctum' altars anyway, so rather than throwing away this distinction when generating the level, keep it in the altarmask and use it in place of various u.uz checks. I think this would require incrementing EDITLEVEL again...
This commit is contained in:
@@ -544,10 +544,9 @@ enum glyph_offsets {
|
||||
(((mon)->female == 0) ? GLYPH_PET_MALE_OFF : GLYPH_PET_FEM_OFF))
|
||||
|
||||
#define altar_to_glyph(amsk) \
|
||||
(((amsk & (AM_MASK | AM_SHRINE)) == AM_NONE) \
|
||||
(((amsk & (AM_MASK | AM_SHRINE | AM_SANCTUM)) == AM_NONE) \
|
||||
? (GLYPH_ALTAR_OFF + altar_unaligned) \
|
||||
: (((amsk & AM_SHRINE) == AM_SHRINE) \
|
||||
&& (Is_astralevel(&u.uz) || Is_sanctum(&u.uz))) \
|
||||
: ((amsk & AM_SANCTUM) == AM_SANCTUM) \
|
||||
? (GLYPH_ALTAR_OFF + altar_other) \
|
||||
: ((amsk & AM_MASK) == AM_CHAOTIC) \
|
||||
? (GLYPH_ALTAR_OFF + altar_chaotic) \
|
||||
|
||||
Reference in New Issue
Block a user