Prev: 35924 Up: Map Next: 36249
36059: Game Control Settings
Used by the routine at Game_Configs_Main.
The player controls menu. Used for either player, references the currently targetted player at Temp_Player.
Game_Configs_Controls 36059 CALL Clear_Screen Call Clear_Screen.
36062 LD DE,36566 Point to Text_Default_Layout and call Print_String.
36065 LD HL,301
36068 CALL Print_String
36071 LD DE,36596 Point to Text_Sinclair_P1 and call Print_String.
36074 LD HL,310
36077 CALL Print_String
36080 LD DE,36623 Point to Text_Sinclair_P2 and call Print_String.
36083 LD HL,319
36086 CALL Print_String
36089 LD DE,36650 Point to Text_Keyboard_Reconfig and call Print_String.
36092 LD HL,328
36095 CALL Print_String
36098 LD DE,36673 Point to Text_Kempston and call Print_String.
36101 LD HL,337
36104 CALL Print_String
36107 LD DE,36697 Point to Text_Type_2 and call Print_String.
36110 LD HL,881
36113 CALL Print_String
36116 CALL Configs_Delay Adds a delay for keyboard debounce.
36119 CALL Configs_Delay
Does the user want to revert to the default control method?
Game_Controls_Defaults 36122 LD A,36 Check if "1" key is pressed.
36124 CALL Keyboard_Test
36127 JP C,Game_Controls_Sinclair_1 No keys were pressed, continue on to Game_Controls_Sinclair_1.
36130 JP Game_Controls_Set_Default Jump to Game_Controls_Set_Default.
Change player to use "Sinclair Joystick #1"?
Game_Controls_Sinclair_1 36133 LD A,28 Check if "2" key is pressed.
36135 CALL Keyboard_Test
36138 JP C,Game_Controls_Sinclair_2 No keys were pressed, continue on to Game_Controls_Sinclair_2.
36141 JP Game_Controls_Set_Sinclair_1 Jump to Game_Controls_Set_Sinclair_1.
Change player to use "Sinclair Joystick #2"?
Game_Controls_Sinclair_2 36144 LD A,20 Check if "3" key is pressed.
36146 CALL Keyboard_Test
36149 JP C,Game_Controls_Kempston No keys were pressed, continue on to Game_Controls_Kempston.
36152 JP Game_Controls_Set_Sinclair_2 Jump to Game_Controls_Set_Sinclair_2.
Change player to use "Kempston" joystick?
Game_Controls_Kempston 36155 LD A,4 Check if "5" key is pressed.
36157 CALL Keyboard_Test
36160 JP C,Game_Controls_Keyboard No keys were pressed, continue on to Game_Controls_Keyboard.
36163 JP Game_Controls_Set_Kempston Jump to Game_Controls_Set_Kempston.
Redefine keys for player.
Game_Controls_Keyboard 36166 LD A,12 Check if "4" key is pressed.
36168 CALL Keyboard_Test
36171 JP C,Game_Controls_Defaults No keys were pressed, loop back round to Game_Controls_Defaults.
36174 CALL Configs_Delay Adds a delay for keyboard debounce.
36177 CALL Configs_Delay
36180 JP Game_Configs_Keys Jump to Game_Configs_Keys.
Actions setting keyboard controls for player back to defaults.
Game_Controls_Set_Default 36183 LD HL,(36457) Check if Temp_Player is equal to Player_1_Controls.
36186 LD BC,35794
36189 XOR A
36190 SBC HL,BC
36192 JP NZ,Game_Controls_Set_Default_P2 Jump to Game_Controls_Set_Default_P2 if we are working with player 2.
36195 LD HL,35834 Store P1_Default_Keys at Player_1_Controls.
36198 LD (35794),HL
36201 JP Game_Configs_Return Jump to Game_Configs_Return (just returns).
Game_Controls_Set_Default_P2 36204 LD HL,35852 Store P2_Default_Keys at Player_2_Controls.
36207 LD (35814),HL
36210 JP Game_Configs_Return Jump to Game_Configs_Return (just returns).
Actions setting player to use Sinclair Joystick #1.
Game_Controls_Set_Sinclair_1 36213 LD HL,(36457) Fetch the current player from Temp_Player.
36216 LD DE,35888 Pushes Sinclair_1 for the current player.
36219 LD (HL),E
36220 INC HL
36221 LD (HL),D
36222 JP Game_Configs_Return Jump to Game_Configs_Return (just returns).
Actions setting player to use Sinclair Joystick #2.
Game_Controls_Set_Sinclair_2 36225 LD HL,(36457) Fetch the current player from Temp_Player.
36228 LD DE,35870 Pushes Sinclair_2 for the current player.
36231 LD (HL),E
36232 INC HL
36233 LD (HL),D
36234 JP Game_Configs_Return Jump to Game_Configs_Return (just returns).
Actions setting player to use Kempston Joystick.
Game_Controls_Set_Kempston 36237 LD HL,(36457) Fetch the current player from Temp_Player.
36240 LD DE,35906 Pushes Kempston for the current player.
36243 LD (HL),E
36244 INC HL
36245 LD (HL),D
36246 JP Game_Configs_Return Jump to Game_Configs_Return (just returns).
Prev: 35924 Up: Map Next: 36249