Skip to content

title: "Tile" description: TRSE built-in method (from IDE help)


Tile

Systems: C64, MEGA65, PLUS4, C128, VIC20, PET
Parameters: a,a,a,a,b,n


Tile( [address TL], [address TR], [address BL], [address BR], [byte], [number] );

  • [address TL] - Address of tiles used for Top Left
  • [address TR] - Address of tiles used for Top Right
  • [address BL] - Address of tiles used for Bottom Left
  • [address BR] - Address of tiles used for Bottom Right
  • [byte] - Tile number to draw
  • [number] - Screen width in characters

Description

Draws a 2 x 2 tile of characters to the screen. Use MoveTo to set the position first. ScreenMemory can also be adjusted before printing a tile.

A tile is four characters used to make a larger character in the construction of game screens. The four addresses can be an array or memory address. Draw a tile to the screen and colors to the color map.

Example

program TileExample; var // tile data for top right, top left, bottom left and bottom right TL: array[8] of byte = (0,1,2,3); TR: array[8] of byte = (3,5,6,7); BL: array[8] of byte = (8,9,10,11); BR: array[8] of byte = (12,13,14,15); @define ScreenWidth 40 begin ClearScreen(32, ^$0400); ClearScreen(RED, ^$D800); moveto(10,10,$04); tile(TL, TR, BL, BR, 0, @ScreenWidth); // draws tile 0 to the screenmemory with bytes: // 0,3 // 8,12 loop(); end.