routine60 |
C955 |
LD HL,map_object_table |
|
C958 |
LD (object_table_entry_pointer),HL |
|
C95B |
LD HL,INBUF |
|
C95E |
LD (BUFPNT),HL |
|
C961 |
CALL fill_inbuf |
|
C964 |
LD HL,(D_ADD) |
|
C967 |
LD (TEMADD),HL |
|
C96A |
LD A,$01 |
|
C96C |
LD (SRTCNT),A |
|
C96F |
LD B,$9F |
routine60_0 |
C971 |
PUSH BC |
|
C972 |
LD HL,(object_table_entry_pointer) |
|
C975 |
CALL routine63 |
|
C978 |
LD A,(unknown18) |
|
C97B |
LD HL,total_distance |
|
C97E |
CP (HL) |
|
C97F |
JP M,routine60_1 |
|
C982 |
LD HL,(AIM) |
|
C985 |
CALL routine53 |
|
C988 |
LD (unknown75),HL |
|
C98B |
LD HL,(object_table_entry_pointer) |
|
C98E |
CALL routine53 |
|
C991 |
LD (unknown76),HL |
|
C994 |
CALL calculate_distance |
|
C997 |
LD A,(total_distance) |
|
C99A |
LD HL,(BUFPNT) |
|
C99D |
LD (HL),A |
|
C99E |
LD HL,(object_table_entry_pointer) |
|
C9A1 |
LD DE,map_object_table |
|
C9A4 |
XOR A |
|
C9A5 |
SBC HL,DE |
|
C9A7 |
LD A,L |
|
C9A8 |
LD HL,(BUFPNT) |
|
C9AB |
INC HL |
|
C9AC |
LD (HL),A |
|
C9AD |
INC HL |
|
C9AE |
LD (BUFPNT),HL |
|
C9B1 |
LD HL,SRTCNT |
|
C9B4 |
INC (HL) |
routine60_1 |
C9B5 |
LD HL,(object_table_entry_pointer) |
|
C9B8 |
INC HL |
|
C9B9 |
LD (object_table_entry_pointer),HL |
|
C9BC |
POP BC |
|
C9BD |
DJNZ routine60_0 |
|
C9BF |
LD HL,INBUF |
|
C9C2 |
LD A,(SRTCNT) |
|
C9C5 |
CALL SORT |
|
C9C8 |
LD A,$01 |
|
C9CA |
LD (unknown29),A |
|
C9CD |
LD HL,$D4E5 |
|
C9D0 |
LD (BUFPNT),HL |
|
C9D3 |
RET |