Prev: DBC9 Up: Map Next: DC62
DC26: Handler: Event Timer
Used by the routines at Dispatch_Handlers and Handler_Combination.
Counts *EventTimer down and fires *PendingEvent through Dispatch_Events.
Handler_EventTimer DC26 LD A,($649F) Return if *EventTimer is zero.
DC29 OR A
DC2A RET Z Decrease *EventTimer by one.
DC2B DEC A
DC2C LD ($649F),A
DC2F OR A Return if the timer is still running.
DC30 RET NZ Jump to Dispatch_Events with *PendingEvent.
DC31 LD A,($64A0)
DC34 JP Dispatch_Events
This entry point is used by the routines at Handler_MovingObjects and Handler_Enemies.
Reverse an object's horizontal/vertical direction.
Reverse_Direction DC37 LD A,(IX+$09) Negate *IX+09 and *IX+08.
DC3A DEC A
DC3B XOR $FF
DC3D LD (IX+$09),A
DC40 LD A,(IX+$08)
DC43 DEC A Return if the vertical delta is now zero.
DC44 XOR $FF
DC46 LD (IX+$08),A Toggle bit 7 of *IX+07.
DC49 RET Z
DC4A LD A,$80
DC4C XOR (IX+$07) Return.
DC4F LD (IX+$07),A
DC52 RET
This entry point is used by the routine at Handler_Enemies.
Pause when leaving a non-zero room.
Pause_LeavingRoom DC53 PUSH AF Stash AF on the stack.
DC54 LD A,($64A2) Jump to Pause_LeavingRoom_Done if *CurrentRoom is zero.
DC57 OR A
DC58 JR Z,Pause_LeavingRoom_Done
DC5A LD BC,$03E8 Call JumpTable_Delay with a pause of 03E8.
DC5D CALL JumpTable_Delay
Pause_LeavingRoom_Done DC60 POP AF Restore AF from the stack.
DC61 RET Return.
Prev: DBC9 Up: Map Next: DC62