LoadTiles

Last Modified: 1/4/2021

Loads tiles into memory.

Arguments

NameTypeRequiredDescription
TileData Line Label/Long Yes The line label where your tiles are or a pointer to the tile data.
TileCount Integer Yes The number of tiles to load.
VramLocation Integer Yes The location in memory to load the tiles.
Offset Integer No How many tiles to skip from the start of TileData.

Example

Syntax: LoadTiles <TileData>, <TileCount>, <VramLocation> [,<Offset>]
    Palettes pal,0,0,16
    LoadTiles MyTiles,1,1
    a& = LblPtr&(MyTiles)
    LoadTiles a&,1,2
    
    DrawTile 1,0,0
    DrawTile 2,0,1
    
    End
    
pal:
    DataInt $0000,$00EE,$0E0E,$000E,$0EE0,$00E0,$0E00,$0888
    DataInt $0CCC,$0088,$0808,$0008,$0880,$0080,$0800,$0000
    
MyTiles:
    DataLong $77777777
    DataLong $79999997
    DataLong $79999997
    DataLong $79999997
    DataLong $79999997
    DataLong $79999997
    DataLong $79999997
    DataLong $77777777