Prev: 54702 Up: Map Next: 54819
54729: Draw Border
Used by the routine at DrawGameScreen.
Draws the border around the playfield, which is twenty-four tiles wide and sixteen high. The corners and the edges are the same tiles at the top and the left, drawn reflected for the bottom and the right.
border
Set the attribute and the tile set.
DrawBorder 54729 LD A,115 Set the attribute to INK:MAGENTA, PAPER:YELLOW (BRIGHT).
54731 EX AF,AF'
54732 LD BC,(41487) Fetch TileSetAddress.
Draw the top left corner.
54736 LD HL,16388 Point HL at 16388 (in the screen buffer).
Move it to the right in the town.
54739 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54742 LD A,1 Set the tile to the top left corner.
54744 CALL DrawTile Call DrawTile.
Draw the top edge.
54747 INC L Move on to the next column.
54748 LD E,22 Set a count of 22 tiles, and fetch the top edge.
54750 LD A,2
54752 CALL DrawTileRow Call DrawTileRow.
Draw the top right corner.
54755 LD HL,16411 Point HL at 16411 (in the screen buffer).
Move it to the right in the town.
54758 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54761 LD A,65 Set the tile to the top right corner.
54763 CALL DrawTile Call DrawTile.
Draw the bottom left corner.
54766 LD HL,18660 Point HL at 18660 (in the screen buffer).
Move it to the right in the town.
54769 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54772 LD A,129 Set the tile to the bottom left corner.
54774 CALL DrawTile Call DrawTile.
Draw the bottom edge.
54777 INC L Move on to the next column.
54778 LD E,22 Set a count of 22 tiles, and fetch the bottom edge.
54780 LD A,130
54782 CALL DrawTileRow Call DrawTileRow.
Draw the bottom right corner.
54785 LD HL,18683 Point HL at 18683 (in the screen buffer).
Move it to the right in the town.
54788 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54791 LD A,193 Set the tile to the bottom right corner.
54793 CALL DrawTile Call DrawTile.
Draw the left edge.
54796 LD HL,16420 Point HL at 16420 (in the screen buffer).
Move it to the right in the town.
54799 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54802 LD E,14 Set a count of 14 tiles, and fetch the left edge.
54804 LD A,3
54806 CALL DrawTileColumn Call DrawTileColumn.
Draw the right edge.
54809 LD HL,16443 Point HL at 16443 (in the screen buffer).
Move it to the right in the town.
54812 CALL AddTownOffsetToHL Call AddTownOffsetToHL.
54815 LD E,14 Set a count of 14 tiles, and fetch the right edge.
54817 LD A,67
Continue on to DrawTileColumn.
Prev: 54702 Up: Map Next: 54819