Tileset resources management for background layers.
More...
Tileset resources management for background layers.
◆ TLN_CreateTileset()
Creates a tile-based tileset.
- Parameters
-
numtiles | Number of tiles that the tileset will hold |
width | Width of each tile (must be multiple of 8) |
height | Height of each tile (must be multiple of 8) |
palette | Reference to the palette to assign |
sp | Optional reference to the optional sequence pack with associated tileset animations, can be NULL |
attributes | Optional array of attributes, one for each tile. Can be NULL |
- Returns
- Reference to the created tileset, or NULL if error
- See also
- TLN_SetTilesetPixels()
◆ TLN_CreateImageTileset()
Creates a multiple image-based tileset.
- Parameters
-
numtiles | Number of tiles that the tileset will hold |
images | Array of image structures, one for each tile. Can be NULL |
- Returns
- Reference to the created tileset, or NULL if error
◆ TLN_LoadTileset()
Loads a tileset from a Tiled .tsx file.
- Parameters
-
- Returns
- Reference to the newly loaded tileset or NULL if error
◆ TLN_CloneTileset()
Creates a duplicate of the specified tileset and its associated palette.
- Parameters
-
- Returns
- A reference to the newly cloned tileset, or NULL if error
- See also
- TLN_LoadTileset()
◆ TLN_SetTilesetPixels()
bool TLN_SetTilesetPixels |
( |
TLN_Tileset |
tileset, |
|
|
int |
entry, |
|
|
uint8_t * |
srcdata, |
|
|
int |
srcpitch |
|
) |
| |
Sets pixel data for a tile in a tile-based tileset.
- Parameters
-
tileset | Reference to the tileset |
entry | Number of tile to set [0, num_tiles - 1] |
srcdata | Pointer to pixel data to set |
srcpitch | Bytes per line of source data |
- Returns
- true if success, or false if error
- See also
- TLN_CreateTileset()
◆ TLN_GetTileWidth()
Returns the width in pixels of each individual tile in the tileset.
- Parameters
-
tileset | Reference to the tileset to get info from |
- See also
- TLN_GetTileHeight()
◆ TLN_GetTileHeight()
Returns the height in pixels of each individual tile in the tileset.
- Parameters
-
tileset | Reference to the tileset to get info from |
- See also
- TLN_GetTileWidth()
◆ TLN_GetTilesetNumTiles()
Returns the number of different tiles in tileset.
- Parameters
-
tileset | Reference to the tileset to get info from |
◆ TLN_GetTilesetPalette()
◆ TLN_GetTilesetSequencePack()
Returns a reference to the optional sequence pack associated to the specified tileset.
- Parameters
-
tileset | Reference to the tileset to get the palette |
- See also
- TLN_LoadTileset(), TLN_CreateTileset()
◆ TLN_DeleteTileset()