![]() |
Routines |
| Prev: 29651 | Up: Map | Next: 29752 |
|
||||||||
|
Check the active player.
|
||||||||
| AddPointsToScore | 29717 | LD A,(24353) | If ActivePlayer is not zero, jump to AddPointsToScore_2UP. | |||||
| 29720 | AND A | |||||||
| 29721 | JR NZ,AddPointsToScore_2UP | |||||||
|
Set the score address for 1UP.
|
||||||||
| 29723 | LD HL,24336 | HL=1UP_Score_3. | ||||||
| 29726 | JR AddPointsToScore_Start | Jump to AddPointsToScore_Start. | ||||||
|
Set the score address for 2UP.
|
||||||||
| AddPointsToScore_2UP | 29728 | LD HL,24339 | HL=2UP_Score_3. | |||||
|
Process adding the points to the appropriate score.
|
||||||||
| AddPointsToScore_Start | 29731 | LD A,(HL) | A=score byte #3. | |||||
| 29732 | ADD A,C | Add C to score byte #3 with BCD conversion. | ||||||
| 29733 | DAA | |||||||
| 29734 | LD (HL),A | Update score byte #3. | ||||||
| 29735 | DEC HL | Move onto the next score byte. | ||||||
| 29736 | LD A,(HL) | A=score byte #2. | ||||||
| 29737 | ADC A,B | Add (with carry) B to score byte #2 with BCD conversion. | ||||||
| 29738 | DAA | |||||||
| 29739 | LD (HL),A | Update score byte #2. | ||||||
| 29740 | DEC HL | Move onto the next score byte. | ||||||
| 29741 | LD A,(HL) | A=score byte #1. | ||||||
| 29742 | ADC A,0 | Add 0 (i.e. just the carry flag) to score byte #1 with BCD conversion. | ||||||
| 29744 | DAA | |||||||
| 29745 | LD (HL),A | Update score byte #1. | ||||||
|
Check the active player.
|
||||||||
| 29746 | LD A,(24353) | If ActivePlayer is not zero, jump to Score_2UP. | ||||||
| 29749 | AND A | |||||||
| 29750 | JR NZ,Score_2UP | |||||||
| Prev: 29651 | Up: Map | Next: 29752 |