Prev: E800 Up: Map Next: E84D
E80E: Initialise Game
Used by the routine at Alias_InitialiseGame.
InitialiseGame E80E LD HL,$FFFF SP=FFFF.
E811 LD SP,HL
E812 CALL SetRandomNumberSeed Call SetRandomNumberSeed.
E815 LD HL,$6828 Write KeyboardInput to ControlMethod.
E818 LD ($7850),HL
This entry point is used by the routines at DemoModeInput and GameOver.
StartScreen E81B LD HL,($7850) Write *ControlMethod to *ControlMethod_Pointer.
E81E LD ($782C),HL
E821 CALL ClearScreen Call ClearScreen.
E824 CALL DisplayPinkFooter Call DisplayPinkFooter.
E827 XOR A A=00.
E828 DEC A Decrease A by one.
E829 LD ($7820),A Write A to *CurrentLevel.
E82C CALL DisplayStartScreen Call DisplayStartScreen.
Wait for keyboard input.
StartScreen_Input E82F CALL KeyboardInput Call KeyboardInput.
E832 AND A Jump to StartScreen_Input until any key is pressed.
E833 JR Z,StartScreen_Input
Should we start the demo mode?
E835 BIT 4,A Call InitialiseDemoMode if a key from the top row has been pressed.
E837 CALL NZ,InitialiseDemoMode
Should we display the instructions?
E83A BIT 3,A Jump to TestStartGame if a key from the second row has not been pressed.
E83C JR Z,TestStartGame
E83E CALL DisplayInstructions Call DisplayInstructions.
E841 JR StartScreen Jump to StartScreen.
Should we start a new game?
TestStartGame E843 BIT 2,A Jump to CheckPassword if a key from the third row has not been pressed.
E845 JP Z,CheckPassword
Else a key from the third row was pressed so handle changing the controls.
E848 CALL DisplayChangeControls Call DisplayChangeControls.
E84B JR StartScreen Jump to StartScreen.
Prev: E800 Up: Map Next: E84D