Prev: EF28 Up: Map Next: EF54
EF32: Script Routine: (18) Start loop
Start a simple script loop for the current entity.
Input
IX Address of complex state data for an entity
ScriptRoutine_StartLoop EF32 RES 4,(IX+$03) Reset bit 04 of the current entity's flags byte 3.
EF36 LD IY,($72AC) Load IY with the current-entity pointer (Pointer_CurrentEntity).
EF3A RES 5,(IY+$01) Reset bit 05 of the referenced entity's flags byte 1.
EF3E LD A,(IY+$00) Load A with the referenced entity's entity type.
EF41 OR A Is the referenced entity's entity type zero? If so, jump to AdvanceScriptInstruction to run the next script instruction.
EF42 JP Z,AdvanceScriptInstruction
EF45 SET 7,(IY+$01) Set bit 07 of the referenced entity's flags byte 1.
This entry point is used by the routine at ScriptRoutine_SetLatchRaiseEvent.
Raise bit 00 of the game event flags at GameEventFlags, then continue the script.
Script_Shared_SetEventBit EF49 LD A,($72B3) Load A with the game event flags (GameEventFlags).
EF4C SET 0,A Set bit 00 of A.
EF4E LD ($72B3),A Set the game event flags (GameEventFlags).
EF51 JP AdvanceScriptInstruction Jump to AdvanceScriptInstruction to run the next script instruction.
Prev: EF28 Up: Map Next: EF54