Prev: C620 Up: Map Next: C72B
C6C2: Handler for enemies going down: SCANNER, POD, MINE LAYER and FOOTMAN falling
Used by the routine at BA5C.
C6C2 LD A,(IX+$09) Check enemy type
C6C5 AND $7F
C6C7 CP $08 is SCANNER?
C6C9 JP Z,$C2FD Jump to handle scanner moving down
C6CC CP $0C Return if POD
C6CE RET Z
C6CF CP $0D Return if MINE LAYER
C6D1 RET Z
C6D2 CP $0E Return if MINE
C6D4 RET Z
C6D5 CP $0F Return if BLOB
C6D7 RET Z
C6D8 LD A,(IX+$03) Return if FOOT MAN jumping
C6DB OR A
C6DC RET NZ
C6DD LD A,(IX+$01) Add to y-position the falling speed
C6E0 ADD A,(IX+$06)
C6E3 CP $B8 y-position is greater than $B8?
C6E5 JP NC,$C71A Jump to make FOOTMAN invisible
C6E8 LD (IX+$01),A Set the new y-position
C6EB AND $07 Return if y-position is not grid fixed
C6ED OR A
C6EE RET NZ
C6EF CALL $C72B Obtain into HL the tile type address pointer under FOOT MAN
C6F2 LD A,(HL) Set A the tile type under FOOT MAN
C6F3 CALL $D08B Check if tile type is 'background' tile
C6F6 JP NZ,$C70D Jump if wall tile type
C6F9 INC HL Increment HL
C6FA LD A,(HL) Set A the tile type under FOOT MAN
C6FB CALL $D08B Check if tile type is 'background' tile
C6FE JP NZ,$C70D Jump if wall tile type
continue falling
C701 LD A,(IX+$06) Increment falling speed by 2 if speed less than $04
C704 ADD A,$02
C706 CP $06
C708 RET Z
C709 LD (IX+$06),A
C70C RET
stop falling
C70D LD (IX+$06),$00 Reset falling
C711 LD A,(IX+$09) if enemy is FOOT MAN dying then destroy it
C714 CP $07
C716 JP Z,$981F
C719 RET
enemy falling from screen
C71A LD (IX+$0C),$00 Set entity invisble
C71E LD HL,$E9FF Set base address into attribute buffer for score points
C721 LD ($A039),HL
C724 LD HL,$0000 Set score point to zero
C727 LD ($A03C),HL
C72A RET
Prev: C620 Up: Map Next: C72B