Prev: C54D Up: Map Next: C5B6
C577: Handle FOOT MAN walking/stand-by state change
Used by the routine at BA5C.
C577 LD A,(IX+$09) Return if enemy type is not FOOT MAN
C57A OR A
C57B RET NZ
C57C LD A,(IX+$02) Jump forward if FOOT MAN is facing left
C57F OR A
C580 JP NZ,$C58E
C583 LD A,(IX+$00) FOOT MAN is facing right. Return if x-position of bits2-0 of FOOTMAN is not $02
C586 AND $07
C588 CP $02
C58A RET NZ
C58B JP $C596 Jump to check for change state
C58E LD A,(IX+$00) FOOT MAN is facing left. Return if x-position of bits2-0 of FOOTMAN is not $04
C591 AND $07
C593 CP $04
C595 RET NZ
C596 CALL $A375 Set A a pseudo-random number
C599 CP $FA Return if pseudo-random number if smaller than $FA
C59B RET C
C59C LD A,(IX+$06) Return if FOOT MAN is falling
C59F OR A
C5A0 RET NZ
C5A1 LD A,(IX+$03) Return if FOOT MAN is jumping
C5A4 OR A
C5A5 RET NZ
C5A6 LD A,(IX+$11) Retunr if state change counter is not zero
C5A9 OR A
C5AA RET NZ
C5AB LD HL,$91B2 Set HL to the address pointer for the graphic data of FOOT MAN stand-by
C5AE CALL $C556 Set enemy configuration for FOOT MAN stand-by
C5B1 LD (IX+$12),$02 Set FOOT MAN to type Stand-by
C5B5 RET
Prev: C54D Up: Map Next: C5B6