![]() |
Routines |
| Prev: F6D6 | Up: Map | Next: F740 |
|
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 06×09 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 | F70A | LD IX,$F6C6 | Point IX at Table_MainMenuLogoAttributes. | ||
| F70E | LD D,$00 | Clear D (row-step high byte stays 00). | |||
| F710 | LD B,$08 | There are 08 logo cells to recolour. | |||
|
Recolour one of the eight logo cells with a fresh random paper attribute.
|
|||||
| ColourCycle_MainMenuLogo_CellLoop | F712 | PUSH BC | Stash BC on the stack. | ||
| F713 | LD HL,$F740 | Point HL at the logo-font scratch byte. | |||
| F716 | LD A,$05 | Load A with 05 (random range for the attribute pick). | |||
|
Pick a paper value that differs from the previous pick at Font_MainMenuLogo.
|
|||||
| ColourCycle_MainMenuLogo_PickAttr | F718 | CALL PseudoRandom | Call PseudoRandom to pick a pseudo-random value. | ||
| F71B | CP (HL) | Does it match the previous pick at Font_MainMenuLogo? If so, jump to ColourCycle_MainMenuLogo_PickAttr to pick again. | |||
| F71C | JR Z,ColourCycle_MainMenuLogo_PickAttr | ||||
| F71E | LD (HL),A | Store the new pick at Font_MainMenuLogo. | |||
| F71F | ADD A,$02 | A+=02. | |||
| F721 | ADD A,A | Multiply by 08 to form a paper attribute. | |||
| F722 | ADD A,A | ||||
| F723 | ADD A,A | ||||
| F724 | LD L,(IX+$00) | Fetch this cell's attribute address into HL. | |||
| F727 | LD H,(IX+$01) | ||||
| F72A | LD C,$06 | There are 06 attribute rows to paint. | |||
|
Paint one attribute row of the 06×09 logo cell.
|
|||||
| ColourCycle_MainMenuLogo_RowLoop | F72C | LD B,$09 | There are 09 attribute cells in a logo row. | ||
|
Write one attribute cell of the colour-cycled logo row.
|
|||||
| ColourCycle_MainMenuLogo_ColLoop | F72E | LD (HL),A | Write the attribute at HL. | ||
| F72F | INC HL | Advance along the attribute row. | |||
| F730 | DJNZ ColourCycle_MainMenuLogo_ColLoop | Decrease the column counter and jump to ColourCycle_MainMenuLogo_ColLoop while columns remain. | |||
| F732 | LD E,$17 | Load E with 17 (bytes from row end to the next logo row). | |||
| F734 | ADD HL,DE | Step HL onto the next attribute row. | |||
| F735 | DEC C | Decrease the row counter. | |||
| F736 | JR NZ,ColourCycle_MainMenuLogo_RowLoop | Jump to ColourCycle_MainMenuLogo_RowLoop while rows remain. | |||
| F738 | INC IX | Move IX to the next attribute address in the table. | |||
| F73A | INC IX | ||||
| F73C | POP BC | Restore BC from the stack. | |||
| F73D | DJNZ ColourCycle_MainMenuLogo_CellLoop | Decrease the cell counter and jump to ColourCycle_MainMenuLogo_CellLoop while cells remain. | |||
| F73F | RET | Return. | |||
| Prev: F6D6 | Up: Map | Next: F740 |