v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::AssetImage Struct Reference

Any kind of asset image, as defined in your stir script. More...

#include <sifteo/asset/image.h>

Public Member Functions

AssetGroupassetGroup () 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.
 
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.
 
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.
 

Detailed Description

Any kind of asset image, as defined in your stir script.

AssetImage acts as the base class for all tiled assets. It does not imply any particular data representation: an AssetImage may be pinned, flat, or compressed.

We don't use actual C++ subclassing here, since we need to be able to statically initialize all kinds of AssetImages. So, each subclass is POD, and we supply implicit conversions from those classes back to AssetImage.

STIR will generate all assets as AssetImage instances unless they were specifically marked as pinned or flat assets.

In a plain AssetImage, it's possible to access the asset's geometry and to draw it with system support. The underlying data, however, should be treated as opaque when working with plain AssetImages.


The documentation for this struct was generated from the following file: