SecondBASIC Documentation v3

Home / Command Reference / DrawTilesOvr

DrawTilesOvr

Description: Draws one or more tiles on the screen at location <X>, <Y> that is <Width>, <Height> in size. One unit of <X>, <Y> and <Width>, <Height> is equal to one 8x8 tile.

Syntax:

DrawTilesOvr <Label>, <Address>, <X>, <Y>, <Width>, <Height> [, <LabelOffset>]

Part Description
<Label> Required. The label where the tile map is located. The map must be in byte format using the Data command.
<Address> Required. This is the location in VRAM where the tile resides. Typical VRAM values are 0-1344. You can use other addresses, but it's not recommended as those locations may get overwritten by other data such as the sprite table or plane data.
<X> Required. The x-coordinate to draw the tile.
<Y> Required. The y-coordinate to draw the tile.
<Width> Required. The width of the pattern to be drawn.
<Height> Required. The height of the pattern to be drawn.
<LabelOffset> Optional. The number of bytes you want to offset from the <Label>.

Notes: The difference between the DrawTiles command and the DrawTilesOvr is that this command doesn't draw a tile where there's a zero in the tile map.

Example:

    DrawTile 1,0,0
    DrawTile 1,1,0
    DrawTilesOvr MyMap, 0, 0, 0, 2, 2
 
MyMap:
    Data 65,0,67,68