![]() |
Routines |
| Prev: E22D | Up: Map | Next: E349 |
|
Used by the routine at InitialiseGame.
|
||||
| PlayerControls_Kempston | E30B | LD IX,$F231 | IX=TablePlayerAttributes. | |
| E30F | LD A,($5BF0) | Jump to Check_PlayerControls_Kempston if *GameState is not set to "Demo Mode" (03). | ||
| E312 | CP $03 | |||
| E314 | JR NZ,Check_PlayerControls_Kempston | |||
| E316 | IN A,($1F) | Read from the Kempston joystick port. | ||
| E318 | AND %00011111 | Keep only bits 0-4. | ||
| E31A | JP NZ,$ED8F | Jump to ED8F if the result is not zero. | ||
| E31D | RET | Return. | ||
|
The control is stored at *KempstonControl but does not appear to be referenced again outside of this routine.
|
||||
| Check_PlayerControls_Kempston | E31E | IN A,($1F) | Read from the Kempston joystick port. | |
| E320 | LD ($F342),A | Write A to *KempstonControl. | ||
|
Check for "fire".
|
||||
| E323 | AND %00010000 | Keep only bit 4. | ||
| E325 | JP NZ,Handler_Doors | Jump to Handler_Doors if the result is not zero. | ||
|
Check for "right".
|
||||
| E328 | LD A,($F342) | A=*KempstonControl. | ||
| E32B | AND %00000001 | Keep only bit 0. | ||
| E32D | JP NZ,PlayerMoveRight | Jump to PlayerMoveRight if the result is not zero. | ||
|
Check for "left".
|
||||
| E330 | LD A,($F342) | A=*KempstonControl. | ||
| E333 | AND %00000010 | Keep only bit 1. | ||
| E335 | JP NZ,PlayerMoveLeft | Jump to PlayerMoveLeft if the result is not zero. | ||
|
Check for "down".
|
||||
| E338 | LD A,($F342) | A=*KempstonControl. | ||
| E33B | AND %00000100 | Keep only bit 2. | ||
| E33D | JP NZ,Handler_LaddersDescending | Jump to Handler_LaddersDescending if the result is not zero. | ||
|
Check for "up".
|
||||
| E340 | LD A,($F342) | A=*KempstonControl. | ||
| E343 | AND %00001000 | Keep only bit 3. | ||
| E345 | JP NZ,Handler_LaddersAscending | Jump to Handler_LaddersAscending if the result is not zero. | ||
|
No controls were pressed, just return.
|
||||
| E348 | RET | Return. | ||
| Prev: E22D | Up: Map | Next: E349 |