![]() |
Routines |
| Prev: 63190 | Up: Map | Next: 63296 |
|
Cycle attributes across the eight logo cells at Table_MainMenuLogoAttributes. Picks a fresh paper value via PseudoRandom (avoiding a repeat of the scratch byte at Font_MainMenuLogo), then paints a 6×9 attribute block at each cell. Used after Draw_MainMenuLogo and as a menu acknowledge flash from MainMenu_SelectOptions.
|
|||||
Walk all eight logo cells with a new random attribute.
|
|||||
| ColourCycle_MainMenuLogo | 63242 | LD IX,63174 | Point IX at Table_MainMenuLogoAttributes. | ||
| 63246 | LD D,0 | Clear D (row-step high byte stays 0). | |||
| 63248 | LD B,8 | There are 8 logo cells to recolour. | |||
|
Recolour one of the eight logo cells with a fresh random paper attribute.
|
|||||
| ColourCycle_MainMenuLogo_CellLoop | 63250 | PUSH BC | Stash BC on the stack. | ||
| 63251 | LD HL,63296 | Point HL at the logo-font scratch byte. | |||
| 63254 | LD A,5 | Load A with 5 (random range for the attribute pick). | |||
|
Pick a paper value that differs from the previous pick at Font_MainMenuLogo.
|
|||||
| ColourCycle_MainMenuLogo_PickAttr | 63256 | CALL PseudoRandom | Call PseudoRandom to pick a pseudo-random value. | ||
| 63259 | CP (HL) | Does it match the previous pick at Font_MainMenuLogo? If so, jump to ColourCycle_MainMenuLogo_PickAttr to pick again. | |||
| 63260 | JR Z,ColourCycle_MainMenuLogo_PickAttr | ||||
| 63262 | LD (HL),A | Store the new pick at Font_MainMenuLogo. | |||
| 63263 | ADD A,2 | A+=2. | |||
| 63265 | ADD A,A | Multiply by 8 to form a paper attribute. | |||
| 63266 | ADD A,A | ||||
| 63267 | ADD A,A | ||||
| 63268 | LD L,(IX+0) | Fetch this cell's attribute address into HL. | |||
| 63271 | LD H,(IX+1) | ||||
| 63274 | LD C,6 | There are 6 attribute rows to paint. | |||
|
Paint one attribute row of the 6×9 logo cell.
|
|||||
| ColourCycle_MainMenuLogo_RowLoop | 63276 | LD B,9 | There are 9 attribute cells in a logo row. | ||
|
Write one attribute cell of the colour-cycled logo row.
|
|||||
| ColourCycle_MainMenuLogo_ColLoop | 63278 | LD (HL),A | Write the attribute at HL. | ||
| 63279 | INC HL | Advance along the attribute row. | |||
| 63280 | DJNZ ColourCycle_MainMenuLogo_ColLoop | Decrease the column counter and jump to ColourCycle_MainMenuLogo_ColLoop while columns remain. | |||
| 63282 | LD E,23 | Load E with 23 (bytes from row end to the next logo row). | |||
| 63284 | ADD HL,DE | Step HL onto the next attribute row. | |||
| 63285 | DEC C | Decrease the row counter. | |||
| 63286 | JR NZ,ColourCycle_MainMenuLogo_RowLoop | Jump to ColourCycle_MainMenuLogo_RowLoop while rows remain. | |||
| 63288 | INC IX | Move IX to the next attribute address in the table. | |||
| 63290 | INC IX | ||||
| 63292 | POP BC | Restore BC from the stack. | |||
| 63293 | DJNZ ColourCycle_MainMenuLogo_CellLoop | Decrease the cell counter and jump to ColourCycle_MainMenuLogo_CellLoop while cells remain. | |||
| 63295 | RET | Return. | |||
| Prev: 63190 | Up: Map | Next: 63296 |