Prev: F011 Up: Map Next: F06A
F03E: Start Enemy
Used by the routine at Handler_Events.
Event 05: start the first enemy.
Event_StartEnemy F03E LD BC,$2614 Write 2614 to *EventTimer.
F041 LD ($649F),BC
F045 LD IX,($6432) IX=*ReferenceEnemies.
Event_StartEnemy_Target F049 LD A,(IX+$00) Return if the terminator FF is reached.
F04C INC A
F04D RET Z
F04E BIT 7,A Jump to Event_StartEnemy_Continue if this enemy is hidden.
F050 JR NZ,Event_StartEnemy_Continue
F052 LD A,(IX+$08) Negate the horizontal delta.
F055 DEC A
F056 XOR %11111111 Invert the subtracted byte.
F058 LD (IX+$08),A Write the new horizontal delta.
F05B LD A,(IX+$07) A=*IX+07.
F05E XOR %10000000 Toggle bit 7.
F060 LD (IX+$07),A Write the facing flag back.
Event_StartEnemy_Continue F063 LD DE,$000E IX+=000E.
F066 ADD IX,DE
F068 JR Event_StartEnemy_Target Jump to Event_StartEnemy_Target.
Prev: F011 Up: Map Next: F06A