![]() |
Routines |
| Prev: 52764 | Up: Map | Next: 52814 |
|
Used by the routine at RunGame.
Pauses the game if CAPS SHIFT or SPACE is pressed on its own. The game waits for the key to be let go of, then for it to be pressed again and let go of again. There is a beep for the start and for the end of the pause.
|
||||||||||||||||||||
|
Return unless CAPS SHIFT or SPACE is pressed on its own.
|
||||||||||||||||||||
| PauseGame | 52770 | LD A,126 | Read from the keyboard;
|
|||||||||||||||||
| 52772 | CALL ReadKeyboardPort | |||||||||||||||||||
| 52775 | BIT 0,A | Return if bit 0 is not set. | ||||||||||||||||||
| 52777 | RET Z | |||||||||||||||||||
| 52778 | AND %00011110 | Keep bits 1 to 4. | ||||||||||||||||||
| 52780 | RET NZ | Return if any of them is set. | ||||||||||||||||||
|
Wait for the key to be let go of, then pressed and let go of again.
|
||||||||||||||||||||
| PauseGame_Release | 52781 | LD A,126 | Read the keys. | |||||||||||||||||
| 52783 | CALL ReadKeyboardPort | |||||||||||||||||||
| 52786 | BIT 0,A | Jump to PauseGame_Release if bit 0 is set. | ||||||||||||||||||
| 52788 | JR NZ,PauseGame_Release | |||||||||||||||||||
| 52790 | CALL PlayMiddleBeep | Call PlayMiddleBeep. | ||||||||||||||||||
| PauseGame_Wait | 52793 | LD A,126 | Read the keys. | |||||||||||||||||
| 52795 | CALL ReadKeyboardPort | |||||||||||||||||||
| 52798 | BIT 0,A | Jump to PauseGame_Wait if bit 0 is not set. | ||||||||||||||||||
| 52800 | JR Z,PauseGame_Wait | |||||||||||||||||||
| PauseGame_Finish | 52802 | LD A,126 | Read the keys. | |||||||||||||||||
| 52804 | CALL ReadKeyboardPort | |||||||||||||||||||
| 52807 | BIT 0,A | Jump to PauseGame_Finish if bit 0 is set. | ||||||||||||||||||
| 52809 | JR NZ,PauseGame_Finish | |||||||||||||||||||
| 52811 | JP PlayMiddleBeep | Jump to PlayMiddleBeep. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: 52764 | Up: Map | Next: 52814 |