43 switch (task->
state) {
50 (*win)->setVisible(*win, task->
visible);
51 (*win)->setDepth(*win, task->
depth);
56 if (task->
dirty != 0) {
57 (*win)->setVisible(*win, task->
visible);
58 (*win)->setPos(*win, task->
x, task->
y);
59 (*win)->setPalette(*win, task->
palette);
63 if (task->
still != 0) {
64 if (task->
frame != 0) {
77 if (++task->
frame >= 5) {
GfxState GFX
GFX: the graphics state and its methods.
char * CURSOR_FRAMES[5]
The cursor's frames, the last one repeated as it swings back.
void cursorSetVisible(Cursor *task, s32 visible)
Cursor method: shows it (from its first frame) or hides it.
static char CURSOR_TEXT_0[4]
void cursorSetPos(Cursor *task, s32 x, s32 y)
Cursor method: moves it.
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
void updateCursor(Cursor *task, TextWindow **win)
The cursor task: creates its text window, then swings it every idleDelay vsyncs.
static char CURSOR_TEXT_3[4]
The cursor's frames as text, each the code of one of its glyphs in the font.
void cursorSetFrameDelay(Cursor *task, s32 delay)
Cursor method: the vsyncs of each frame of a swing.
void cursorSetPalette(Cursor *task, s32 palette)
Cursor method: the CLUT row of its glyph.
void cursorSetStill(Cursor *task, s32 still)
Cursor method: keeps it on its first frame.
static char CURSOR_TEXT_2[4]
void cursorSetIdleDelay(Cursor *task, s32 delay)
Cursor method: the vsyncs it rests between two swings.
static char CURSOR_TEXT_1[4]
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
void(* nextState)(struct Cursor *task)
void(* setPos)()
(cursor, x, y)
void(* setVisible)()
(cursor, visible)
s32 palette
PALETTE_*, its text window's.
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)