Prev: C691 Up: Map Next: C794
C721: Handler for FOOT MAN falling
Used by the routine at BC48.
C721 LD A,(IX+$09) Return if enemy is TRIANGLE
C724 AND $7F
C726 CP $0E
C728 RET Z
C729 LD A,(IX+$03) Return if FOOT MAN is jumping
C72C OR A
C72D RET NZ
C72E LD A,(IX+$01) Add to y-position the falling speed
C731 ADD A,(IX+$06)
C734 CP $B8 y-position is greater than 184?
C736 JP NC,$C77B Jump to make FOOTMAN invisible
C739 LD (IX+$01),A Set the new y-position
C73C AND $07 Return if y-position is not grid fixed
C73E OR A
C73F RET NZ
C740 CALL $C794 Obtain into HL the tile type address pointer under FOOT MAN
C743 LD A,(HL) Set A the tile type under FOOT MAN
C744 CALL $CE17 Check if tile type is 'background' tile
C747 JP NZ,$C76E Jump if wall tile type
C74A INC HL Increment HL
C74B LD A,(HL) Set A the tile type under FOOT MAN
C74C CALL $CE17 Check if tile type is 'background' tile
C74F JP NZ,$C76E Jump if wall tile type
C752 LD A,(IX+$09) If explosion jump to continue falling
C755 CP $FF
C757 JP Z,$C762
C75A LD A,($A25D) If FOOT MAN collides with tile type $03 (tiles of death) then jump to destroy enemy
C75D CP $03
C75F CALL Z,$C78C
continue falling
C762 LD A,(IX+$06) Increment falling speed by 2 if speed less than $04
C765 ADD A,$02
C767 CP $06
C769 RET Z
C76A LD (IX+$06),A
C76D RET
stop falling
C76E LD (IX+$06),$00 Reset falling
C772 LD A,(IX+$09) if enemy is FOOT MAN dying then destroy it
C775 CP $07
C777 JP Z,$9807
C77A RET
enemy falling from screen
C77B LD (IX+$0C),$00 Set entity invisble
C77F LD HL,$E9FF Set base address into attribute buffer for score points
C782 LD ($A1D2),HL
C785 LD HL,$0000 Set score point to zero
C788 LD ($A1D5),HL
C78B RET
enemy collides with tile of death
C78C LD (IX+$15),$FF Set to not generate bubble
C790 CALL $9807 Destroy enemy
C793 RET
Prev: C691 Up: Map Next: C794