![]() |
Routines |
| Prev: A831 | Up: Map | Next: A898 |
|
Used by the routines at ShowEnding and RunFrame.
Pauses the game, if SPACE or CAPS SHIFT is being pressed, until one of them is pressed again. The message 'PAUSED' scrolls in and out across the window.
|
||||
| PauseGame | A837 | LD IY,($5CF1) | Bring back IY from SavedIY. | |
| A83B | CALL TestPauseKeys | Test whether SPACE or CAPS SHIFT is being pressed. | ||
| A83E | RET Z | Return if not. | ||
| PauseGame_Release | A83F | CALL TestPauseKeys | Test whether SPACE or CAPS SHIFT is being pressed. | |
| A842 | JR NZ,PauseGame_Release | Jump back until the keys have been released. | ||
| A844 | LD HL,$FF0C | Set the scroll counter to 0C and the character index to FF. | ||
| A847 | LD ($A921),HL | Store them in ScrollCounter and A922. | ||
| A84A | LD A,$06 | Set the length of the message to 06... | ||
| A84C | LD ($A572),A | ...in the operand of the instruction at A571. | ||
| PauseGame_ScrollIn | A84F | EI | Enable interrupts... | |
| A850 | HALT | ...and wait for the next frame. | ||
| A851 | DI | Disable interrupts. | ||
| A852 | LD HL,$A831 | Point HL at PauseMessage. | ||
| A855 | CALL ScrollMessage | Scroll the message by one step. | ||
| A858 | LD HL,$A831 | Point HL at PauseMessage. | ||
| A85B | CALL ScrollMessage | Scroll the message by another step. | ||
| A85E | LD HL,($A921) | Fetch the scroll counter and the character index. | ||
| A861 | LD DE,$060C | Set the values at which the message is completely in. | ||
| A864 | AND A | Clear the carry flag. | ||
| A865 | SBC HL,DE | Compare them. | ||
| A867 | JR NZ,PauseGame_ScrollIn | Jump back to scroll the message until it is completely in. | ||
| PauseGame_Wait | A869 | CALL Wait | Wait for a short time. | |
| A86C | CALL TestPauseKeys | Test whether SPACE or CAPS SHIFT is being pressed. | ||
| A86F | JR Z,PauseGame_Wait | Jump back until one of them is pressed. | ||
| PauseGame_Release2 | A871 | CALL TestPauseKeys | Test whether SPACE or CAPS SHIFT is being pressed. | |
| A874 | JR NZ,PauseGame_Release2 | Jump back until the keys have been released. | ||
| PauseGame_ScrollOut | A876 | EI | Enable interrupts... | |
| A877 | HALT | ...and wait for the next frame. | ||
| A878 | DI | Disable interrupts. | ||
| A879 | LD HL,$A831 | Point HL at PauseMessage. | ||
| A87C | CALL ScrollMessage | Scroll the message by one step. | ||
| A87F | LD HL,$A831 | Point HL at PauseMessage. | ||
| A882 | CALL ScrollMessage | Scroll the message by one step. | ||
| A885 | LD HL,$A831 | Point HL at PauseMessage. | ||
| A888 | CALL ScrollMessage | Scroll the message by one step. | ||
| A88B | LD HL,$A831 | Point HL at PauseMessage. | ||
| A88E | CALL ScrollMessage | Scroll the message by one step. | ||
| A891 | LD A,($A922) | Fetch the character index. | ||
| A894 | CP $0F | Jump back to PauseGame_ScrollOut to scroll the message until it has gone. | ||
| A896 | JR NZ,PauseGame_ScrollOut | |||
| Prev: A831 | Up: Map | Next: A898 |