Prev: D423 Up: Map Next: D4CD
D463: Draw Telegram Frame
Used by the routine at DrawGameScreen.
Draws the frame of the telegram, which has the word at TelegramText in its lower edge. The corners and the edges are the same tiles at the top and the left, drawn reflected for the bottom and the right.
telegram-frame
Set the attribute and the tile set.
DrawTelegramFrame D463 LD A,$4F Set the attribute to INK:WHITE, PAPER:BLUE (BRIGHT).
D465 EX AF,AF'
D466 LD BC,($A20F) Fetch TileSetAddress.
Draw the top left corner.
D46A LD HL,$500C Point HL at 500C (in the screen buffer).
Move it to the right in the town.
D46D CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D470 LD A,$12 Set the tile to the top left corner.
D472 CALL DrawTile Call DrawTile.
Draw the top edge.
D475 INC L Move on to the next column.
D476 LD E,$0E Set a count of 0E tiles, and fetch the top edge.
D478 LD A,$13
D47A CALL DrawTileRow Call DrawTileRow.
Draw the top right corner.
D47D LD A,$52 Set the tile to the top right corner.
D47F CALL DrawTile Call DrawTile.
Draw the left edge.
D482 LD HL,$502C Point HL at 502C (in the screen buffer).
Move it to the right in the town.
D485 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D488 LD E,$06 Set a count of 06 tiles, and fetch the left edge.
D48A LD A,$14
D48C CALL DrawTileColumn Call DrawTileColumn.
Draw the right edge.
D48F LD HL,$503B Point HL at 503B (in the screen buffer).
Move it to the right in the town.
D492 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D495 LD E,$06 Set a count of 06 tiles, and fetch the right edge.
D497 LD A,$54
D499 CALL DrawTileColumn Call DrawTileColumn.
Draw the bottom left corner.
D49C LD HL,$50EC Point HL at 50EC (in the screen buffer).
Move it to the right in the town.
D49F CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D4A2 LD A,$92 Set the tile to the bottom left corner.
D4A4 CALL DrawTile Call DrawTile.
Draw the first part of the bottom edge.
D4A7 INC L Move on to the next column.
D4A8 LD E,$03 Set a count of 03 tiles, and fetch the bottom edge.
D4AA LD A,$93
D4AC CALL DrawTileRow Call DrawTileRow.
Draw the second part of the bottom edge.
D4AF LD HL,$50F8 Point HL at 50F8 (in the screen buffer).
Move it to the right in the town.
D4B2 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D4B5 LD E,$03 Set a count of 03 tiles, and fetch the bottom edge.
D4B7 LD A,$93
D4B9 CALL DrawTileRow Call DrawTileRow.
Draw the bottom right corner.
D4BC LD A,$D2 Set the tile to the bottom right corner.
D4BE CALL DrawTile Call DrawTile.
Print the word.
D4C1 LD HL,$50F0 Point HL at 50F0 (in the screen buffer).
Move it to the right in the town.
D4C4 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
D4C7 LD DE,$D4CD Point DE at TelegramText.
D4CA JP PrintText Jump to PrintText.
Prev: D423 Up: Map Next: D4CD