Prev: C7BB Up: Map Next: C825
C7BC: EN_AN
EN_AN C7BC LD HL,(X_ADD)
C7BF LD (D_ADD),HL
C7C2 LD HL,INBUF
C7C5 LD (BUFPNT),HL
C7C8 CALL fill_inbuf
C7CB LD HL,map_object_table
C7CE LD (object_table_entry_pointer),HL
C7D1 LD A,$00
C7D3 LD (SRTCNT),A
C7D6 LD B,$9F
EN_AN_0 C7D8 PUSH BC
C7D9 CALL routine52
C7DC OR A
C7DD JR Z,EN_AN_1
C7DF LD HL,SRTCNT
C7E2 INC (HL)
C7E3 ADD A,$14
C7E5 PUSH AF
C7E6 LD HL,(TEMADD)
C7E9 CALL routine53
C7EC LD (unknown75),HL
C7EF LD HL,(object_table_entry_pointer)
C7F2 CALL routine53
C7F5 LD (unknown76),HL
C7F8 CALL calculate_distance
C7FB LD A,(total_distance)
C7FE SRL A
C800 LD E,A
C801 POP AF
C802 SUB E
C803 LD HL,(BUFPNT)
C806 LD (HL),A
C807 LD HL,(object_table_entry_pointer)
C80A LD DE,map_object_table
C80D XOR A
C80E SBC HL,DE
C810 LD A,L
C811 LD HL,(BUFPNT)
C814 INC HL
C815 LD (HL),A
C816 INC HL
C817 LD (BUFPNT),HL
EN_AN_1 C81A LD HL,(object_table_entry_pointer)
C81D INC HL
C81E LD (object_table_entry_pointer),HL
C821 POP BC
C822 DJNZ EN_AN_0
C824 RET
Prev: C7BB Up: Map Next: C825