15 # include <sifteo/math.h>
16 # include <sifteo/macros.h>
17 # include <sifteo/asset/group.h>
20 #include <sifteo/abi.h>
51 #ifndef NOT_USERSPACE // Begin userspace-only members
63 Int2 pixelSize()
const {
return vec<int>(sys.width << 3, sys.height << 3); }
68 #endif // End userspace-only members
92 operator const _SYSAssetImage& ()
const {
return sys; }
93 operator _SYSAssetImage& () {
return sys; }
94 operator const _SYSAssetImage* ()
const {
return &sys; }
95 operator _SYSAssetImage* () {
return &sys; }
118 #ifndef NOT_USERSPACE // Begin userspace-only members
130 Int2 pixelSize()
const {
return vec<int>(sys.width << 3, sys.height << 3); }
141 uint16_t
tile(
unsigned i)
const {
143 return sys.pData + i;
152 uint16_t
tile(
Int2 pos,
unsigned frame = 0)
const {
163 uint16_t
tile(_SYSCubeID cube,
unsigned i)
const {
174 uint16_t
tile(_SYSCubeID cube,
Int2 pos,
unsigned frame = 0)
const {
180 #endif // End userspace-only members
206 operator const AssetImage* ()
const {
return reinterpret_cast<const AssetImage*
>(
this); }
207 operator AssetImage* () {
return reinterpret_cast<AssetImage*
>(
this); }
210 operator const _SYSAssetImage& ()
const {
return sys; }
211 operator _SYSAssetImage& () {
return sys; }
212 operator const _SYSAssetImage* ()
const {
return &sys; }
213 operator _SYSAssetImage* () {
return &sys; }
231 #ifndef NOT_USERSPACE // Begin userspace-only members
243 Int2 pixelSize()
const {
return vec<int>(sys.width << 3, sys.height << 3); }
255 return reinterpret_cast<const uint16_t *
>(sys.pData);
264 uint16_t
tile(
unsigned i)
const {
275 uint16_t
tile(
Int2 pos,
unsigned frame = 0)
const {
286 uint16_t
tile(_SYSCubeID cube,
unsigned i)
const {
297 uint16_t
tile(_SYSCubeID cube,
Int2 pos,
unsigned frame = 0)
const {
303 #endif // End userspace-only members
329 operator const AssetImage* ()
const {
return reinterpret_cast<const AssetImage*
>(
this); }
330 operator AssetImage* () {
return reinterpret_cast<AssetImage*
>(
this); }
333 operator const _SYSAssetImage& ()
const {
return sys; }
334 operator _SYSAssetImage& () {
return sys; }
335 operator const _SYSAssetImage* ()
const {
return &sys; }
336 operator _SYSAssetImage* () {
return &sys; }