Prev: 8000 Up: Map Next: 802C
800A: Game Initialisation
Clears game RAM, installs the font, writes the default scores and queues the briefing tune before entering the menu loop.
Clear every game variable.
GameInitialisation 800A LD HL,$5E00 Write 00 to 2200 bytes starting from GameOptions.
800D LD BC,$2200
GameInitialisation_Loop 8010 LD (HL),$00
8012 INC HL
8013 DEC BC
8014 LD A,C
8015 OR B
8016 JR NZ,GameInitialisation_Loop
Use the custom font.
8018 LD HL,$D347 Write MainFont to FontPointer.
801B LD ($5E04),HL
Set the default scores and draw the menu window.
801E CALL SetDefaults Call SetDefaults.
8021 CALL CreateWindow Call CreateWindow.
Queue the briefing tune and enter the menu loop.
8024 LD DE,$BA2A Set the tune pointer to Tune_Briefing.
8027 CALL QueueTune Queue the briefing tune.
802A JR GameSelect_Loop Jump to GameSelect_Loop.
View the equivalent code in;
Prev: 8000 Up: Map Next: 802C