Prev: 8798 Up: Map Next: 88C7
87BF: Routine at 87BF
Used by the routine at Vectors.
87BF LD A,(IX+$0D)
87C2 AND A
87C3 JR NZ,$87D9
87C5 LD HL,(ManData_PosSecondary_dfc5)
87C8 LD DE,$00B7
87CB AND A
87CC SBC HL,DE
87CE RET NZ
87CF LD (IX+$0D),$01
87D3 LD (IX+$0B),$BF
87D7 JR $883B
87D9 CP $01
87DB JR NZ,$87F5
87DD INC (IX+$0B)
87E0 LD A,(IX+$0B)
87E3 CP $C4
87E5 JR C,$883B
87E7 LD (IX+$0D),$02
87EB LD (IX+$0B),$BC
87EF LD (IX+$0A),$12
87F3 JR $8815
87F5 CP $02
87F7 JR NZ,$882A
87F9 DEC (IX+$0A)
87FC JR NZ,$8815
87FE LD A,$BC
8800 CP (IX+$0B)
8803 JR Z,$880E
8805 LD (IX+$0B),A
8808 LD (IX+$0A),$12
880C JR $8815
880E INC (IX+$0B)
8811 LD (IX+$0A),$01
8815 LD A,(DeathMode)
8818 CP $02
881A JR Z,$8820
881C CP $11
881E JR NZ,$883B
8820 LD (IX+$0D),$03
8824 LD (IX+$0B),$C3
8828 JR $883B
882A DEC (IX+$0B)
882D LD A,(IX+$0B)
8830 CP $BE
8832 JR NZ,$883B
8834 LD (IX+$0B),$00
8838 RET
8839 JR $883B
883B LD A,(CamDirection_DFD2)
883E BIT 0,A
8840 RET NZ
8841 LD A,(IX+$0B)
8844 LD B,$10
8846 CP $C2
8848 JR NC,$8858
884A LD B,$18
884C CP $C1
884E JR NC,$8858
8850 LD B,$20
8852 CP $BF
8854 JR NC,$8858
8856 LD B,$00
8858 LD (IX+$09),B
885B LD (IX+$0C),$01
885F CALL SpriteBlit
8862 LD A,(DeathMode)
8865 AND A
8866 RET NZ
8867 LD HL,(ManData_PosSecondary_dfc5)
886A LD DE,$00B6
886D AND A
886E SBC HL,DE
8870 RET NZ
8871 LD A,$14
8873 LD (DeathMode),A
8876 LD A,($DFEE)
8879 RRA
887A RRA
887B RRA
887C AND $07
887E ADD A,$28
8880 LD C,A
8881 LD HL,(ManData_FirstObjectCarried)
8884 LD A,L
8885 OR H
8886 JR Z,$889B
8888 LD DE,$0005
888B ADD HL,DE
888C LD D,(HL)
888D DEC HL
888E LD E,(HL)
888F DEC HL
8890 EX DE,HL
8891 DEC DE
8892 LD A,(DE)
8893 CP C
8894 JR NZ,$8884
8896 LD A,$0A
8898 LD (DeathMode),A
889B PUSH IX
889D CALL Vector_ActionsNewLink
88A0 LD (IX+$0B),$30
88A4 LD HL,$8928
88A7 LD (IX+$03),L
88AA LD (IX+$04),H
88AD LD (IX+$05),$64
88B1 LD (IX+$07),$A9
88B5 LD (IX+$0D),$01
88B9 LD A,(DeathMode)
88BC CP $14
88BE JR Z,$88C4
88C0 LD (IX+$0D),$03
88C4 POP IX
88C6 RET
Prev: 8798 Up: Map Next: 88C7