Prev: C5FD Up: Map Next: C6C2
C620: Handler for enemies going up: SCANNER, POD, MINE LAYER and FOOTMAN Jumping
Used by the routine at BA5C.
C620 LD A,(IX+$09) Check enemy type
C623 CP $FE Return if bubble
C625 RET Z
C626 CP $FD Return if smartbomb
C628 RET Z
C629 CP $FC Return if question
C62B RET Z
C62C AND $7F
C62E CP $08 is SCANNER?
C630 JP Z,$C213 Jump to handle SCANNER - moves up
C633 CP $0C is POD?
C635 JP Z,$C05A Jump to handle POD
C638 CP $0D is MINE LAYER?
C63A JP Z,$C05A Jump to handle MINE LAYER
C63D CP $0E Return if MINE
C63F RET Z
C640 CP $0F Return if BLOB
C642 RET Z
C643 LD A,(IX+$03) return if enemy is not FOOT MAN jumping
C646 OR A
C647 RET Z
C648 LD A,(IX+$00) Set A0AF to the x-position of enemy
C64B LD ($A0AF),A
C64E LD A,(IX+$01) Set A0B0 to the y-position of enemy
C651 LD ($A0B0),A
C654 LD A,(IX+$02) Set A to the direction of enemy
C657 CALL $A503 Set into HL the address into tile type buffer of enemy position
C65A INC HL Increment HL
C65B CALL $D06C Check if tile type is a wall
C65E JP Z,$C6A1 Jump if it's a wall
C661 INC HL Increment HL
C662 CALL $D06C Check if tile type is a wall
C665 JP Z,$C6A1 Jump if it's a wall
C668 LD A,(IX+$01) Set A to the y-position
C66B LD L,(IX+$04) Set HL to the address for jumping y-offset
C66E LD H,(IX+$05)
C671 LD E,(HL) Computes the new y-position
C672 SUB E
C673 CP $08 if y-position is less than 8 then start falling
C675 JP C,$C68B
C678 LD (IX+$01),A Set the new y-position
C67B INC HL Increment y-offset address
C67C LD (IX+$04),L
C67F LD (IX+$05),H
C682 LD A,(HL) if no end marker for y-offet then return
C683 CP $FF
C685 RET NZ
C686 LD (IX+$03),$00 Finish jumping
C68A RET
FOOT MAN start falling
C68B LD (IX+$03),$00 Set FOOT MAN not jumping
C68F LD (IX+$06),$02 Set FOOT MAN falling (speed 2)
C693 LD A,(IX+$09) if FOOT MAN is dying jump back and destroy it
C696 CP $07
C698 JP Z,$981F
C69B CP $06
C69D JP Z,$981F
C6A0 RET
FOOT MAN start falling
C6A1 LD A,(IX+$09) if FOOT MAN is dying jump back and destroy it
C6A4 CP $07
C6A6 JP Z,$981F
C6A9 CP $06
C6AB JP Z,$981F
C6AE LD (IX+$06),$02 Set FOOT MAN falling (speed 2)
C6B2 LD (IX+$03),$00 Set FOOT MAN not jumping
C6B6 LD A,(IX+$01) if bits2-0 of y-position are 0 then stop falling
C6B9 AND $07
C6BB OR A
C6BC RET NZ
C6BD LD (IX+$06),$00
C6C1 RET
Prev: C5FD Up: Map Next: C6C2