Prev: 86A1 Up: Map Next: 8722
86B9: ; TODO
Used by the routines at _873a and 9E27.
86B9 LD HL,(Position_NS)
86BC LD DE,(Position_EW)
86C0 RES 0,L
86C2 RES 0,E
86C4 PUSH HL
86C5 PUSH DE
86C6 LD A,(Hero_LastDir)
86C9 PUSH AF
86CA LD A,$01
86CC LD (Hero_LastDir),A
86CF LD A,(Stage_Compass)
86D2 BIT 0,A
86D4 JR NZ,$86D7
86D6 EX DE,HL
86D7 LD BC,$0042
86DA BIT 1,A
86DC JR NZ,$86E1
86DE LD BC,$FFBE
86E1 ADD HL,BC
86E2 BIT 0,A
86E4 JR NZ,$86E7
86E6 EX DE,HL
86E7 LD (Position_NS),HL
86EA LD (Position_EW),DE
86EE LD HL,$5E68
86F1 LD B,$22
86F3 PUSH BC
86F4 PUSH HL
86F5 LD IX,$80F8
86F9 CALL _a345
86FC LD HL,(Stage_Compass)
86FF LD H,$00
8701 ADD HL,HL
8702 LD BC,$8108
8705 ADD HL,BC
8706 LD E,L
8707 LD D,H
8708 CALL Vector_Jump
870B EX DE,HL
870C CALL Vector_Jump
870F POP HL
8710 INC HL
8711 POP BC
8712 DJNZ $86F3
8714 POP AF
8715 LD (Hero_LastDir),A
8718 POP DE
8719 POP HL
871A LD (Position_NS),HL
871D LD (Position_EW),DE
8721 RET
Prev: 86A1 Up: Map Next: 8722