28 # error This is a userspace-only header, not allowed by the current build.
31 #include <sifteo/abi.h>
82 if (_SYS_lti_counter(
"Sifteo.Metadata", 0) == 0) {
85 unsigned numAGSlots = _SYS_lti_counter(
"Sifteo.AssetGroupSlot", -1);
86 _SYS_lti_metadata(_SYS_METADATA_NUM_ASLOTS,
"b", numAGSlots);
89 _SYS_lti_metadata(_SYS_METADATA_UUID,
"IIII",
90 _SYS_lti_uuid(0, 0), _SYS_lti_uuid(0, 1),
91 _SYS_lti_uuid(0, 2), _SYS_lti_uuid(0, 3));
100 _SYS_lti_abort(_SYS_lti_counter(
"Sifteo.Metadata.Title", 0) != 0,
101 "Duplicate Metadata::title() instance.");
103 _SYS_lti_metadata(_SYS_METADATA_TITLE_STR,
"sB", str, 0);
121 _SYS_lti_abort(_SYS_lti_counter(
"Sifteo.Metadata.Package", 0) != 0,
122 "Duplicate Metadata::package() instance.");
124 _SYS_lti_metadata(_SYS_METADATA_PACKAGE_STR,
"sB", pkg, 0);
125 _SYS_lti_metadata(_SYS_METADATA_VERSION_STR,
"sB", version, 0);
142 _SYS_lti_abort(_SYS_lti_counter(
"Sifteo.Metadata.IsDemoOf", 0) != 0,
143 "Duplicate Metadata::isDemoOf() instance.");
145 _SYS_lti_metadata(_SYS_METADATA_IS_DEMO_OF_STR,
"sB", fullAppPkgID, 0);
158 _SYS_lti_abort(_SYS_lti_counter(
"Sifteo.Metadata.Icon", 0) != 0,
159 "Duplicate Metadata::icon() instance.");
160 _SYS_lti_abort(i.width != 96/8 || i.height != 96/8,
161 "Metadata::icon() image must be 96x96 pixels in size.");
163 return image(_SYS_METADATA_ICON_96x96, i);
173 _SYSAssetGroup *G = (_SYSAssetGroup*) _SYS_lti_initializer(
174 reinterpret_cast<const void*>(i.pAssetGroup),
true);
177 _SYS_lti_metadata(key,
"BBBBII",
178 i.width, i.height, i.frames, i.format, G->pHdr, i.pData);
191 _SYS_lti_abort(_SYS_lti_counter(
"Sifteo.Metadata.CubeRange", 0) != 0,
192 "Duplicate Metadata::cubeRange() instance.");
193 _SYS_lti_abort(minCubes > _SYS_NUM_CUBE_SLOTS,
194 "Minimum number of cubes is too high.");
195 _SYS_lti_abort(maxCubes > _SYS_NUM_CUBE_SLOTS,
196 "Maximum number of cubes is too high.");
197 _SYS_lti_abort(minCubes > maxCubes,
198 "Minimum number of cubes must be <= maximum number");
200 _SYS_lti_metadata(_SYS_METADATA_CUBE_RANGE,
"BB", minCubes, maxCubes);
230 _SYS_lti_abort((version & 0xff000000) != 0,
231 "Metadata::minimumOSVersion(): invalid version. Must be of the form "
232 "0xMMNNPP (MM = major, NN = minor, PP = patch).");
234 _SYS_lti_metadata(_SYS_METADATA_MIN_OS_VERSION,
"I", version);