| ← B5ED | Map | B609 → |
B5FB: Award a bonus life when the score passes a milestone
|
Grants one extra life each time the score's ten-thousands digit advances, so one per 10000 points.
|
|||
|
A marker byte holds the score's ten-thousands digit as of the last award. Any change copies the live digit over the marker and awards one life.
|
|||
| award_score_life | B5FB | LD A,(score_milestone_marker) | No new milestone while the score's ten-thousands digit still matches the saved marker. |
| B5FE | LD HL,score_ten_thousands | ||
| B601 | CP (HL) | ||
| B602 | RET Z | ||
| B603 | LD A,(HL) | Record the new digit so this milestone is awarded only once. | |
| B604 | LD (score_milestone_marker),A | ||
| B607 | JR gain_life | ||
| ← B5ED | Map | B609 → |
