![]() |
Routines |
| Prev: 58105 | Up: Map | Next: 58186 |
|
Used by the routine at Print_EncodedMessage.
Paint the decoded buffer at PrimaryDisplayBuffer with the double-height font at Font_MessageCharacters, pulsing the attribute through 150 frames.
|
||||
|
Point the character set at the message font and paint the buffer until the flash counter hits 150.
|
||||
| Paint_MessageBuffer | 58112 | XOR A | Clear A, then clear the message-frame counter (56738). | |
| 58113 | LD (56738),A | |||
| 58116 | LD HL,58411 | Point HL at the message font + 1 (Font_MessageCharacters + 1), then store it as the current character set. | ||
| 58119 | LD (29433),HL | |||
|
Repaint the decoded buffer at PrimaryDisplayBuffer from attribute row 22720 (attribute buffer).
|
||||
| Paint_MessageBuffer_Frame | 58122 | LD HL,22720 | Point HL at the message attribute row (22720 (attribute buffer)). | |
| 58125 | LD IX,25504 | Point IX at the decoded message buffer (PrimaryDisplayBuffer). | ||
| 58129 | LD A,(56738) | Fetch the message-frame counter (56738). Has it reached 150 frames? If not, continue the pulse at Paint_MessageBuffer_PulseAttr. | ||
| 58132 | CP 150 | |||
| 58134 | JR NZ,Paint_MessageBuffer_PulseAttr | |||
| 58136 | CALL Clear_BothDisplayBuffers | Call Clear_BothDisplayBuffers to clear both display buffers. | ||
| 58139 | RET | Return. | ||
|
Pulse the text attribute from the frame counter at 56738 after dividing by 8, never leaving it at zero.
|
||||
| Paint_MessageBuffer_PulseAttr | 58140 | INC A | Advance the frame counter and store it back at 56738. | |
| 58141 | LD (56738),A | |||
| 58144 | SRL A | Divide A by 8 to slow the attribute pulse. | ||
| 58146 | SRL A | |||
| 58148 | SRL A | |||
| 58150 | OR A | Is the pulsed value zero? If not, jump to Paint_MessageBuffer_ClampAttr. | ||
| 58151 | JR NZ,Paint_MessageBuffer_ClampAttr | |||
| 58153 | INC A | Force a minimum pulse of 1. | ||
|
Clamp the pulsed attribute to white (7) when it reaches 8 or above.
|
||||
| Paint_MessageBuffer_ClampAttr | 58154 | CP 8 | Is the pulsed attribute < 8? If so, keep it at Paint_MessageBuffer_StoreAttr. Otherwise clamp it to white (7). | |
| 58156 | JR C,Paint_MessageBuffer_StoreAttr | |||
| 58158 | LD A,7 | |||
|
Store the pulsed ink in CurrentTextAttribute and its 7−value inverse shift in 56736.
|
||||
| Paint_MessageBuffer_StoreAttr | 58160 | LD C,A | Keep the attribute in C. | |
| 58161 | LD (29447),A | Store it as the current text attribute (CurrentTextAttribute). | ||
| 58164 | LD A,7 | Compute 7−attribute. | ||
| 58166 | SUB C | Subtract the centred column from 7 to get the left pad. | ||
| 58167 | LD (56736),A | Store that inverse shift at 56736 (used while plotting). | ||
|
Centre and draw one message row via Centre_AndDrawMessageRow, then step three attribute rows for the next.
|
||||
| Paint_MessageBuffer_RowLoop | 58170 | CALL Centre_AndDrawMessageRow | Call Centre_AndDrawMessageRow to centre and draw one message row. | |
| 58173 | LD A,(56737) | Fetch the row-terminator byte saved by Centre_AndDrawMessageRow (56737). Was it the message end (])? If so, restart a new frame at Paint_MessageBuffer_Frame. | ||
| 58176 | CP 93 | |||
| 58178 | JR Z,Paint_MessageBuffer_Frame | |||
| 58180 | LD BC,96 | Step HL down by 0096 attribute bytes (three rows). | ||
| 58183 | ADD HL,BC | Advance HL by one message row (0096 attribute bytes). | ||
| 58184 | JR Paint_MessageBuffer_RowLoop | Draw the next message row at Paint_MessageBuffer_RowLoop. | ||
| Prev: 58105 | Up: Map | Next: 58186 |