![]() |
Routines |
| Prev: E2F9 | Up: Map | Next: E34A |
|
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 96 frames.
|
||||
|
Point the character set at the message font and paint the buffer until the flash counter hits 96.
|
||||
| Paint_MessageBuffer | E300 | XOR A | Clear A, then clear the message-frame counter (DDA2). | |
| E301 | LD ($DDA2),A | |||
| E304 | LD HL,$E42B | Point HL at the message font + 01 (Font_MessageCharacters + 01), then store it as the current character set. | ||
| E307 | LD ($72F9),HL | |||
|
Repaint the decoded buffer at PrimaryDisplayBuffer from attribute row 58C0 (attribute buffer).
|
||||
| Paint_MessageBuffer_Frame | E30A | LD HL,$58C0 | Point HL at the message attribute row (58C0 (attribute buffer)). | |
| E30D | LD IX,$63A0 | Point IX at the decoded message buffer (PrimaryDisplayBuffer). | ||
| E311 | LD A,($DDA2) | Fetch the message-frame counter (DDA2). Has it reached 96 frames? If not, continue the pulse at Paint_MessageBuffer_PulseAttr. | ||
| E314 | CP $96 | |||
| E316 | JR NZ,Paint_MessageBuffer_PulseAttr | |||
| E318 | CALL Clear_BothDisplayBuffers | Call Clear_BothDisplayBuffers to clear both display buffers. | ||
| E31B | RET | Return. | ||
|
Pulse the text attribute from the frame counter at DDA2 after dividing by 08, never leaving it at zero.
|
||||
| Paint_MessageBuffer_PulseAttr | E31C | INC A | Advance the frame counter and store it back at DDA2. | |
| E31D | LD ($DDA2),A | |||
| E320 | SRL A | Divide A by 08 to slow the attribute pulse. | ||
| E322 | SRL A | |||
| E324 | SRL A | |||
| E326 | OR A | Is the pulsed value zero? If not, jump to Paint_MessageBuffer_ClampAttr. | ||
| E327 | JR NZ,Paint_MessageBuffer_ClampAttr | |||
| E329 | INC A | Force a minimum pulse of 01. | ||
|
Clamp the pulsed attribute to white (07) when it reaches 08 or above.
|
||||
| Paint_MessageBuffer_ClampAttr | E32A | CP $08 | Is the pulsed attribute < 08? If so, keep it at Paint_MessageBuffer_StoreAttr. Otherwise clamp it to white (07). | |
| E32C | JR C,Paint_MessageBuffer_StoreAttr | |||
| E32E | LD A,$07 | |||
|
Store the pulsed ink in CurrentTextAttribute and its 07−value inverse shift in DDA0.
|
||||
| Paint_MessageBuffer_StoreAttr | E330 | LD C,A | Keep the attribute in C. | |
| E331 | LD ($7307),A | Store it as the current text attribute (CurrentTextAttribute). | ||
| E334 | LD A,$07 | Compute 07−attribute. | ||
| E336 | SUB C | Subtract the centred column from 07 to get the left pad. | ||
| E337 | LD ($DDA0),A | Store that inverse shift at DDA0 (used while plotting). | ||
|
Centre and draw one message row via Centre_AndDrawMessageRow, then step three attribute rows for the next.
|
||||
| Paint_MessageBuffer_RowLoop | E33A | CALL Centre_AndDrawMessageRow | Call Centre_AndDrawMessageRow to centre and draw one message row. | |
| E33D | LD A,($DDA1) | Fetch the row-terminator byte saved by Centre_AndDrawMessageRow (DDA1). Was it the message end (])? If so, restart a new frame at Paint_MessageBuffer_Frame. | ||
| E340 | CP $5D | |||
| E342 | JR Z,Paint_MessageBuffer_Frame | |||
| E344 | LD BC,$0060 | Step HL down by 0060 attribute bytes (three rows). | ||
| E347 | ADD HL,BC | Advance HL by one message row (0060 attribute bytes). | ||
| E348 | JR Paint_MessageBuffer_RowLoop | Draw the next message row at Paint_MessageBuffer_RowLoop. | ||
| Prev: E2F9 | Up: Map | Next: E34A |