Prev: 9C0E Up: Map Next: 9C59
9C0F: routine19
Used by the routines at routine13, routine18, routine73 and routine85.
routine19 9C0F LD A,$00
9C11 LD (unknown80),A
9C14 LD A,(CURSP)
9C17 CP $28
9C19 JR NZ,routine19_2
9C1B LD HL,SPATAB
9C1E LD (SPADAT),HL
9C21 LD HL,(D_ADD)
9C24 LD (TEMADD),HL
9C27 LD B,$08
routine19_0 9C29 PUSH BC
9C2A LD HL,(object_table_entry_pointer)
9C2D LD (D_ADD),HL
9C30 CALL ADSPA
9C33 LD HL,(D_ADD)
9C36 LD A,H
9C37 ADD A,L
9C38 JR Z,routine19_1
9C3A LD A,(HL)
9C3B SUB $29
9C3D JP M,routine19_1
9C40 LD HL,current_player
9C43 CP (HL)
9C44 JR NZ,routine19_1
9C46 LD A,$01
9C48 LD (unknown80),A
routine19_1 9C4B POP BC
9C4C DJNZ routine19_0
9C4E LD HL,(TEMADD)
9C51 LD (D_ADD),HL
routine19_2 9C54 LD A,(unknown80)
9C57 OR A
9C58 RET
Prev: 9C0E Up: Map Next: 9C59