Prev: EC2E Up: Map Next: EC61
EC53: Script Routine: (21) Start script loop with count
Start a counted script loop for the current entity.
ScriptRoutine_StartScriptLoop EC53 INC HL Advance HL past the current script instruction.
EC54 INC HL
EC55 LD A,(HL) Fetch the next script byte.
EC56 LD ($7301),A Set the script loop counter (ScriptLoopCounter).
EC59 INC HL Advance HL past the loop-count operand onto the loop body.
EC5A INC HL
EC5B LD ($72FD),HL Store HL in the script loop restart pointer (Pointer_ScriptLoopRestart).
EC5E JP ScriptInstruction Jump to ScriptInstruction to execute the script instruction at HL.
Prev: EC2E Up: Map Next: EC61