12 panel->
scale.vz = ONE;
13 panel->
scale.vy = ONE;
59 switch (panel->
state) {
74 if (panel->
rate == 0) {
78 if (panel->
scale.vx > 0xF33) {
79 panel->
scale.vx = 0xF33;
83 if (panel->
rate == 0) {
87 if (panel->
scale.vx > ONE) {
88 panel->
scale.vx = ONE;
93 if (panel->
scale.vx == 0) {
98 RotMatrixYXZ_gte(&panel->
rot, &panel->
matrix);
103 poly->r0 = panel->
top.r;
104 poly->g0 = panel->
top.g;
105 poly->b0 = panel->
top.b;
106 poly->r1 = panel->
bottom.r;
107 poly->g1 = panel->
bottom.g;
108 poly->b1 = panel->
bottom.b;
109 poly->r2 = panel->
top.r;
110 poly->g2 = panel->
top.g;
111 poly->b2 = panel->
top.b;
112 poly->r3 = panel->
bottom.r;
113 poly->g3 = panel->
bottom.g;
114 poly->b3 = panel->
bottom.b;
115 in[0].vx = in[2].vx = panel->
x - panel->
pivotX;
116 in[1].vx = in[3].vx = in[0].vx + panel->
w;
117 in[0].vy = in[1].vy = panel->
y - panel->
pivotY;
118 in[2].vy = in[3].vy = in[0].vy + panel->
h;
119 in[0].vz = in[1].vz = in[2].vz = in[3].vz = 0;
120 for (i = 0; i < 4; i++) {
121 ApplyMatrixSV(&panel->
matrix, &in[i], &out[i]);
122 out[i].vx += panel->
pivotX;
123 out[i].vy += panel->
pivotY;
125 poly->x0 = out[0].vx;
126 poly->y0 = out[0].vy;
127 poly->x1 = out[1].vx;
128 poly->y1 = out[1].vy;
129 poly->x2 = out[2].vx;
130 poly->y2 = out[2].vy;
131 poly->x3 = out[3].vx;
132 poly->y3 = out[2].vy;
GfxState GFX
GFX: the graphics state and its methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
FileCache FILE_CACHE
The file cache.
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
STGMCARD.PRO: the memory card screen (MODE_CONTINUE).
#define FILE_GMCARD_SHEET
MemCardPanel * STGMCARD_createPanel(s32 x, s32 y, s32 w, s32 h)
Creates a gradient panel (task) at x, y, w by h, empty until started.
void STGMCARD_setPanelBottomColor(MemCardPanel *panel, u8 r, u8 g, u8 b)
Sets the color of the panel's gradient at its bottom (panel->setBottomColor)
void STGMCARD_updatePanel(MemCardPanel *panel)
The panel's task: opens it by scaling it horizontally, then draws it as a gradient with a sprite.
void STGMCARD_setPanelPos(MemCardPanel *panel, s32 x, s32 y)
Moves the panel (panel->setPos)
void STGMCARD_setPanelTopColor(MemCardPanel *panel, u8 r, u8 g, u8 b)
Sets the color of the panel's gradient at its top (panel->setTopColor)
void STGMCARD_resetPanel(MemCardPanel *panel)
Empties the panel and stops it (panel->reset)
void STGMCARD_startPanel(MemCardPanel *panel, s32 substate, s32 duration)
Starts the panel (panel->start): substate 1 opens it to 95% over duration frames while a card operati...
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
void *(* getEntry)(u32 fileAndIndex)
struct Layer *(* getLayer)(s32 id)
void(* setPrim)(void *next)
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
u_long *(* getOtEntry)(struct Layer *, s32 depth)
A gradient panel that opens by scaling (STGMCARD_updatePanel)
void(* nextState)(struct MemCardPanel *task)
void(* setPos)(struct MemCardPanel *panel, s32 x, s32 y)
void(* setBottomColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b)
void(* start)(struct MemCardPanel *panel, s32 substate, s32 duration)
void(* reset)(struct MemCardPanel *panel)
void(* setTopColor)(struct MemCardPanel *panel, u8 r, u8 g, u8 b)
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
void(* setLayerId)()
(id, depth)
void(* draw)()
(sheet, frame, x, y)
void(* setTexture)()
(x, y)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find