![]() |
Routines |
| Prev: 53694 | Up: Map | Next: 53811 |
|
Used by the routine at InitialiseGame.
Pauses the game if CAPS SHIFT or SPACE is pressed on its own. PlayPauseSound is played at the start and at the end. The game carries on when CAPS SHIFT or SPACE is pressed again.
|
||||||||||||||||||||
|
Return unless CAPS SHIFT or SPACE is the only key being pressed.
|
||||||||||||||||||||
| PauseGame | 53766 | LD A,126 | Read from the keyboard;
|
|||||||||||||||||
| 53768 | CALL ReadKeyboardPort | |||||||||||||||||||
| 53771 | BIT 0,A | Return if neither CAPS SHIFT nor SPACE is pressed. | ||||||||||||||||||
| 53773 | RET Z | |||||||||||||||||||
| 53774 | AND %00011110 | Keep the bits for the other keys. | ||||||||||||||||||
| 53776 | RET NZ | Return if any of them is pressed. | ||||||||||||||||||
|
Play the pause sound.
|
||||||||||||||||||||
| 53777 | CALL PlayPauseSound | Call PlayPauseSound. | ||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_Release | 53780 | LD A,126 | Read the keys, and jump to PauseGame_Release while CAPS SHIFT or SPACE is pressed. | |||||||||||||||||
| 53782 | CALL ReadKeyboardPort | |||||||||||||||||||
| 53785 | BIT 0,A | |||||||||||||||||||
| 53787 | JR NZ,PauseGame_Release | |||||||||||||||||||
|
Wait for a key to be pressed.
|
||||||||||||||||||||
| PauseGame_Press | 53789 | LD A,126 | Read the keys, and jump to PauseGame_Press until CAPS SHIFT or SPACE is pressed. | |||||||||||||||||
| 53791 | CALL ReadKeyboardPort | |||||||||||||||||||
| 53794 | BIT 0,A | |||||||||||||||||||
| 53796 | JR Z,PauseGame_Press | |||||||||||||||||||
|
Play the pause sound.
|
||||||||||||||||||||
| 53798 | CALL PlayPauseSound | Call PlayPauseSound. | ||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_ReleaseAgain | 53801 | LD A,126 | Read the keys, and jump to PauseGame_ReleaseAgain while CAPS SHIFT or SPACE is pressed. | |||||||||||||||||
| 53803 | CALL ReadKeyboardPort | |||||||||||||||||||
| 53806 | BIT 0,A | |||||||||||||||||||
| 53808 | JR NZ,PauseGame_ReleaseAgain | |||||||||||||||||||
| 53810 | RET | Return. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: 53694 | Up: Map | Next: 53811 |