![]() |
Routines |
| Prev: 39120 | Up: Map | Next: 39228 |
|
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 | 39178 | LD HL,20504 | Point HL at the bottom part of the panel, which is in character column 24 of row 16. | |
| 39181 | LD BC,2112 | The block to clear is 8 bytes wide (B) and 64 pixel rows tall (C). | ||
| 39184 | CALL ClearPixelBlock | Clear it using ClearPixelBlock. | ||
| 39187 | LD HL,6144 | Put the camera at the corner of cell 24 in both directions. | ||
| 39190 | LD (38545),HL | Set the X position of the camera. | ||
| 39193 | LD (38547),HL | Set the Y position of the camera. | ||
| 39196 | CALL CountSectorPrograms | Count the programs that are installed in each sector using CountSectorPrograms. | ||
| 39199 | LD A,71 | Use bright white on black as the attribute. | ||
| 39201 | CALL FillPlayWindowAttributes | Colour the play window using FillPlayWindowAttributes. | ||
| 39204 | LD A,(38423) | Take the random number... | ||
| 39207 | AND 63 | ...limited to 0-63... | ||
| 39209 | LD L,A | ...as the column of the map cell that is checked next. | ||
| 39210 | LD A,R | Take a number from the memory refresh register... | ||
| 39212 | AND 63 | ...limited to 0-63... | ||
| 39214 | LD H,A | ...as the row of the map cell that is checked next. | ||
| 39215 | LD (38461),HL | Store the position of the first map cell to check. | ||
| 39218 | LD A,1 | Set the flag that says the next message is to be scrolled into the message area. | ||
| 39220 | LD (38479),A | |||
| 39223 | LD A,128 | Set a delay of 128 frames before the first attack on a sector. | ||
| 39225 | LD (38470),A | |||
|
Continue on to MainLoop.
|
||||
| Prev: 39120 | Up: Map | Next: 39228 |