![]() |
Routines |
| Prev: D550 | Up: Map | Next: D579 |
|
Used by the routine at GoldfishGame_PlayerControls.
|
||||
| Controls_KempstonJoystick | D55C | IN A,($1F) | Read from the Kempston joystick port. | |
| D55E | PUSH AF | Stash the control on the stack. | ||
| D55F | AND %00000010 | Keep only bit 1. | ||
| D561 | CALL NZ,GoldfishGame_PlayerMoveLeft | Call GoldfishGame_PlayerMoveLeft if left has been pressed. | ||
| D564 | POP AF | Restore the current control but keep it on the stack. | ||
| D565 | PUSH AF | |||
| D566 | AND %00000100 | Keep only bit 2. | ||
| D568 | CALL NZ,GoldfishGame_PlayerMoveDown | Call GoldfishGame_PlayerMoveDown if down has been pressed. | ||
| D56B | POP AF | Restore the current control but keep it on the stack. | ||
| D56C | PUSH AF | |||
| D56D | AND %00001000 | Keep only bit 3. | ||
| D56F | CALL NZ,GoldfishGame_PlayerMoveUp | Call GoldfishGame_PlayerMoveUp if up has been pressed. | ||
| D572 | POP AF | Restore the current control from the stack. | ||
| D573 | AND %00000001 | Keep only bit 0. | ||
| D575 | JP NZ,GoldfishGame_PlayerMoveRight | Jump to GoldfishGame_PlayerMoveRight if right has been pressed. | ||
| D578 | RET | Return. | ||
| Prev: D550 | Up: Map | Next: D579 |