Prev: 55188 Up: Map Next: 55776
55748: Initialise Entity State
Activates an entity state effect by copying a 16-byte configuration record from Entity_State_Table into the active state slot at Entity_State_Pointer. The entity type code in E selects the record (multiplied by 16). If Entity_State_Flag is zero, no effect is pending and the routine returns immediately without change.
Input
E Entity type code
Initialise_Entity_State 55748 LD A,(50479) Return if no entity state effect is pending.
55751 AND A
55752 RET Z
55753 SLA E Multiply the entity type code by 16 to form the record offset.
55755 SLA E
55757 SLA E
55759 SLA E
55761 LD D,0
55763 LD HL,55786 Index into Entity_State_Table by offset and set DE to Entity_State_Pointer.
55766 ADD HL,DE
55767 LD DE,50465
55770 LD BC,16 Copy the 16-byte effect record to Entity_State_Pointer.
55773 LDIR
55775 RET Return.
Prev: 55188 Up: Map Next: 55776