Prev: 46871 Up: Map Next: 46925
46891: Start Game
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 46891 CALL ResetLives Set the number of lives using ResetLives.
46894 LD A,128 Set a variable that is never used to 128.
46896 LD (38540),A
46899 LD A,70 Clear the play window to bright cyan on black using ClearPlayWindowWithAttributes.
46901 CALL ClearPlayWindowWithAttributes
46904 CALL StartRobot Start the first life using StartRobot.
46907 LD HL,38427 Point HL at Scores.
46910 LD B,6 There are six bytes to clear.
StartGame_Clear 46912 LD (HL),0 Clear a byte of the scores.
46914 INC HL Move on to the next byte.
46915 DJNZ StartGame_Clear Loop back until both scores have been cleared.
46917 CALL PrintScore Print the score using PrintScore.
46920 XOR A Clear the displayed battery level...
46921 LD (38460),A ...so that the battery bar is redrawn from the start.
46924 RET Return.
Prev: 46871 Up: Map Next: 46925