Prev: C66E Up: Map Next: C721
C691: Handler for FOOT MAN jumping
Used by the routine at BC48.
C691 LD A,(IX+$09) Check enemy type
C694 CP $FE Return if bubble
C696 RET Z
C697 CP $FD Return if smartbomb
C699 RET Z
C69A CP $FC Return if question
C69C RET Z
C69D AND $7F Return if TRIANGLE
C69F CP $0E
C6A1 RET Z
C6A2 LD A,(IX+$03) Return if FOOT MAN not jumping
C6A5 OR A
C6A6 RET Z
FOOT MAN jumping
C6A7 LD A,(IX+$00) Set A248 to the x-position of enemy
C6AA LD ($A248),A
C6AD LD A,(IX+$01) Set A249 to the y-position of enemy
C6B0 LD ($A249),A
C6B3 LD A,(IX+$02) Set A to the direction of enemy
C6B6 CALL $A6AB Set into HL the address into tile type buffer of enemy position
C6B9 INC HL Increment HL
C6BA CALL $CDF5 Check if tile type is a wall
C6BD JP Z,$C700 Jump if it's a wall
C6C0 INC HL Increment HL
C6C1 CALL $CDF5 Check if tile type is a wall
C6C4 JP Z,$C700 Jump if it's a wall
C6C7 LD A,(IX+$01) Set A to the y-position
C6CA LD L,(IX+$04) Set HL to the address for jumping y-offset
C6CD LD H,(IX+$05)
C6D0 LD E,(HL) Computes the new y-position
C6D1 SUB E
C6D2 CP $08 if y-position is less than 8 then start falling
C6D4 JP C,$C6EA
C6D7 LD (IX+$01),A Set the new y-position
C6DA INC HL Increment y-offset address
C6DB LD (IX+$04),L
C6DE LD (IX+$05),H
C6E1 LD A,(HL) if no end marker for y-offet then return
C6E2 CP $FF
C6E4 RET NZ
C6E5 LD (IX+$03),$00 Finish jumping
C6E9 RET
FOOT MAN start falling
C6EA LD (IX+$03),$00 Set FOOT MAN not jumping
C6EE LD (IX+$06),$02 Set FOOT MAN falling (speed 2)
C6F2 LD A,(IX+$09) if FOOT MAN is dying jump back and destroy it
C6F5 CP $07
C6F7 JP Z,$9807
C6FA CP $06
C6FC JP Z,$9807
C6FF RET
FOOT MAN start falling
C700 LD A,(IX+$09) if FOOT MAN is dying jump back and destroy it
C703 CP $07
C705 JP Z,$9807
C708 CP $06
C70A JP Z,$9807
C70D LD (IX+$06),$02 Set FOOT MAN falling (speed 2)
C711 LD (IX+$03),$00 Set FOOT MAN not jumping
C715 LD A,(IX+$01) if bits2-0 of y-position are 0 then stop falling
C718 AND $07
C71A OR A
C71B RET NZ
C71C LD (IX+$06),$00
C720 RET
Prev: C66E Up: Map Next: C721