; Copyright 2014, 2017, 2020, 2025 Richard Dymond (rjdymond@gmail.com)

[Glossary:Animation frame index mask]
The animation frame index mask for a <a href="#guardian">guardian</a> is found
in bits 5-7 of byte 1 of its buffer (see #R33024) while it is on-screen, having
been copied there from the corresponding <a href="#entity_definition">entity
definition</a> (see #R40960). The mask determines the animation frames that the
guardian's sprite cycles through. If 'B' is the guardian's base frame (0-7),
then its sprite will cycle through animation frames as follows, where '|'
denotes a bitwise '#S/OR/' operation (see #R37393):

#TABLE(boxData,centre)
{ =h Mask | =h Frames }
{ 000 | B (1 frame) }
{ 001 | B, B|1 (1 or 2 distinct frames) }
{ 010 | B, B, B|2, B|2 (1 or 2 distinct frames) }
{ 011 | B, B|1, B|2, B|3 (1, 2 or 4 distinct frames) }
{ 100 | B, B, B, B, B|4, B|4, B|4, B|4 (1 or 2 distinct frames) }
{ 101 | B, B|1, B, B|1, B|4, B|5, B|4, B|5 (1, 2 or 4 distinct frames) }
{ 110 | B, B, B|2, B|2, B|4, B|4, B|6, B|6 (1, 2 or 4 distinct frames) }
{ 111 | B, B|1, B|2, B|3, B|4, B|5, B|6, B|7 (1, 2, 4 or 8 distinct frames) }
TABLE#

For example, if a guardian's base frame is 2 and its animation frame index mask
is 011, then its sprite will cycle through frames 2, 2|1, 2|2 and 2|3 (i.e.
frames 2 and 3).

Note that the animation frame masks 100, 101 and 110 are not used by any
guardians in the game, and no guardian has a base frame of 7.

[Glossary:Entity]
A guardian, arrow or rope.

[Glossary:Entity definition]
One of the 128 8-byte blocks located at #R40960 onwards. Each one defines the
location and movement characteristics of a guardian, arrow or rope.

[Glossary:Entity specification]
One of the eight pairs of bytes at the end of a room definition (e.g. at
#R53488). Each one specifies a guardian, arrow or rope present in the room.

[Glossary:Guardian]
An inhabitant of a room that continuously moves left and right (horizontal
guardian) or up and down (vertical guardian) in a straight line, or
#FACT(guardianOrFixture)(stays still). Contact with a guardian is fatal. Some
examples are:

#UDGTABLE(gallery)
{ #R50432(The Security Guard)  | #GUARDIAN191,4,66 }
{ #R54016(The Forgotten Abbey) | #GUARDIAN180,2,6 }
{ #R57600(The Bathroom)        | #GUARDIAN185,1,4 }
TABLE#

The graphic data for all the guardians in the game can be found at #R43776.

[Glossary:Nasty]
An immobile object drawn in a single cell as part of a room along with the
background, walls, floors, ramp and conveyor. Contact with a nasty is fatal.
Some examples are:

#UDGTABLE(gallery)
{ #R51968(The Hall)        | #UDG52156,68(nasty11) }
{ #R55552(Cold Store)      | #UDG55740,79(nasty25) }
{ #R61696(The Wine Cellar) | #UDG61884,70(nasty49) }
TABLE#
