Prev: 25622 Up: Map Next: 25687
25640: Start Game
Used by the routine at GameInitialisation.
Starts a new game when "0" is pressed on the game selection menu. The screen is blanked, the opening tune is played (unless the sound is muted) and the data for the game is reset. Then the first level is set up, and the game carries on in the main loop.
StartGame 25640 CALL ResetAttributes Blank the attribute buffer using ResetAttributes.
25643 CALL ResetScreen Blank the screen buffer using ResetScreen.
Play the opening tune, unless the sound is muted.
25646 LD A,(24333) Jump to SkipMusic if Sound_Enable is not zero.
25649 AND A
25650 JR NZ,SkipMusic
25652 LD DE,26056 Point DE at MusicData.
25655 CALL PlayMusic Play the tune using PlayMusic.
Reset both of the level numbers which are shown on the screen.
SkipMusic 25658 XOR A Write 0 to;
25659 LD (24368),A
25662 LD (24372),A
Blank everything from the 1UP score to the end of the last actor slot, which resets the scores, the sprite data and all of the actors.
25665 LD HL,24334 Write 0 to every byte from 1UP_Score_1 to 24452 (119 bytes).
25668 LD (HL),0
25670 LD D,H
25671 LD E,L
25672 INC DE
25673 LD BC,118
25676 LDIR
25678 CALL NewGame Set up the data for both players using NewGame.
25681 CALL ResetModifiedCode Reset the self modifying code using ResetModifiedCode.
25684 CALL SetUpLevel Set up the first level using SetUpLevel.
Continue on to MainLoop_NewPass.
View the equivalent code in;
Prev: 25622 Up: Map Next: 25687