![]() |
Routines |
| Prev: 98D0 | Up: Map | Next: 993C |
|
Used by the routine at WinRound.
Sets up everything needed to start (or restart) the play area, and then falls through into the main loop. The game also comes back here when a new round starts after all of the sectors have been activated.
|
||||
| StartRound | 990A | LD HL,$5018 | Point HL at the bottom part of the panel, which is in character column 18 of row 10. | |
| 990D | LD BC,$0840 | The block to clear is 08 bytes wide (B) and 40 pixel rows tall (C). | ||
| 9910 | CALL ClearPixelBlock | Clear it using ClearPixelBlock. | ||
| 9913 | LD HL,$1800 | Put the camera at the corner of cell 18 in both directions. | ||
| 9916 | LD ($9691),HL | Set the X position of the camera. | ||
| 9919 | LD ($9693),HL | Set the Y position of the camera. | ||
| 991C | CALL CountSectorPrograms | Count the programs that are installed in each sector using CountSectorPrograms. | ||
| 991F | LD A,$47 | Use bright white on black as the attribute. | ||
| 9921 | CALL FillPlayWindowAttributes | Colour the play window using FillPlayWindowAttributes. | ||
| 9924 | LD A,($9617) | Take the random number... | ||
| 9927 | AND $3F | ...limited to 00-3F... | ||
| 9929 | LD L,A | ...as the column of the map cell that is checked next. | ||
| 992A | LD A,R | Take a number from the memory refresh register... | ||
| 992C | AND $3F | ...limited to 00-3F... | ||
| 992E | LD H,A | ...as the row of the map cell that is checked next. | ||
| 992F | LD ($963D),HL | Store the position of the first map cell to check. | ||
| 9932 | LD A,$01 | Set the flag that says the next message is to be scrolled into the message area. | ||
| 9934 | LD ($964F),A | |||
| 9937 | LD A,$80 | Set a delay of 80 frames before the first attack on a sector. | ||
| 9939 | LD ($9646),A | |||
|
Continue on to MainLoop.
|
||||
| Prev: 98D0 | Up: Map | Next: 993C |