Prev: 60FD Up: Map Next: 6236
61B8: Get Next Path
Used by the routines at HeroInputHandle and 5F71.
61B8 LD HL,(ManData_PosPrimary_dfc3)
61BB LD A,(CamDirection_DFD2)
61BE BIT 0,A
61C0 JR Z,$61C5
61C2 LD HL,(ManData_PosSecondary_dfc5)
61C5 PUSH HL
61C6 LD A,(ManWalkDirection_DFD4)
61C9 OR $01
61CB LD HL,(CamDirection_DFD2)
61CE ADD A,L
61CF AND $03
61D1 PUSH AF
61D2 LD L,A
61D3 LD H,$00
61D5 LD DE,CurrentAreaExits
61D8 ADD HL,DE
61D9 LD A,(HL)
61DA CALL AreaUpdateData
61DD CALL LocDescription
61E0 LD A,(ManWalkDirection_DFD4)
61E3 OR $01
61E5 LD HL,(CamDirection_DFD2)
61E8 ADD A,L
61E9 AND $03
61EB XOR $02
61ED LD L,A
61EE POP AF
61EF XOR L
61F0 CP $02
61F2 JR Z,$6205
61F4 CP $03
61F6 JR Z,$6205
61F8 LD HL,$0200
61FB POP BC
61FC INC BC
61FD INC BC
61FE AND A
61FF SBC HL,BC
6201 DEC HL
6202 DEC HL
6203 JR $6206
6205 POP HL
6206 LD A,(CamDirection_DFD2)
6209 BIT 1,A
620B JR NZ,$6219
620D LD A,(ManWalkDirection_DFD4)
6210 CP $02
6212 JR NZ,$6220
6214 LD DE,$01F9
6217 JR $6223
6219 LD A,(ManWalkDirection_DFD4)
621C CP $02
621E JR NZ,$6214
6220 LD DE,$0007
6223 LD A,(CamDirection_DFD2)
6226 BIT 0,A
6228 JR Z,$622B
622A EX DE,HL
622B LD (ManData_PosPrimary_dfc3),HL
622E LD (ManData_PosSecondary_dfc5),DE
6232 CALL PathIntersect
6235 RET
Prev: 60FD Up: Map Next: 6236