An AssetImage in which all tile indices are stored in a flat array, without any additional compression. More...
#include <sifteo/asset/image.h>
Public Member Functions | |
AssetGroup & | assetGroup () const |
Access the AssetGroup instance associated with this AssetImage. | |
int | numFrames () const |
Access the number of 'frames' in this image. | |
int | numTiles () const |
Compute the total number of tiles in the image. | |
int | numTilesPerFrame () const |
Compute the total number of tiles per frame (tileWidth * tileHeight) | |
operator const _SYSAssetImage & () const | |
Implicit conversion to system object. | |
operator const AssetImage & () const | |
Implicit conversion to AssetImage base class. | |
Int2 | pixelExtent () const |
Half the size of this image, in pixels. | |
int | pixelHeight () const |
The height of this image, in pixels. | |
Int2 | pixelSize () const |
The (width, height) vector of this image, in pixels. | |
int | pixelWidth () const |
The width of this image, in pixels. | |
uint16_t | tile (unsigned i) const |
Returns the index of the tile at linear position 'i' in the image. More... | |
uint16_t | tile (Int2 pos, unsigned frame=0) const |
Return the index of the tile at the specified (x, y) tile coordinates. More... | |
uint16_t | tile (_SYSCubeID cube, unsigned i) const |
Returns the index of the tile at linear position 'i' in the image. More... | |
uint16_t | tile (_SYSCubeID cube, Int2 pos, unsigned frame=0) const |
Return the index of the tile at the specified (x, y) tile coordinates. More... | |
const uint16_t * | tileArray () const |
Get a pointer to the raw tile data. More... | |
Int2 | tileExtent () const |
Half the size of this image, in tiles. | |
int | tileHeight () const |
The height of this image, in tiles. | |
Int2 | tileSize () const |
The (width, height) vector of this image, in tiles. | |
int | tileWidth () const |
The width of this image, in tiles. | |
An AssetImage in which all tile indices are stored in a flat array, without any additional compression.
Flat assets are usually less efficient than compressed AssetImages, but they allow you to have cheap random access to any tile in the image.
Generate a FlatAssetImage by passing the flat=1
option to image{} in your STIR script.
|
inline |
Returns the index of the tile at linear position 'i' in the image.
The returned index is unrelocated; it is relative to the base address of the image's AssetGroup.
|
inline |
Return the index of the tile at the specified (x, y) tile coordinates.
The returned index is unrelocated; it is relative to the base address of the image's AssetGroup.
|
inline |
Returns the index of the tile at linear position 'i' in the image.
The returned index is relocated to an absolute address for the specified cube. This image's assets must be installed on that cube.
|
inline |
Return the index of the tile at the specified (x, y) tile coordinates.
The returned index is relocated to an absolute address for the specified cube. This image's assets must be installed on that cube.
|
inline |
Get a pointer to the raw tile data.
Flat asset images represent their tile data as an array of uint16_t un-relocated tile indices. This returns a pointer to that array.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen