Prev: A3A5 Up: Map Next: A410
A3A7: Update the score
Used by the routines at 99DF, A59D and AE9C.
Input
R Type of object that has scored points
A3A7 LD A,B
A3A8 AND A
A3A9 JR Z,$A3E6
A3AB LD A,$0A
A3AD LD HL,$6ECC
A3B0 INC (HL)
A3B1 CP (HL)
A3B2 JR NZ,$A3B9
A3B4 LD (HL),$00
A3B6 DEC HL
A3B7 JR $A3B0
A3B9 DJNZ $A3AD
A3BB LD HL,$736E
A3BE LD A,($6EC9)
A3C1 CP (HL)
A3C2 JR Z,$A3E6
A3C4 LD (HL),A
A3C5 LD A,($733B)
A3C8 ADD A,$EF
A3CA LD H,$6E
A3CC LD L,A
A3CD LD C,(HL)
A3CE INC (HL)
A3CF SUB $EF
A3D1 LD B,A
A3D2 LD A,C
A3D3 CP $06
A3D5 JR NC,$A3E6
A3D7 LD A,$FD
A3D9 ADD A,$07
A3DB DJNZ $A3D9
A3DD ADD A,C
A3DE LD L,A
A3DF LD H,$16
A3E1 LD A,$B6
A3E3 CALL $9C40
A3E6 LD DE,($733D)
A3EA LD BC,$6EC8
A3ED LD IXl,$06
A3F0 PUSH DE
A3F1 LD A,(BC)
A3F2 SLA A
A3F4 SLA A
A3F6 SLA A
A3F8 PUSH BC
A3F9 ADD A,$70
A3FB LD H,$86
A3FD LD L,A
A3FE LD B,$08
A400 LD A,(HL)
A401 LD (DE),A
A402 INC D
A403 INC L
A404 DJNZ $A400
A406 POP BC
A407 POP DE
A408 INC DE
A409 INC BC
A40A DEC IXl
A40C JR NZ,$A3F0
A40E RET
A40F NOP
Prev: A3A5 Up: Map Next: A410