![]() |
Routines |
| Prev: 62554 | Up: Map | Next: 62700 |
|
Used by the routine at Extra_Life_Flash.
Renders one frame of the extra life colour flash animation. The frame index in A controls the inset from the edges: 11 paints a narrow band near the centre of the attribute area; 0 fills the full screen border. Each call fills the top row, the left and right border cells of each middle row, and the bottom row with the flash colour.
|
||||||||
| Draw_Colour_Flash_Rectangle | 62600 | LD HL,22528 | Point to the start of the attribute area. | |||||
| 62603 | LD C,A | Copy the frame index to BC and DE. | ||||||
| 62604 | LD B,0 | |||||||
| 62606 | LD E,A | |||||||
| 62607 | LD D,0 | |||||||
| 62609 | SLA E | Shift DE left by 5 to compute the attribute row offset. | ||||||
| 62611 | RL D | |||||||
| 62613 | SLA E | |||||||
| 62615 | RL D | |||||||
| 62617 | SLA E | |||||||
| 62619 | RL D | |||||||
| 62621 | SLA E | |||||||
| 62623 | RL D | |||||||
| 62625 | SLA E | |||||||
| 62627 | RL D | |||||||
| 62629 | ADD HL,DE | Point to the starting attribute cell for this frame. | ||||||
| 62630 | ADD HL,BC | |||||||
| 62631 | PUSH HL | Stash the starting attribute address on the stack. | ||||||
| 62632 | LD A,32 | Calculate the top row fill width and set the loop counter. | ||||||
| 62634 | SUB C | |||||||
| 62635 | SUB C | |||||||
| 62636 | LD B,A | |||||||
| 62637 | LD (50438),A | Save the row fill width. | ||||||
| 62640 | LD A,(50439) | Load the flash colour. | ||||||
|
Fill the top row of the rectangle.
|
||||||||
| Draw_Colour_Flash_Rectangle_Top | 62643 | LD (HL),A | Fill the top row with the flash colour. | |||||
| 62644 | INC HL | |||||||
| 62645 | DJNZ Draw_Colour_Flash_Rectangle_Top | |||||||
| 62647 | POP HL | Restore the row pointer and advance to the next attribute row. | ||||||
| 62648 | LD DE,32 | |||||||
| 62651 | ADD HL,DE | |||||||
| 62652 | LD A,22 | Calculate the middle row count; jump to Draw_Colour_Flash_Rectangle_Bottom if none. | ||||||
| 62654 | SUB C | |||||||
| 62655 | SUB C | |||||||
| 62656 | JR Z,Draw_Colour_Flash_Rectangle_Bottom | |||||||
| 62658 | LD B,A | Set the middle section row counter. | ||||||
| 62659 | LD A,(50438) | Calculate the stride to the far border cell and save it. | ||||||
| 62662 | DEC A | |||||||
| 62663 | LD E,A | |||||||
| 62664 | LD D,0 | |||||||
| 62666 | LD (50436),DE | |||||||
| 62670 | LD A,(50439) | Load the flash colour. | ||||||
|
For each middle row, paint the left and right border cells.
|
||||||||
| Draw_Colour_Flash_Rectangle_Middle | 62673 | PUSH HL | Paint the left and right border cells and advance to the next row. | |||||
| 62674 | LD (HL),A | |||||||
| 62675 | LD DE,(50436) | |||||||
| 62679 | ADD HL,DE | |||||||
| 62680 | LD (HL),A | |||||||
| 62681 | POP HL | |||||||
| 62682 | LD DE,32 | |||||||
| 62685 | ADD HL,DE | |||||||
| 62686 | DJNZ Draw_Colour_Flash_Rectangle_Middle | |||||||
|
Fill the bottom row of the rectangle.
|
||||||||
| Draw_Colour_Flash_Rectangle_Bottom | 62688 | LD A,(50438) | Set up to fill the bottom row with the flash colour. | |||||
| 62691 | LD B,A | |||||||
| 62692 | LD A,(50439) | |||||||
| Draw_Colour_Flash_Rectangle_Bottom_Fill | 62695 | LD (HL),A | Fill the bottom row with the flash colour. | |||||
| 62696 | INC HL | |||||||
| 62697 | DJNZ Draw_Colour_Flash_Rectangle_Bottom_Fill | |||||||
| 62699 | RET | Return. | ||||||
| Prev: 62554 | Up: Map | Next: 62700 |