Prev: 89C9 Up: Map Next: 89FC
89D0: Move an object, or count down its explosion and send it home
Used by the routines at MOVE_PLAYER, MOVE_GRENADE, MOVE_ANT and MOVE_RESCUEE.
While the explosion countdown runs the object does not move, and when it runs out the object goes back to its home position. The player starts every level this way: BASIC sets its countdown to 1, so the first frame puts it at the city gate.
MOVE_OR_RESPAWN 89D0 LD A,(IX+$09)
89D3 AND A
89D4 JR NZ,MOVE_OR_RESPAWN_0
89D6 CALL MOVE_OBJECT
89D9 RET
MOVE_OR_RESPAWN_0 89DA DEC A
89DB LD (IX+$09),A
89DE RET NZ
89DF LD A,(IX+$0A) Home.
89E2 LD (IX+$00),A
89E5 LD A,(IX+$0B)
89E8 LD (IX+$01),A
89EB LD A,(IX+$0C)
89EE LD (IX+$02),A
89F1 XOR A Not falling, not stunned, standing.
89F2 LD (IX+$05),A
89F5 LD (IX+$06),A
89F8 LD (IX+$08),A
89FB RET
Prev: 89C9 Up: Map Next: 89FC