title: "vbmDrawTileMap" description: TRSE built-in method (from IDE help)
vbmDrawTileMap
Systems: VIC20
Parameters: a,a,b,b,b,b
vbmDrawTileMap( [address-map], [address-chars], [byte-X1], [byte-Y1], [byte-X2], [byte-Y2] );
- [address-map] - Address of the tilemap
- [address-chars] - Address of the tile characters
- [byte-X1] - Column on bitmap to start drawing
- [byte-Y1] - Y pixel position on bitmap to start drawing
- [byte-X2] - Column on bitmap to end drawing
- [byte-Y2] - Y pixel position on bitmap to end drawing
Description
Draws a tilemap on the bitmap. The map can be any size but the co-ordinates on the bitmap must equal the width and height of the map.
X1 and X2 are columns which equate directly to the bytes in the map data. X2 = X1 + width of tilemap.
Y1 and Y2 are pixel positions on the bitmap. Y2 = Y1 + (height of tilemap * 8)
There are four ways to draw a tilemap:
- vbmDrawTileMap - draws a tilemap overwriting the bitmap
- vbmDrawTileMapO - draws a tilemap merging with the bitmap
- vbmDrawTileMapE - draws a tilemap merging with EOR operation
- vbmClearTileMap - Cuts out the tilemap from the bitmap
Example
tiles: incbin("tiles.bin", $4000); // tiles / characterset
map: incbin("tilemap.bin", $4050); // a full screen tilemap 20 x 24
map10: incbin("tilemap10x10.bin", $4230); // a small tilemap 10 x 10
...
vbmDrawTileMap( map, tiles, 0, 0, 20, 184 ); // draw a full screen tilemap
vbmDrawTileMap( map10, tiles, 5, 100, 15, 172 ); // draw a smaller tilemap