![]() |
Routines |
| Prev: E31C | Up: Map | Next: E353 |
|
Used by the routine at StartGame.
Pauses the game if CAPS SHIFT or SPACE is pressed on its own. The game continues when the key has been pressed again.
|
||||||||||||||||||||
|
Return unless CAPS SHIFT or SPACE is pressed on its own.
|
||||||||||||||||||||
| PauseGame | E32C | LD A,$7E | Read from the keyboard;
|
|||||||||||||||||
| E32E | CALL ReadKeyboardPort | |||||||||||||||||||
| E331 | BIT 0,A | Return if neither of the keys CAPS SHIFT or SPACE is pressed. | ||||||||||||||||||
| E333 | RET Z | |||||||||||||||||||
|
Return if any of the other keys is pressed too.
|
||||||||||||||||||||
| E334 | AND %00011110 | Keep bits 1 to 4. | ||||||||||||||||||
| E336 | 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 | E337 | LD A,$7E | Read the keys. | |||||||||||||||||
| E339 | CALL ReadKeyboardPort | |||||||||||||||||||
| E33C | BIT 0,A | Jump to PauseGame_Release if bit 0 is set. | ||||||||||||||||||
| E33E | JR NZ,PauseGame_Release | |||||||||||||||||||
|
Wait for a key to be pressed.
|
||||||||||||||||||||
| PauseGame_Press | E340 | LD A,$7E | Read the keys. | |||||||||||||||||
| E342 | CALL ReadKeyboardPort | |||||||||||||||||||
| E345 | BIT 0,A | Jump to PauseGame_Press if bit 0 is not set. | ||||||||||||||||||
| E347 | JR Z,PauseGame_Press | |||||||||||||||||||
|
Wait for the key to be released.
|
||||||||||||||||||||
| PauseGame_ReleaseAgain | E349 | LD A,$7E | Read the keys. | |||||||||||||||||
| E34B | CALL ReadKeyboardPort | |||||||||||||||||||
| E34E | BIT 0,A | Jump to PauseGame_ReleaseAgain if bit 0 is set. | ||||||||||||||||||
| E350 | JR NZ,PauseGame_ReleaseAgain | |||||||||||||||||||
| E352 | RET | Return. | ||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||
| Prev: E31C | Up: Map | Next: E353 |