9 # error This is a userspace-only header, not allowed by the current build.
12 #include <sifteo/abi.h>
36 template <_SYSVectorID tID>
48 _SYS_setVector(tID, 0, 0);
63 template <
typename tContext>
65 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
80 void set(void (*
handler)(
void*, unsigned))
const {
81 _SYS_setVector(tID, (
void*)
handler, 0);
88 template <
typename tClass>
89 void set(void (tClass::*
handler)(unsigned), tClass *cls)
const {
92 void (tClass::*pMethod)(unsigned);
95 _SYS_setVector(tID, u.pVoid, (
void*) cls);
102 return _SYS_getVectorHandler(tID);
109 return _SYS_getVectorContext(tID);
125 template <_SYSVectorID tID>
137 _SYS_setVector(tID, 0, 0);
148 template <
typename tContext>
150 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
161 _SYS_setVector(tID, (
void*)
handler, 0);
168 template <
typename tClass>
169 void set(void (tClass::*
handler)(), tClass *cls)
const {
172 void (tClass::*pMethod)();
175 _SYS_setVector(tID, u.pVoid, (
void*) cls);
182 return _SYS_getVectorHandler(tID);
189 return _SYS_getVectorContext(tID);
210 _SYS_setGameMenuLabel(0);
211 _SYS_setVector(_SYS_BASE_GAME_MENU, 0, 0);
225 template <
typename tContext>
226 void set(void (*
handler)(tContext), tContext
context,
const char *label=0)
const {
228 _SYS_setGameMenuLabel(label);
229 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, reinterpret_cast<void*>(context));
243 void set(void (*
handler)(
void*),
const char *label=0)
const {
245 _SYS_setGameMenuLabel(label);
246 _SYS_setVector(_SYS_BASE_GAME_MENU, (
void*)
handler, 0);
256 template <
typename tClass>
257 void set(void (tClass::*
handler)(), tClass *cls,
const char *label=0)
const {
260 void (tClass::*pMethod)();
264 _SYS_setGameMenuLabel(label);
265 _SYS_setVector(_SYS_BASE_GAME_MENU, u.pVoid, (
void*) cls);
272 return _SYS_getVectorHandler(_SYS_BASE_GAME_MENU);
279 return _SYS_getVectorContext(_SYS_BASE_GAME_MENU);
294 ASSERT(label && label[0]);
295 _SYS_setGameMenuLabel(label);
304 _SYS_setPauseMenuResumeEnabled(enabled);
316 template <_SYSVectorID tID>
328 _SYS_setVector(tID, 0, 0);
343 template <
typename tContext>
344 void set(void (*
handler)(tContext, unsigned, unsigned, unsigned, unsigned), tContext
context)
const {
345 _SYS_setVector(tID, (
void*)
handler, reinterpret_cast<void*>(context));
360 void set(void (*
handler)(
void*, unsigned, unsigned, unsigned, unsigned))
const {
361 _SYS_setVector(tID, (
void*)
handler, 0);
368 template <
typename tClass>
369 void set(void (tClass::*
handler)(unsigned, unsigned, unsigned, unsigned), tClass *cls)
const {
372 void (tClass::*pMethod)(unsigned, unsigned, unsigned, unsigned);
375 _SYS_setVector(tID, u.pVoid, (
void*) cls);
382 return _SYS_getVectorHandler(tID);
389 return _SYS_getVectorContext(tID);