Prev: 6557 Up: Map Next: 65B1
6588: Routine at 6588
Used by the routine at 6A9B.
6588 LD HL,($5E34) HL=PlayerWorldPosition.
658B LD A,($5E05) A=PlayerMapPosition.
658E CPL
658F LD E,A
6590 LD A,($5E08) A=5E08.
6593 LD D,A
6594 AND A
6595 PUSH HL Stash HL on the stack.
6596 SBC HL,DE
6598 POP HL Restore HL from the stack.
6599 RET Z
659A PUSH DE Stash DE on the stack.
659B LD IX,$65FD IX=TerrainDots.
659F LD B,$10 B=10.
65A1 PUSH BC Stash BC on the stack.
65A2 CALL $65B1 Call 65B1.
65A5 INC IX
65A7 INC IX
65A9 POP BC Restore BC from the stack.
65AA DJNZ $65A1
65AC POP HL Restore HL from the stack.
65AD LD ($5E34),HL Write HL to PlayerWorldPosition.
65B0 RET Return.
Prev: 6557 Up: Map Next: 65B1