Prev: C8B9 Up: Map Next: C955
C8C7: routine59
Used by the routines at routine23 and routine55.
routine59 C8C7 CALL fill_inbuf
C8CA LD HL,INBUF
C8CD LD (BUFPNT),HL
C8D0 LD HL,SPATAB
C8D3 LD (SPADAT),HL
C8D6 LD HL,direction_keys_string
C8D9 LD (unknown65),HL
C8DC LD HL,(D_ADD)
C8DF LD (TEMADD),HL
C8E2 LD B,$08
routine59_0 C8E4 PUSH BC
C8E5 CALL ADSPA
C8E8 LD A,(D_ADD)
C8EB OR A
C8EC JR Z,routine59_1
C8EE LD HL,(AIM)
C8F1 CALL routine53
C8F4 LD (unknown75),HL
C8F7 LD HL,(D_ADD)
C8FA CALL routine53
C8FD LD (unknown76),HL
C900 CALL calculate_distance
C903 LD A,(total_distance)
C906 LD HL,(BUFPNT)
C909 LD (HL),A
C90A LD HL,(unknown65)
C90D LD A,(HL)
C90E LD HL,(BUFPNT)
C911 INC HL
C912 LD (HL),A
routine59_1 C913 LD HL,(unknown65)
C916 INC HL
C917 LD (unknown65),HL
C91A LD HL,(BUFPNT)
C91D INC HL
C91E INC HL
C91F LD (BUFPNT),HL
C922 LD HL,(TEMADD)
C925 LD (D_ADD),HL
C928 POP BC
C929 DJNZ routine59_0
C92B LD HL,INBUF
C92E LD A,$07
C930 CALL SORT
C933 LD A,$01
C935 LD (unknown29),A
C938 LD HL,(TEMADD)
C93B LD (D_ADD),HL
C93E LD (object_table_entry_pointer),HL
C941 CALL routine53
C944 LD (cursor_coordinates),HL
C947 LD (unknown24),HL
C94A LD HL,$D401
C94D LD (BUFPNT),HL
C950 LD BC,(cursor_coordinates)
C954 RET
Prev: C8B9 Up: Map Next: C955