Prev: 70ba Up: Map Next: 70e5
70c2: Add points to the active player's score.
Used by the routines at 63a3, 6461, 6523, 6a35, 6beb, 6d5c and 6d9c.
Input
C The number of points (in decimal) to be added to the score.
70c2 ld a,($5dd1) Use player 2 score if current player is 2
70c5 and a
70c6 jr nz,$70cd
70c8 ld hl,$5cf6
70cb jr $70d0
70cd ld hl,$5cf9
Add the points to the current score.
70d0 ld a,(hl) Update score byte #3, with BCD conversion
70d1 add a,c
70d2 daa
70d3 ld (hl),a
70d4 dec hl
70d5 ld a,(hl) Update score byte #2, with BCD conversion
70d6 adc a,b
70d7 daa
70d8 ld (hl),a
70d9 dec hl
70da ld a,(hl) Update score byte #1, with BCD conversion
70db adc a,$00
70dd daa
70de ld (hl),a
70df ld a,($5dd1) Jump and show player 2 score if current player is 2, else show player 1
70e2 and a
70e3 jr nz,$70ed
Prev: 70ba Up: Map Next: 70e5