Prev: 80A9 Up: Map Next: 813A
80E5: Game Selection Menu
Used by the routines at Demo_Start and GameLoop.
GameMenu 80E5 CALL Clear_Screen Call Clear_Screen.
80E8 CALL Initialise_Theme_Music Call Initialise_Theme_Music.
Print up all the options.
GameMenu_Loop 80EB LD HL,$7DC6 HL=Messaging_Splash.
80EE LD DE,$0003 DE=0003.
80F1 CALL PrintString Call PrintString.
Set up displaying the active game option.
80F4 LD HL,$7E37 HL=Messaging_Key.
Calculate the screen position of the active control method.
80F7 LD A,($B2DB) B=02-*Game_Options.
80FA LD B,A
80FB LD A,$02
80FD SUB B
80FE LD B,A
D contains the vertical position.
80FF ADD A,A D=(B*08)-B.
8100 ADD A,A
8101 ADD A,A
8102 SUB B
8103 LD D,A
And E is hardcoded for the horizontal position.
8104 LD E,$03 E=03.
Print the active key to the screen, this just overwrites the one which is already present (so turns it white).
8106 CALL PrintString Call PrintString.
GameMenu_Initialise 8109 LD A,$FF Write FF to TempStore_GameOptions.
810B LD ($B4E9),A
810E CALL Check_Music Call Check_Music.
Check if demo mode should start.
8111 LD A,($B55F) If Flag_DemoMode is not zero jump to Demo_Start.
8114 OR A
8115 JR NZ,Demo_Start
8117 LD A,($B4E9) A=*TempStore_GameOptions.
Handler for selecting "Sinclair Joystick".
811A BIT 0,A If bit 0 is not set, jump to GameMenu_Kempston.
811C JR NZ,GameMenu_Kempston
811E CALL Game_Options_Sinclair Call Game_Options_Sinclair.
8121 JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Kempston Joystick".
GameMenu_Kempston 8123 BIT 1,A If bit 1 is not set, jump to GameMenu_Keyboard.
8125 JR NZ,GameMenu_Keyboard
8127 CALL Game_Options_Kempston Call Game_Options_Kempston.
812A JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Keyboard".
GameMenu_Keyboard 812C BIT 2,A If bit 2 is not set, jump to GameMenu_StartGame.
812E JR NZ,GameMenu_StartGame
8130 CALL Game_Options_Keyboard Call Game_Options_Keyboard.
8133 JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Start".
GameMenu_StartGame 8135 BIT 3,A If bit 3 is not set, jump to GameMenu_Initialise.
8137 JR NZ,GameMenu_Initialise
8139 RET Return.
Prev: 80A9 Up: Map Next: 813A