![]() |
Routines |
| Prev: 92A7 | Up: Map | Next: 9305 |
|
Used by the routine at ProcessRevealLine.
|
||||||||
| CopyRevealLine | 92E2 | PUSH DE | Stash the screen position on the stack. | |||||
|
On return from CalculateDartBoardAddress HL will contain the dart board graphic destination (i.e. DartBoard onwards).
|
||||||||
| 92E3 | CALL CalculateDartBoardAddress | Call CalculateDartBoardAddress. | ||||||
|
Set up the source and destination addresses.
|
||||||||
| 92E6 | LD D,H | Copy the dart board graphic location from HL into DE. | ||||||
| 92E7 | LD E,L | |||||||
| 92E8 | LD A,H | H-=20. | ||||||
| 92E9 | SUB $20 | |||||||
| 92EB | LD H,A | |||||||
|
Copy 08 pixel rows that make up one character cell of the dartboard.
|
||||||||
| 92EC | LD B,$08 | Set a counter in B for the number of pixels rows to process. | ||||||
| CopyRevealLine_Loop | 92EE | LD A,(DE) | Copy a byte of the dartboard graphic to the screen buffer. | |||||
| 92EF | LD (HL),A | |||||||
| 92F0 | INC H | Move to the next screen line. | ||||||
| 92F1 | INC D | Move to the next dartboard graphic line. | ||||||
| 92F2 | DJNZ CopyRevealLine_Loop | Decrease counter by one and loop back to CopyRevealLine_Loop until counter is zero. | ||||||
|
Work out which attribute byte to apply.
|
||||||||
| 92F4 | POP HL | Restore the screen position from the stack. | ||||||
| 92F5 | LD A,L | Is the co-ordinate in the menu or dartboard area? | ||||||
| 92F6 | CP $08 | |||||||
|
Default with the dartboard attribute value.
|
||||||||
| 92F8 | LD A,$70 | A=INK: BLACK, PAPER: YELLOW (BRIGHT) . | ||||||
| 92FA | JR NC,RevealLine_SetAttribute | Jump to RevealLine_SetAttribute if the X co-ordinate is greater than or equal to 08. | ||||||
|
The X co-ordinate was less than 08 so use the menu attribute value.
|
||||||||
| 92FC | LD A,$47 | A=INK: WHITE, PAPER: BLACK (BRIGHT) . | ||||||
| RevealLine_SetAttribute | 92FE | EX AF,AF' | Temporarily switch the AF register with the shadow AF register. | |||||
|
On return from CalculateAttributeBuffer HL will contain the attribute buffer location.
|
||||||||
| 92FF | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | ||||||
| 9302 | EX AF,AF' | Restore the AF register from the shadow AF register. | ||||||
| 9303 | LD (HL),A | Write the colour attribute byte to *HL. | ||||||
| 9304 | RET | Return. | ||||||
| Prev: 92A7 | Up: Map | Next: 9305 |