Prev: 54307 Up: Map Next: 54477
54371: 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 54371 LD A,79 Set the attribute to INK:WHITE, PAPER:BLUE (BRIGHT).
54373 EX AF,AF'
54374 LD BC,(41487) Fetch TileSetAddress.
Draw the top left corner.
54378 LD HL,20492 Point HL at 20492 (in the screen buffer).
Move it to the right in the town.
54381 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54384 LD A,18 Set the tile to the top left corner.
54386 CALL DrawTile Call DrawTile.
Draw the top edge.
54389 INC L Move on to the next column.
54390 LD E,14 Set a count of 14 tiles, and fetch the top edge.
54392 LD A,19
54394 CALL DrawTileRow Call DrawTileRow.
Draw the top right corner.
54397 LD A,82 Set the tile to the top right corner.
54399 CALL DrawTile Call DrawTile.
Draw the left edge.
54402 LD HL,20524 Point HL at 20524 (in the screen buffer).
Move it to the right in the town.
54405 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54408 LD E,6 Set a count of 6 tiles, and fetch the left edge.
54410 LD A,20
54412 CALL DrawTileColumn Call DrawTileColumn.
Draw the right edge.
54415 LD HL,20539 Point HL at 20539 (in the screen buffer).
Move it to the right in the town.
54418 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54421 LD E,6 Set a count of 6 tiles, and fetch the right edge.
54423 LD A,84
54425 CALL DrawTileColumn Call DrawTileColumn.
Draw the bottom left corner.
54428 LD HL,20716 Point HL at 20716 (in the screen buffer).
Move it to the right in the town.
54431 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54434 LD A,146 Set the tile to the bottom left corner.
54436 CALL DrawTile Call DrawTile.
Draw the first part of the bottom edge.
54439 INC L Move on to the next column.
54440 LD E,3 Set a count of 3 tiles, and fetch the bottom edge.
54442 LD A,147
54444 CALL DrawTileRow Call DrawTileRow.
Draw the second part of the bottom edge.
54447 LD HL,20728 Point HL at 20728 (in the screen buffer).
Move it to the right in the town.
54450 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54453 LD E,3 Set a count of 3 tiles, and fetch the bottom edge.
54455 LD A,147
54457 CALL DrawTileRow Call DrawTileRow.
Draw the bottom right corner.
54460 LD A,210 Set the tile to the bottom right corner.
54462 CALL DrawTile Call DrawTile.
Print the word.
54465 LD HL,20720 Point HL at 20720 (in the screen buffer).
Move it to the right in the town.
54468 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54471 LD DE,54477 Point DE at TelegramText.
54474 JP PrintText Jump to PrintText.
Prev: 54307 Up: Map Next: 54477