Prev: 43790 Up: Map Next: 43831
43810: Action: Clear Event Flag
Clears the bit operand in Flags_EventStates.
Input
F The zero flag is set when the conditions hold
IX Pointer to the script entry (opcode, event index)
When the condition failed, skip this action.
Action_ClearEventFlag 43810 JP NZ,RunScript_SkipAction_TwoBytes Jump to RunScript_SkipAction_TwoBytes if the condition failed.
The operand selects which event bit to clear in Flags_EventStates.
43813 LD B,(IX+1) Fetch the event number from *IX+1 into B.
43816 INC B Start the count at one so event 0 needs a single rotate.
43817 XOR A Clear A and set the carry flag as the seed bit.
43818 SCF
ClearEventMask 43819 RLA Rotate the seed bit left into the mask.
43820 DJNZ ClearEventMask Decrease the event count by one and loop back to ClearEventMask until the bit is in place.
Clear that bit so the event no longer follows the player.
43822 LD HL,41169 Clear that bit in *Flags_EventStates.
43825 CPL
43826 AND (HL)
43827 LD (HL),A
43828 JP RunScript_SkipAction_TwoBytes Jump to RunScript_SkipAction_TwoBytes.
Prev: 43790 Up: Map Next: 43831