Prev: 32937 Up: Map Next: 33082
32997: Game Selection Menu
Used by the routines at Demo_Start and GameLoop.
GameMenu 32997 CALL Clear_Screen Call Clear_Screen.
33000 CALL Initialise_Theme_Music Call Initialise_Theme_Music.
Print up all the options.
GameMenu_Loop 33003 LD HL,32198 HL=Messaging_Splash.
33006 LD DE,3 DE=0003.
33009 CALL PrintString Call PrintString.
Set up displaying the active game option.
33012 LD HL,32311 HL=Messaging_Key.
Calculate the screen position of the active control method.
33015 LD A,(45787) B=2-*Game_Options.
33018 LD B,A
33019 LD A,2
33021 SUB B
33022 LD B,A
D contains the vertical position.
33023 ADD A,A D=(B*8)-B.
33024 ADD A,A
33025 ADD A,A
33026 SUB B
33027 LD D,A
And E is hardcoded for the horizontal position.
33028 LD E,3 E=3.
Print the active key to the screen, this just overwrites the one which is already present (so turns it white).
33030 CALL PrintString Call PrintString.
GameMenu_Initialise 33033 LD A,255 Write 255 to TempStore_GameOptions.
33035 LD (46313),A
33038 CALL Check_Music Call Check_Music.
Check if demo mode should start.
33041 LD A,(46431) If Flag_DemoMode is not zero jump to Demo_Start.
33044 OR A
33045 JR NZ,Demo_Start
33047 LD A,(46313) A=*TempStore_GameOptions.
Handler for selecting "Sinclair Joystick".
33050 BIT 0,A If bit 0 is not set, jump to GameMenu_Kempston.
33052 JR NZ,GameMenu_Kempston
33054 CALL Game_Options_Sinclair Call Game_Options_Sinclair.
33057 JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Kempston Joystick".
GameMenu_Kempston 33059 BIT 1,A If bit 1 is not set, jump to GameMenu_Keyboard.
33061 JR NZ,GameMenu_Keyboard
33063 CALL Game_Options_Kempston Call Game_Options_Kempston.
33066 JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Keyboard".
GameMenu_Keyboard 33068 BIT 2,A If bit 2 is not set, jump to GameMenu_StartGame.
33070 JR NZ,GameMenu_StartGame
33072 CALL Game_Options_Keyboard Call Game_Options_Keyboard.
33075 JR GameMenu_Loop Jump to GameMenu_Loop.
Handler for selecting "Start".
GameMenu_StartGame 33077 BIT 3,A If bit 3 is not set, jump to GameMenu_Initialise.
33079 JR NZ,GameMenu_Initialise
33081 RET Return.
Prev: 32937 Up: Map Next: 33082