![]() |
Routines |
Prev: 25061 | Up: Map | Next: 25184 |
|
||||||||||||||||||||
Blank the 1UP, 2UP and HI scores.
|
||||||||||||||||||||
GameInitialisation | 25067 | LD HL,23792 | Write 0 to 10 bytes from High_Score to 23802. | |||||||||||||||||
25070 | LD BC,2560 | |||||||||||||||||||
GameInitialisation_Loop | 25073 | LD (HL),C | ||||||||||||||||||
25074 | INC HL | |||||||||||||||||||
25075 | DJNZ GameInitialisation_Loop | |||||||||||||||||||
This entry point is used by the routine at PlayerReset.
|
||||||||||||||||||||
Game_Restart | 25077 | DI | Disable interrupts. | |||||||||||||||||
25078 | LD SP,23792 | Set the stack pointer to High_Score. | ||||||||||||||||||
25081 | CALL CreateWindow | Call CreateWindow. | ||||||||||||||||||
25084 | LD A,4 | Write 4 to JetmanSpeedModifier. | ||||||||||||||||||
25086 | LD (24010),A | |||||||||||||||||||
GameInitialisation_0 | 25089 | CALL GameMenu | ||||||||||||||||||
25092 | LD A,(23795) | D=GameOptions. | ||||||||||||||||||
25095 | LD D,A | |||||||||||||||||||
25096 | LD A,247 | Read from the keyboard;
|
||||||||||||||||||
25098 | OUT (253),A | |||||||||||||||||||
25100 | IN A,(254) | |||||||||||||||||||
25102 | CPL | Flip the bits. | ||||||||||||||||||
Handle 1UP selection.
|
||||||||||||||||||||
25103 | BIT 0,A | Has key "1" been pressed? ("1 PLAYER GAME"). | ||||||||||||||||||
25105 | JR Z,GameSelect_CheckP2 | If not jump to GameSelect_CheckP2. | ||||||||||||||||||
25107 | RES 0,D | Set player count = 1. | ||||||||||||||||||
Handle 2UP selection.
|
||||||||||||||||||||
GameSelect_CheckP2 | 25109 | BIT 1,A | Has key "2" been pressed? ("2 PLAYER GAME"). | |||||||||||||||||
25111 | JR Z,GameSelect_CheckKeyboard | If not jump to GameSelect_CheckKeyboard. | ||||||||||||||||||
25113 | SET 0,D | Set player count = 2. | ||||||||||||||||||
Handle Keyboard selection.
|
||||||||||||||||||||
GameSelect_CheckKeyboard | 25115 | BIT 2,A | Has key "3" been pressed? ("3 KEYBOARD"). | |||||||||||||||||
25117 | JR Z,GameSelect_CheckKempston | If not jump to GameSelect_CheckKempston. | ||||||||||||||||||
25119 | RES 1,D | Set control = "keyboard". | ||||||||||||||||||
Handle Kempston Joystick selection.
|
||||||||||||||||||||
GameSelect_CheckKempston | 25121 | BIT 3,A | Has key "4" been pressed? ("4 KEMPSTON JOYSTICK"). | |||||||||||||||||
25123 | JR Z,GameSelect_CheckStart | If not jump to GameSelect_CheckStart. | ||||||||||||||||||
25125 | SET 1,D | Set control = "joystick". | ||||||||||||||||||
Handle starting a new game.
|
||||||||||||||||||||
GameSelect_CheckStart | 25127 | BIT 4,A | Has key "5" been pressed? ("5 START GAME"). | |||||||||||||||||
25129 | JP NZ,StartGame | If so, jump to StartGame. | ||||||||||||||||||
Handle flashing each selection.
|
||||||||||||||||||||
25132 | LD A,D | |||||||||||||||||||
25133 | LD (23795),A | |||||||||||||||||||
25136 | LD HL,25230 | HL=GameSelection_Attributes+1 (i.e. ignoring "Game Selection" as it doesn't flash). | ||||||||||||||||||
25139 | LD A,(23795) | |||||||||||||||||||
25142 | LD C,A | |||||||||||||||||||
25143 | BIT 0,C | |||||||||||||||||||
25145 | JR NZ,GameInitialisation_3 | |||||||||||||||||||
25147 | CALL GameInitialisation_5 | |||||||||||||||||||
GameInitialisation_1 | 25150 | BIT 1,C | ||||||||||||||||||
25152 | JR NZ,GameInitialisation_4 | |||||||||||||||||||
25154 | CALL GameInitialisation_5 | |||||||||||||||||||
GameInitialisation_2 | 25157 | JP GameInitialisation_0 | ||||||||||||||||||
GameInitialisation_3 | 25160 | CALL GameInitialisation_6 | ||||||||||||||||||
25163 | JR GameInitialisation_1 | |||||||||||||||||||
GameInitialisation_4 | 25165 | CALL GameInitialisation_6 | ||||||||||||||||||
25168 | JR GameInitialisation_2 | |||||||||||||||||||
GameInitialisation_5 | 25170 | SET 7,(HL) | ||||||||||||||||||
25172 | INC HL | |||||||||||||||||||
25173 | RES 7,(HL) | |||||||||||||||||||
25175 | INC HL | |||||||||||||||||||
25176 | RET | |||||||||||||||||||
GameInitialisation_6 | 25177 | RES 7,(HL) | ||||||||||||||||||
25179 | INC HL | |||||||||||||||||||
25180 | SET 7,(HL) | |||||||||||||||||||
25182 | INC HL | |||||||||||||||||||
25183 | RET | |||||||||||||||||||
View the equivalent code in;
|
Prev: 25061 | Up: Map | Next: 25184 |