Prev: 87BF Up: Map Next: 891F
88C7: Face Action Function.
Used by the routine at Vectors.
Action_FaceFunc 88C7 LD A,(CamDirection_DFD2)
88CA BIT 0,A
88CC JR NZ,Action_FaceFunc_0
88CE LD HL,(ManData_PosSecondary_dfc5)
88D1 LD E,(IX+$07)
88D4 LD D,(IX+$08)
88D7 CALL Vector_ABS(hl_minus_de)
88DA LD DE,$0022
88DD AND A
88DE SBC HL,DE
88E0 RET Z
88E1 JR C,Action_FaceFunc_1
Action_FaceFunc_0 88E3 LD (IX+$0B),$00
88E7 RET
Action_FaceFunc_1 88E8 ADD HL,DE
88E9 LD A,($5C79)
88EC RRA
88ED RET C
88EE LD A,($5C78)
88F1 CP $33
88F3 RET NC
88F4 LD (IX+$0C),$01
88F8 LD (IX+$09),$00
88FC LD DE,$0005
88FF AND A
8900 SBC HL,DE
8902 JP NC,SpriteBlit
8905 LD A,($DFCE)
8908 BIT 2,A
890A JP NZ,SpriteBlit
890D LD A,(DeathMode)
8910 AND A
8911 JP NZ,SpriteBlit
8914 LD A,$14
8916 LD (DeathMode),A
8919 JP SpriteBlit
891C JP Vecotr_Main
Prev: 87BF Up: Map Next: 891F