![]() |
Routines |
| Prev: 73D3 | Up: Map | Next: 7438 |
|
||||||||
|
Check the active player.
|
||||||||
| AddPointsToScore | 7415 | LD A,($5F21) | If ActivePlayer is not zero, jump to AddPointsToScore_2UP. | |||||
| 7418 | AND A | |||||||
| 7419 | JR NZ,AddPointsToScore_2UP | |||||||
|
Set the score address for 1UP.
|
||||||||
| 741B | LD HL,$5F10 | HL=1UP_Score_3. | ||||||
| 741E | JR AddPointsToScore_Start | Jump to AddPointsToScore_Start. | ||||||
|
Set the score address for 2UP.
|
||||||||
| AddPointsToScore_2UP | 7420 | LD HL,$5F13 | HL=2UP_Score_3. | |||||
|
Process adding the points to the appropriate score.
|
||||||||
| AddPointsToScore_Start | 7423 | LD A,(HL) | A=score byte #3. | |||||
| 7424 | ADD A,C | Add C to score byte #3 with BCD conversion. | ||||||
| 7425 | DAA | |||||||
| 7426 | LD (HL),A | Update score byte #3. | ||||||
| 7427 | DEC HL | Move onto the next score byte. | ||||||
| 7428 | LD A,(HL) | A=score byte #2. | ||||||
| 7429 | ADC A,B | Add (with carry) B to score byte #2 with BCD conversion. | ||||||
| 742A | DAA | |||||||
| 742B | LD (HL),A | Update score byte #2. | ||||||
| 742C | DEC HL | Move onto the next score byte. | ||||||
| 742D | LD A,(HL) | A=score byte #1. | ||||||
| 742E | ADC A,$00 | Add 00 (i.e. just the carry flag) to score byte #1 with BCD conversion. | ||||||
| 7430 | DAA | |||||||
| 7431 | LD (HL),A | Update score byte #1. | ||||||
|
Check the active player.
|
||||||||
| 7432 | LD A,($5F21) | If ActivePlayer is not zero, jump to Score_2UP. | ||||||
| 7435 | AND A | |||||||
| 7436 | JR NZ,Score_2UP | |||||||
| Prev: 73D3 | Up: Map | Next: 7438 |