Prev: 818E Up: Map Next: 82CB
826E: Routine at 826E
Used by the routine at SidheMove_DataFrame.
826E LD A,(Hero_Anim)
8271 CP $14
8273 RET NZ
8274 LD A,($DFCF)
8277 CP $02
8279 RET C
827A LD HL,(CurrentPathPtr)
827D LD E,(IX+$12)
8280 LD D,(IX+$13)
8283 AND A
8284 SBC HL,DE
8286 RET NZ
8287 LD A,(CamDirection_DFD2)
828A BIT 0,A
828C JR NZ,$8299
828E LD HL,(ManData_PosSecondary_dfc5)
8291 LD E,(IX+$07)
8294 LD D,(IX+$08)
8297 JR $82A2
8299 LD HL,(ManData_PosPrimary_dfc3)
829C LD E,(IX+$05)
829F LD D,(IX+$06)
82A2 LD BC,$0008
82A5 BIT 1,A
82A7 JR Z,$82AC
82A9 LD BC,$FFF8
82AC LD A,(ManWalkDirection_DFD4)
82AF CP $02
82B1 JR NZ,$82B8
82B3 AND A
82B4 SBC HL,BC
82B6 JR $82B9
82B8 ADD HL,BC
82B9 CALL Vector_ABS(hl_minus_de)
82BC LD DE,$0003
82BF AND A
82C0 SBC HL,DE
82C2 RET NC
82C3 LD (IX+$0F),$1E
82C7 POP HL
82C8 POP HL
82C9 POP HL
82CA RET
Prev: 818E Up: Map Next: 82CB