Prev: CA7C Up: Map Next: CBB8
CA92: routine64
Used by the routines at routine23 and routine54.
routine64 CA92 CALL fill_inbuf
CA95 LD HL,map_object_table
CA98 LD B,$9F
routine64_0 CA9A PUSH BC
CA9B PUSH HL
CA9C LD DE,$0281
CA9F ADD HL,DE
CAA0 LD A,(HL)
CAA1 POP HL
CAA2 SUB $29
CAA4 JP P,routine64_1
CAA7 LD A,(HL)
CAA8 SUB $29
CAAA JP M,routine64_2
routine64_1 CAAD LD E,A
CAAE LD A,(current_player)
CAB1 CP E
CAB2 JR NZ,routine64_2
CAB4 LD (D_ADD),HL
routine64_2 CAB7 INC HL
CAB8 POP BC
CAB9 DJNZ routine64_0
CABB LD HL,SPATAB
CABE LD (SPADAT),HL
CAC1 LD HL,INBUF
CAC4 LD (BUFPNT),HL
CAC7 LD HL,direction_keys_string
CACA LD (unknown65),HL
CACD LD HL,(D_ADD)
CAD0 LD (X_ADD),HL
CAD3 LD A,(HL)
CAD4 CP $13
CAD6 JP M,routine64_3
CAD9 CP $16
CADB JP P,routine64_3
CADE CALL routine65
CAE1 LD A,$01
CAE3 LD (unknown30),A
CAE6 JP routine64_11
routine64_3 CAE9 CP $29
CAEB JP M,routine64_4
CAEE SUB $29
CAF0 LD HL,unknown_table_3
CAF3 LD D,$00
CAF5 LD E,A
CAF6 ADD HL,DE
CAF7 BIT 5,(HL)
CAF9 JR Z,routine64_4
CAFB CALL routine66
CAFE LD A,$01
CB00 LD (unknown30),A
CB03 JP routine64_11
routine64_4 CB06 LD B,$08
routine64_5 CB08 PUSH BC
CB09 CALL ADSPA
CB0C LD A,(D_ADD)
CB0F OR A
CB10 JR Z,routine64_10
CB12 LD HL,(D_ADD)
CB15 LD A,(HL)
CB16 CP $26
CB18 JP M,routine64_6
CB1B CP $28
CB1D JP P,routine64_6
CB20 LD HL,(BUFPNT)
CB23 LD (HL),$00
CB25 JR routine64_9
routine64_6 CB27 LD HL,(D_ADD)
CB2A LD A,(HL)
CB2B CP $24
CB2D JR NZ,routine64_7
CB2F LD HL,(BUFPNT)
CB32 LD (HL),$01
CB34 JR routine64_9
routine64_7 CB36 LD HL,(D_ADD)
CB39 LD A,(HL)
CB3A CP $10
CB3C JP M,routine64_8
CB3F CP $16
CB41 JP P,routine64_8
CB44 LD DE,$01E1
CB47 ADD HL,DE
CB48 LD A,(HL)
CB49 AND $07
CB4B LD HL,(current_player)
CB4E CP L
CB4F JR NZ,routine64_8
CB51 LD HL,(D_ADD)
CB54 LD DE,$0281
CB57 ADD HL,DE
CB58 LD A,(HL)
CB59 OR A
CB5A JR NZ,routine64_8
CB5C LD HL,(BUFPNT)
CB5F LD (HL),$02
CB61 JR routine64_9
routine64_8 CB63 CALL routine68
CB66 LD HL,(BUFPNT)
CB69 INC (HL)
CB6A INC (HL)
CB6B INC (HL)
routine64_9 CB6C LD HL,(unknown65)
CB6F LD A,(HL)
CB70 LD HL,(BUFPNT)
CB73 INC HL
CB74 LD (HL),A
CB75 INC HL
CB76 LD (BUFPNT),HL
routine64_10 CB79 LD HL,(X_ADD)
CB7C LD (D_ADD),HL
CB7F LD HL,(unknown65)
CB82 INC HL
CB83 LD (unknown65),HL
CB86 POP BC
CB87 DEC B
CB88 JP NZ,routine64_5
CB8B LD HL,INBUF
CB8E LD A,$07
CB90 CALL SORT
CB93 LD HL,(X_ADD)
CB96 LD (object_table_entry_pointer),HL
CB99 LD (D_ADD),HL
CB9C LD HL,$D401
CB9F LD (BUFPNT),HL
routine64_11 CBA2 LD HL,(X_ADD)
CBA5 CALL routine53
CBA8 LD (cursor_coordinates),HL
CBAB LD (unknown24),HL
CBAE LD A,$01
CBB0 LD (unknown29),A
CBB3 LD BC,(cursor_coordinates)
CBB7 RET
Prev: CA7C Up: Map Next: CBB8