9 # error This is a userspace-only header, not allowed by the current build.
12 #include <sifteo/abi.h>
13 #include <sifteo/macros.h>
14 #include <sifteo/math.h>
15 #include <sifteo/asset.h>
16 #include <sifteo/video/color.h>
43 _SYSAttachedVideoBuffer sys;
49 return _SYS_VRAM_BG2_WIDTH;
56 return _SYS_VRAM_BG2_WIDTH;
117 _SYS_vbuf_fill(&sys.vbuf, 0, _SYS_TILE77(index),
sizeInWords());
135 _SYS_vbuf_poke(&sys.vbuf,
offsetof(_SYSVideoRAM, bg2_border) / 2,
143 RGB565 result = { _SYS_vbuf_peek(&sys.vbuf,
offsetof(_SYSVideoRAM, bg2_border)) };
153 256.0f * m.
cx + 0.5f,
154 256.0f * m.
cy + 0.5f,
155 256.0f * m.
xx + 0.5f,
156 256.0f * m.
xy + 0.5f,
157 256.0f * m.
yx + 0.5f,
158 256.0f * m.
yy + 0.5f,
160 _SYS_vbuf_write(&sys.vbuf,
offsetof(_SYSVideoRAM, bg2_affine)/2,
161 (
const uint16_t *)&a, 6);
172 _SYS_vbuf_poke(&sys.vbuf,
tileAddr(pos), _SYS_TILE77(tileIndex));
181 void span(
UInt2 pos,
unsigned width,
unsigned tileIndex)
185 _SYS_vbuf_fill(&sys.vbuf,
tileAddr(pos), _SYS_TILE77(tileIndex), width);
197 span(topLeft, size.
x, tileIndex);
213 _SYS_image_BG2Draw(&sys, image,
tileAddr(pos), frame);
226 _SYS_image_BG2DrawRect(&sys, image,
tileAddr(destXY),
227 frame, (_SYSInt2*) &srcXY, (_SYSInt2*) &size);
239 unsigned lineAddr = addr;
246 _SYS_image_BG2Draw(&sys, font, addr, c - firstChar);