Prev: 32768 Up: Map Next: 32812
32778: 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 32778 LD HL,24064 Write 0 to 8704 bytes starting from GameOptions.
32781 LD BC,8704
GameInitialisation_Loop 32784 LD (HL),0
32786 INC HL
32787 DEC BC
32788 LD A,C
32789 OR B
32790 JR NZ,GameInitialisation_Loop
Use the custom font.
32792 LD HL,54087 Write MainFont to FontPointer.
32795 LD (24068),HL
Set the default scores and draw the menu window.
32798 CALL SetDefaults Call SetDefaults.
32801 CALL CreateWindow Call CreateWindow.
Queue the briefing tune and enter the menu loop.
32804 LD DE,47658 Set the tune pointer to Tune_Briefing.
32807 CALL QueueTune Queue the briefing tune.
32810 JR GameSelect_Loop Jump to GameSelect_Loop.
View the equivalent code in;
Prev: 32768 Up: Map Next: 32812