Prev: 98B0 Up: Map Next: 990A
98D0: Initialise Game
Used by the routine at GameEntry.
Sets up the screen and the tables used by the game and then shows the title screen. This routine never returns.
InitialiseGame 98D0 LD HL,$9613 Point HL at the first of the game variables.
98D3 LD BC,$01AD There are 01AD bytes to clear, which covers the variables and the first 13 entries of the entity table.
98D6 CALL FillMemory Zero them using FillMemory.
98D9 LD ($9613),IY Save IY, as it is restored every time the game waits for an interrupt.
98DD XOR A Set the border to black.
98DE OUT ($FE),A
98E0 LD DE,$3FFF Point DE at an address in ROM, so that the screen is not touched.
98E3 CALL DrawPlayWindow_Entry Initialise the off-screen buffer using DrawPlayWindow_Entry.
98E6 CALL BuildShiftTables Build the tables that are used to shift sprites using BuildShiftTables.
98E9 CALL ClearScreen Clear the screen using ClearScreen.
98EC CALL DrawBorder Draw the border around the screen using DrawBorder.
This entry point is used by the routine at GameOver.
The game comes back here when it has ended.
TitleScreen 98EF CALL DrawPanel Draw the panel using DrawPanel.
98F2 CALL PrintScore Print the score using PrintScore.
98F5 CALL PrintHiScore Print the hi-score using PrintHiScore.
98F8 LD HL,$961B Point HL at Scores.
98FB LD BC,$01A5 There are 01A5 bytes to clear, which covers the scores, the variables and the first 13 entries of the entity table.
98FE CALL FillMemory Zero them using FillMemory.
9901 CALL ClearLargeWindow Clear the large window using ClearLargeWindow.
9904 CALL GameMenu Show the menu using GameMenu, which returns when the player has chosen to start the game.
9907 CALL StartGame Start the game using StartGame.
Prev: 98B0 Up: Map Next: 990A