An AssetConfiguration represents an arrangement of AssetGroups to load. More...
#include <sifteo/asset/loader.h>
Inherits Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t >.
Public Member Functions | |
void | append (_SYSAssetSlot slot, AssetGroup &group, _SYSVolumeHandle volume=0) |
Add an AssetGroup to this configuration. More... | |
Public Member Functions inherited from Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t > | |
AssetConfigurationNode & | append (const AssetConfigurationNode &newItem) |
Synonym for push_back() | |
AssetConfigurationNode & | append () |
Synonym for push_back() | |
Array () | |
Initialize a new empty array. | |
iterator | begin () |
Return an iterator pointing to the first slot in the array. | |
void | clear () |
Equivalent to setCount(0) | |
unsigned | count () const |
How many items does this array currently hold? | |
bool | empty () const |
Is this array empty? | |
iterator | end () |
Return an iterator pointing just past the last in-use slot in the array. | |
void | erase (unsigned index) |
Remove a specific element, by index, and shift the others down. | |
void | erase (iterator item) |
Remove the element at iterator 'item' and shift the others down. | |
void | erase_tail () |
Remove the last element, which involves no shifting. | |
unsigned | find (AssetConfigurationNodeitemToFind) |
const AssetConfigurationNode & | operator[] (unsigned index) const |
Accessor for array elements. | |
const AssetConfigurationNode & | operator[] (int index) const |
Accessor for array elements. | |
AssetConfigurationNode & | operator[] (unsigned index) |
Accessor for array elements. | |
AssetConfigurationNode & | operator[] (int index) |
Accessor for array elements. | |
AssetConfigurationNode | pop_back () |
Deallocate the last element and return a copy of it's value. | |
void | pop_back (AssetConfigurationNode *outValue) |
Pop-back, but avoid a potential unnecessary copy. | |
AssetConfigurationNode & | push_back (const AssetConfigurationNode &newItem) |
Copy 'newItem' to the first unused slot in the array, and return a reference to the copy. | |
AssetConfigurationNode & | push_back () |
Allocate the first unused slot in the array, and return an reference to this uninitialized slot. | |
void | setCount (unsigned c) |
Change the number of elements currently in the array. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Sifteo::Array< AssetConfigurationNode, tCapacity, uint8_t > | |
static unsigned | capacity () |
Retrieve the capacity of this array, always constant at compile-time. | |
An AssetConfiguration represents an arrangement of AssetGroups to load.
This object provides instructions to an AssetLoader about which AssetGroups to load into which slots. A single AssetConfiguration may be applied to all cubes, or different AssetConfigurations may be used for different subsets of cubes during a single load event.
An AssetConfiguration is stored as an array of nodes, each of which associates an AssetGroup with an AssetSlot. The AssetLoader is responsible for making this entire configuration current on the cube, even if this requires erasing AssetSlots, and even if new cubes arrive partway through the loading process.
|
inline |
Add an AssetGroup to this configuration.
This appends a new load instruction to the AssetConfiguration, instructing the AssetLoader to make sure the AssetGroup 'group' is available in the AssetSlot 'slot' by the time the load finishes.
If the AssetGroup is part of a different Volume, you must provide that volume handle as the 'volume' parameter, and the 'group' must be mapped via MappedVolume. If you are loading assets packaged with your own game, you do not need to provide a volume.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen