Prev: C5E8 Up: Map Next: C66B
C627: Handle FOOT MAN walking/crouching state change
Used by the routine at BC48.
C627 LD A,(IX+$09) Entity type is FOOT MAN?
C62A AND $7F
C62C OR A
C62D RET NZ Return if it isn't
C62E LD A,(IX+$12) FOOT MAN is walking?
C631 OR A
C632 JP Z,$C660 Jump to decrement state counter
C635 LD A,(IX+$11) SEt A to state counter
C638 CP $C8 is for fixed crouch foot man?
C63A RET Z Return if so
C63B DEC (IX+$11) Decrement state counter
C63E RET NZ Return if no 0
State counter reached 0: change state to walking
C63F LD (IX+$10),$02 Set footman speed
C643 RES 7,(IX+$09) Set footman walking type
C647 LD (IX+$0E),$03 Set width of sprite (in bytes)
C64B LD (IX+$11),$09 Set state counter
C64F LD A,(IX+$12) is footman stand-by?
C652 CP $02
C654 JP NZ,$C65B Jump if walking or crouched
C657 LD (IX+$11),$01 Set state counter
C65B LD (IX+$12),$00 Set footman walking
C65F RET
C660 LD A,(IX+$11) Decrement counter if counter > 0
C663 DEC A
C664 CP $FF
C666 RET Z
C667 LD (IX+$11),A
C66A RET
Prev: C5E8 Up: Map Next: C66B