![]() |
Routines |
| Prev: B717 | Up: Map | Next: B74D |
|
Used by the routine at InitialiseGame.
Starts a new game. The lives are set, the play window is cleared, the robot starts its first life and both scores are cleared.
|
||||
| StartGame | B72B | CALL ResetLives | Set the number of lives using ResetLives. | |
| B72E | LD A,$80 | Set a variable that is never used to 80. | ||
| B730 | LD ($968C),A | |||
| B733 | LD A,$46 | Clear the play window to bright cyan on black using ClearPlayWindowWithAttributes. | ||
| B735 | CALL ClearPlayWindowWithAttributes | |||
| B738 | CALL StartRobot | Start the first life using StartRobot. | ||
| B73B | LD HL,$961B | Point HL at Scores. | ||
| B73E | LD B,$06 | There are six bytes to clear. | ||
| StartGame_Clear | B740 | LD (HL),$00 | Clear a byte of the scores. | |
| B742 | INC HL | Move on to the next byte. | ||
| B743 | DJNZ StartGame_Clear | Loop back until both scores have been cleared. | ||
| B745 | CALL PrintScore | Print the score using PrintScore. | ||
| B748 | XOR A | Clear the displayed battery level... | ||
| B749 | LD ($963C),A | ...so that the battery bar is redrawn from the start. | ||
| B74C | RET | Return. | ||
| Prev: B717 | Up: Map | Next: B74D |