Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
screen.c
Go to the documentation of this file.
1/* The deck screen: the three decks and the options to edit or rename one; the
2 files it loads; and the panels' openings and moves */
3
5
6/* The title, each deck's name and six counts, the two options and the
7 cursor, then every window from the title on takes the cursor's depth */
9 s32 i;
10 s32 j;
11 s32 y;
12 TextWindow **windows;
13
14 children->title = createTextWindow(task->layer, 1, 0x97, 0x22);
15 for (i = 0; i < 3; i++) {
16 /* the match depends on y: with i * 0x2D written in both calls, the
17 options loop's counter takes s2 instead of the other loops' s3 */
18 y = i * 0x2D;
19 children->rows[i].name = createTextWindow(task->layer, 1, 0x1C, 0x53 + y);
20 for (j = 0; j < 6; j++) {
21 children->rows[i].counts[j] = createTextWindow(task->layer, 1, 0x3B + j * 0x23, 0x64 + y);
22 }
23 }
24 for (i = 0; i < 2; i++) {
25 children->options[i] = createTextWindow(task->layer, 1, 0xA7, 0x23 + i * 0xE);
26 }
27 children->cursor = createCursor(task->layer, task->depth - 2, 0x9A, 0x23);
28 children->cursor->setVisible(children->cursor, 0);
29 windows = &children->title;
30 for (i = 0; i < task->childCount - 3; i++, windows++) {
31 (*windows)->setDepth(*windows, task->depth - 2);
32 }
33}
34
35/* Shows a deck's row: its name and how many cards of each kind it has, or hides it */
36void STCRDDEK_showDeckRow(DeckScreen *task, DeckScreenChildren *children, s32 deck, s32 show) {
37 s32 i;
38
39 if (show != 0) {
40 children->rows[deck].name->setString(children->rows[deck].name, GAME.decks[deck].name, -1);
41 for (i = 0; i < 6; i++) {
42 children->rows[deck].counts[i]->setNumber(children->rows[deck].counts[i], 0, task->kinds[deck][i]);
43 children->rows[deck].counts[i]->setRightAlign(children->rows[deck].counts[i], 1);
44 }
45 } else {
46 children->rows[deck].name->setVisible(children->rows[deck].name, 0);
47 for (i = 0; i < 6; i++) {
48 children->rows[deck].counts[i]->setVisible(children->rows[deck].counts[i], 0);
49 }
50 }
51}
52
53/* Draws the screen: the background scrolling diagonally, the title panel, the
54 decks' rows, the options' panel and the frame on the deck under the cursor
55 (glowing until it is chosen), as they open */
57 SpriteDrawer sprite;
58 s32 i;
59
60 initSpriteDrawer(&sprite);
61 sprite.setLayerId(task->layer, task->depth);
62 sprite.setTexture(0x280, 0);
63 if (task->tick) {
64 task->scroll = ++task->scroll < 96 ? task->scroll : 0;
65 task->tick = 0;
66 } else {
67 task->tick = 1;
68 }
69 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 8, task->scroll, task->scroll);
70 sprite.setLayerId(task->layer, task->depth - 1);
71 if (task->panels[0].level != 0) {
72 if (task->panels[0].level != ONE) {
73 sprite.setScale(task->panels[0].level, ONE, ONE);
74 sprite.setPivot(0x140, 0x22);
75 }
76 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 0x30, 0x7B, 0x1C);
77 }
78 for (i = 0; i < 3; i++) {
79 if (task->rowPanels[i].level != 0) {
80 sprite.setScale(task->rowPanels[i].level, ONE, ONE);
81 if (task->rowPanels[i].level != ONE) {
82 sprite.setPivot(0x17, 0x63 + i * 0x2D);
83 }
84 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 0x41, 0x17, 0x50 + i * 0x2D);
85 }
86 }
87 if (task->panels[1].level != 0) {
88 sprite.setScale(task->panels[1].level, ONE, ONE);
89 if (task->panels[1].level != ONE) {
90 sprite.setPivot(0x140, 0x37);
91 }
92 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 0x2D, 0x92, 0x1C);
93 }
94 if (task->panels[2].level != 0) {
95 sprite.setLayerId(task->layer, task->depth - 2);
96 sprite.setScale(ONE, task->panels[2].level, ONE);
97 if (task->panels[2].level != ONE) {
98 sprite.setPivot(0x17, task->deck * 0x2D + 0x63);
99 }
100 if (task->chosen == 0) {
101 if (GFX.funcs.getTime() - task->cursorTime >= 5) {
102 task->cursorTime = GFX.funcs.getTime();
103 if (++task->cursorFrame >= 16) {
104 task->cursorFrame = 0;
105 }
106 }
107 sprite.setClutRow(task->cursorFrame);
108 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 0x42, 0x17, task->deck * 0x2D + 0x50);
109 } else {
110 sprite.draw(FILE_CACHE.getEntry(STCRDDEK_SPRITES), 0x44, 0x17, task->deck * 0x2D + 0x50);
111 }
112 }
113}
114
115/* Counts how many cards of each kind (their color) each of the three decks has */
117 CardDrawer card;
118 s32 d;
119 s32 i;
120
121 initCardDrawer(&card);
122 for (d = 0; d < 3; d++) {
123 for (i = 0; i < 6; i++) {
124 task->kinds[d][i] = 0;
125 }
126 for (i = 0; i < 40; i++) {
127 card.setCard(GAME.decks[d].cards[i]);
128 task->kinds[d][card.card->color - 1]++;
129 }
130 }
131}
132
133/* Up/down choose one of the three decks; cross offers what to do with it,
134 triangle leaves the screen */
135static inline void STCRDDEK_chooseDeck(DeckScreen *task, DeckScreenChildren *children) {
136 s32 prevDeck;
137
138 prevDeck = task->deck;
140 if (--task->deck < 0) {
141 task->deck = 0;
142 }
143 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
144 if (++task->deck >= 3) {
145 task->deck = 2;
146 }
147 }
148 if (prevDeck != task->deck) {
150 } else if (PAD_PRESSED(PAD_CROSS)) {
152 task->substate = 10;
153 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
155 task->setSubstate(task, 100);
156 }
157}
158
159/* Once the options' panel has opened: shows edit folder and change name, the
160 cursor on edit */
161static inline void STCRDDEK_openDeckOptions(DeckScreen *task, DeckScreenChildren *children) {
162 if (STCRDDEK_funcs.updateFade(&task->panels[1])) {
163 task->renaming = 0;
164 children->cursor->setPos(children->cursor, 0x9A, 0x23);
165 children->cursor->setVisible(children->cursor, 1);
166 children->options[0]->setString(children->options[0], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0x1A);
167 children->options[1]->setString(children->options[1], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0x1B);
168 task->substate++;
169 }
170}
171
172/* Up/down choose to edit the deck or to rename it; cross closes the decks'
173 rows to open it, triangle goes back to the decks */
174static inline void STCRDDEK_chooseDeckOption(DeckScreen *task, DeckScreenChildren *children) {
175 s32 prevChoice;
176
177 prevChoice = task->renaming;
178 if (PAD_PRESSED(PAD_UP)) {
179 task->renaming = 0;
180 } else if (PAD_PRESSED(PAD_DOWN)) {
181 task->renaming = 1;
182 }
183 if (prevChoice != task->renaming) {
185 children->cursor->setPos(children->cursor, 0x9A, task->renaming * 14 + 0x23);
186 } else if (PAD_PRESSED(PAD_CROSS)) {
188 task->setSubstate(task, 50);
189 task->step = 1;
190 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
192 task->substate = 15;
193 }
194}
195
196/* Closes the decks' rows, from the last, to open the editor or the name entry
197 (step set): the cursor stays frozen on the chosen option */
198static inline void STCRDDEK_startClosingRows(DeckScreen *task, DeckScreenChildren *children) {
199 if (task->step) {
200 children->cursor->setStill(children->cursor, 1);
201 children->cursor->setPalette(children->cursor, PALETTE_GREY);
202 }
203 STCRDDEK_funcs.startFade(&task->panels[2], 0);
204 STCRDDEK_funcs.startFade(&task->rowPanels[2], 0);
205 STCRDDEK_showDeckRow(task, children, 2, 0);
206 task->substate++;
207}
208
209/* Once the second deck's row has closed: hides the options (the title, step
210 unset) and closes the first deck's row */
211static inline void STCRDDEK_closeFirstRow(DeckScreen *task, DeckScreenChildren *children) {
212 if (STCRDDEK_funcs.updateFade(&task->rowPanels[1])) {
213 if (task->step) {
214 children->cursor->setStill(children->cursor, 0);
215 children->cursor->setPalette(children->cursor, PALETTE_WHITE);
216 children->cursor->setVisible(children->cursor, 0);
217 children->options[0]->setVisible(children->options[0], 0);
218 children->options[1]->setVisible(children->options[1], 0);
219 STCRDDEK_funcs.startFade(&task->panels[1], 0);
220 } else {
221 children->title->setVisible(children->title, 0);
222 STCRDDEK_funcs.startFade(&task->panels[0], 0);
223 }
224 STCRDDEK_funcs.startFade(&task->rowPanels[0], 0);
225 STCRDDEK_showDeckRow(task, children, 0, 0);
226 task->substate++;
227 }
228}
229
230/* Once the rows have closed: opens the editor or the name entry for the chosen
231 deck and waits for it; after the fade out of triangle (step unset), ends
232 the screen */
233static inline void STCRDDEK_openChosen(DeckScreen *task, DeckScreenChildren *children) {
234 if (task->step) {
235 if (task->renaming == 0) {
236 children->child.editor = STCRDDEK_createEditor(task, task->deck);
237 } else {
239 }
240 task->setState(task, TASK_DONE);
241 } else {
242 task->state = TASK_KILL;
243 }
244}
245
246/* The screen's states: opens the title and the decks' rows; cross on a deck
247 offers to edit or rename it, closing the rows to open the editor or the
248 name entry; triangle fades the screen out to leave */
250 ScreenFade *fader;
251
252 switch (task->substate) {
253 case 0:
254 default:
256 STCRDDEK_funcs.startFade(&task->panels[0], 1);
257 STCRDDEK_funcs.startFade(&task->rowPanels[0], 1);
258 task->chosen = 0;
259 task->substate++;
260 break;
261 case 1:
263 if (STCRDDEK_funcs.updateFade(&task->rowPanels[0])) {
264 children->title->setString(children->title, FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0x19);
265 STCRDDEK_showDeckRow(task, children, 0, 1);
266 STCRDDEK_funcs.startFade(&task->rowPanels[1], 1);
267 task->substate++;
268 }
269 break;
270 case 2:
271 if (STCRDDEK_funcs.updateFade(&task->rowPanels[1])) {
272 STCRDDEK_showDeckRow(task, children, 1, 1);
273 STCRDDEK_funcs.startFade(&task->rowPanels[2], 1);
274 STCRDDEK_funcs.startFade(&task->panels[2], 1);
275 task->substate++;
276 }
277 break;
278 case 3:
280 if (STCRDDEK_funcs.updateFade(&task->rowPanels[2])) {
281 STCRDDEK_showDeckRow(task, children, 2, 1);
282 task->substate++;
283 }
284 break;
285 case 4:
286 STCRDDEK_chooseDeck(task, children);
287 break;
288 case 10:
289 task->chosen = 1;
290 children->title->setVisible(children->title, 0);
291 STCRDDEK_funcs.startFade(&task->panels[0], 0);
292 task->substate++;
293 break;
294 case 11:
295 if (STCRDDEK_funcs.updateFade(&task->panels[0])) {
296 children->title->setVisible(children->title, 0);
297 STCRDDEK_funcs.startFade(&task->panels[1], 1);
298 task->substate++;
299 }
300 break;
301 case 12:
302 STCRDDEK_openDeckOptions(task, children);
303 break;
304 case 13:
305 STCRDDEK_chooseDeckOption(task, children);
306 break;
307 case 15:
308 children->cursor->setVisible(children->cursor, 0);
309 children->options[0]->setVisible(children->options[0], 0);
310 children->options[1]->setVisible(children->options[1], 0);
311 STCRDDEK_funcs.startFade(&task->panels[1], 0);
312 task->substate++;
313 break;
314 case 16:
315 if (STCRDDEK_funcs.updateFade(&task->panels[1])) {
316 STCRDDEK_funcs.startFade(&task->panels[0], 1);
317 task->substate++;
318 }
319 break;
320 case 17:
321 if (STCRDDEK_funcs.updateFade(&task->panels[0])) {
322 children->title->setString(children->title, FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0x19);
323 task->chosen = 0;
324 task->setSubstate(task, 4);
325 }
326 break;
327 case 50:
328 STCRDDEK_startClosingRows(task, children);
329 break;
330 case 51:
332 if (STCRDDEK_funcs.updateFade(&task->rowPanels[2])) {
333 STCRDDEK_funcs.startFade(&task->rowPanels[1], 0);
334 STCRDDEK_showDeckRow(task, children, 1, 0);
335 task->substate++;
336 }
337 break;
338 case 52:
339 STCRDDEK_closeFirstRow(task, children);
340 break;
341 case 53:
342 if (task->step) {
344 } else {
346 }
347 if (STCRDDEK_funcs.updateFade(&task->rowPanels[0])) {
348 task->substate++;
349 }
350 break;
351 case 54:
352 STCRDDEK_openChosen(task, children);
353 break;
354 case 100:
355 children->fader = fader = STCRDDEK_createFader();
356 fader->start(fader, 0, 10);
357 task->substate++;
358 break;
359 case 101:
360 if (children->fader->state == TASK_DONE) {
361 task->substate = 54;
362 }
363 break;
364 }
365}
366
367/* The screen's task: loads its files and creates its windows, then runs it;
368 waits for the editor or the name entry (saving the deck's new name), then
369 opens again; returns to the previous mode when it ends */
371 switch (task->state) {
372 case TASK_INIT:
373 default:
374 switch (task->substate) {
375 case 0:
376 default:
378 task->substate++;
379 break;
380 case 1:
381 if (STCRDDEK_funcs.filesLoading() == 0) {
382 STCRDDEK_createScreenWindows(task, children);
383 task->panels[0].duration = 10;
384 task->rowPanels[0].duration = 10;
385 task->rowPanels[1].duration = 10;
386 task->rowPanels[2].duration = 10;
387 task->panels[1].duration = 10;
388 task->panels[2].duration = 10;
389 task->nextState(task);
390 }
391 break;
392 }
393 break;
394 case TASK_RUN:
395 STCRDDEK_stepScreen(task, children);
397 break;
398 case TASK_DONE:
399 if (task->renaming != 0) {
400 switch (task->substate) {
401 case 0:
402 default:
403 if (children->child.name->substate == 100) {
404 children->child.name->getName(children->child.name, GAME.decks[task->deck].name);
405 children->child.name->close(children->child.name);
406 task->substate++;
407 }
408 break;
409 case 1:
410 if (children->child.name->state == TASK_DONE) {
411 children->child.name->state = TASK_KILL;
412 task->setState(task, TASK_RUN);
413 }
414 break;
415 }
416 } else if (children->child.editor == NULL) {
417 task->setState(task, TASK_RUN);
418 }
420 break;
421 case TASK_KILL:
423 break;
424 }
425}
426
427/* Creates the deck screen (task) */
430
432 task->layer = SCREEN_LAYER;
433 task->depth = 7;
434 return task;
435}
436
437/* Loads the screen's textures and requests the card images, the card texts and
438 the keyboard */
456
457/* Whether the texts or the keyboard are still loading (the card images aren't waited for) */
460 return 1;
461 }
463 return 1;
464 }
466 return 1;
467 }
469 return 1;
470 }
472}
473
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
NameEntry * STCRDDEK_createNameEntry(char *text)
Creates the name entry (task) to rename a deck, starting from its name: up to 10 characters.
Definition name_entry.c:20
void STCRDDEK_updateScreen(DeckScreen *task, DeckScreenChildren *children)
The screen's task: loads its files and creates its windows, then runs it; waits for the editor or the...
Definition screen.c:370
static void STCRDDEK_startClosingRows(DeckScreen *task, DeckScreenChildren *children)
Closes the decks' rows, from the last, to open the editor or the name entry (step set): the cursor st...
Definition screen.c:198
s32 STCRDDEK_filesLoading(void)
Whether the texts or the keyboard are still loading (the card images aren't waited for)
Definition screen.c:458
static void STCRDDEK_chooseDeckOption(DeckScreen *task, DeckScreenChildren *children)
Up/down choose to edit the deck or to rename it; cross closes the decks' rows to open it,...
Definition screen.c:174
static void STCRDDEK_closeFirstRow(DeckScreen *task, DeckScreenChildren *children)
Once the second deck's row has closed: hides the options (the title, step unset) and closes the first...
Definition screen.c:211
static void STCRDDEK_chooseDeck(DeckScreen *task, DeckScreenChildren *children)
Up/down choose one of the three decks; cross offers what to do with it, triangle leaves the screen.
Definition screen.c:135
void STCRDDEK_createScreenWindows(DeckScreen *task, DeckScreenChildren *children)
The title, each deck's name and six counts, the two options and the cursor, then every window from th...
Definition screen.c:8
void STCRDDEK_countCardKinds(DeckScreen *task)
Counts how many cards of each kind (their color) each of the three decks has.
Definition screen.c:116
void STCRDDEK_stepScreen(DeckScreen *task, DeckScreenChildren *children)
The screen's states: opens the title and the decks' rows; cross on a deck offers to edit or rename it...
Definition screen.c:249
DeckScreen * STCRDDEK_createScreen(void)
Creates the deck screen (task)
Definition screen.c:428
static void STCRDDEK_openChosen(DeckScreen *task, DeckScreenChildren *children)
Once the rows have closed: opens the editor or the name entry for the chosen deck and waits for it; a...
Definition screen.c:233
static void STCRDDEK_openDeckOptions(DeckScreen *task, DeckScreenChildren *children)
Once the options' panel has opened: shows edit folder and change name, the cursor on edit.
Definition screen.c:161
void STCRDDEK_drawScreen(DeckScreen *task)
Draws the screen: the background scrolling diagonally, the title panel, the decks' rows,...
Definition screen.c:56
void STCRDDEK_showDeckRow(DeckScreen *task, DeckScreenChildren *children, s32 deck, s32 show)
Shows a deck's row: its name and how many cards of each kind it has, or hides it.
Definition screen.c:36
void STCRDDEK_loadFiles(void)
Loads the screen's textures and requests the card images, the card texts and the keyboard.
Definition screen.c:439
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
STCRDDEK: the deck editor, where the player builds the three decks from the cards they own and rename...
#define STCRDDEK_IMAGES
TIM archive.
Definition deck_editor.h:35
#define STCRDDEK_FILE_KEYBOARD
Definition deck_editor.h:31
ScreenFade * STCRDDEK_createFader(void)
#define STCRDDEK_SPRITES
sprite bank
Definition deck_editor.h:34
#define STCRDDEK_FILE_CARDS
Definition deck_editor.h:30
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
DeckEditor * STCRDDEK_createEditor(DeckScreen *screen, s32 deck)
Creates the editor (task) of one of GAME.decks.
Definition editor.c:785
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
Cursor * createCursor(s16 layerId, s32 depth, s16 x, s16 y)
A menu cursor on a layer at (x, y)
Definition cursor.c:92
#define TEXT_CARD_SHOP
CRDSHP: STCRDSHP's, and STCRDDEK's.
Definition file.h:207
#define TEXT_NAME_ENTRY
NAMEDT: the keyboard's.
Definition file.h:219
#define TEXT_CARD_NAMES
CARDNM.
Definition file.h:203
#define TEXT_CARD_EFFECTS
CARDST.
Definition file.h:204
#define TEXT_FILE(file)
Definition file.h:190
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
Definition gfx.h:45
#define PAD_CROSS
Definition pad.h:31
#define PAD_DOWN
Definition pad.h:24
#define PAD_TRIANGLE
Definition pad.h:32
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
Definition pad.h:140
#define PAD_UP
Definition pad.h:22
#define PAD_REPEATED(button)
Definition pad.h:141
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
Definition sound.c:180
#define SOUND_MENU_CONFIRM
SYSTEM07.
Definition sound.h:44
#define SOUND_SELECT
Sounds the overlays share, with SOUNDTST's names.
Definition sound.h:38
#define SOUND_MENU_CANCEL
SYSTEM01.
Definition sound.h:39
#define SOUND_MENU_MOVE
SYSTEM06.
Definition sound.h:43
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
Definition sound.h:40
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
DeckFuncs STCRDDEK_funcs
Definition stcrddek.c:781
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
Definition gfx.h:193
void(* setCard)()
(id)
Definition gfx.h:205
CardImage * card
Definition gfx.h:194
u8 color
from 1
Definition gfx.h:173
void(* setPalette)()
Definition text.h:35
void(* setPos)()
(cursor, x, y)
Definition text.h:34
void(* setStill)()
Definition text.h:38
void(* setVisible)()
(cursor, visible)
Definition text.h:33
void(* loadFiles)(void)
Definition deck_editor.h:40
s32(* filesLoading)(void)
Definition deck_editor.h:41
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition deck_editor.h:42
s32(* updateFade)(PanelAnim *fade)
Definition deck_editor.h:43
TextWindow * name
TextWindow * counts[6]
TextWindow * title
NameEntry * name
renaming
DeckEditor * editor
ScreenFade * fader
union DeckScreenChildren::@8 child
NULL once it is gone.
TextWindow * options[2]
The screen's controller: the three decks to choose from.
void(* nextState)(struct DeckScreen *task)
s32 kinds[3][6]
how many cards of each kind a deck has
s32 deck
under the cursor
void(* setState)(struct DeckScreen *task, s32 state)
void(* countKinds)(struct DeckScreen *task)
STCRDDEK_countCardKinds.
PanelAnim rowPanels[3]
PanelAnim panels[3]
s32 scroll
of the background
void(* setSubstate)(struct DeckScreen *task, s32 substate)
char name[0x16]
Definition game_state.h:274
s16 cards[40]
Definition game_state.h:275
void *(* load)(u32 file)
Definition file.h:92
s32(* isLoading)(s32 file)
Definition file.h:88
void(* request)(s32 file)
Definition file.h:90
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
s32(* getModeArg)()
Definition game_state.h:20
void(* requestMode)(s32 mode, s32 arg)
Definition game_state.h:21
s32(* getPrevMode)()
Definition game_state.h:23
Deck decks[3]
Definition game_state.h:516
GameFuncs funcs
Definition game_state.h:582
s32(* getTime)(void)
Definition gfx.h:31
GfxFuncs funcs
Definition gfx.h:77
void(* close)(NameEntry *task)
Definition name_entry.h:129
s32 substate
Definition name_entry.h:96
void(* getName)(NameEntry *task, char *out)
Definition name_entry.h:125
s32 level
Definition menu.h:21
s32 duration
Definition menu.h:19
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
void(* start)(struct ScreenFade *fade, s32 fadeIn, s32 frames)
TASK_DONE when done.
Definition gfx.h:368
s32 state
Definition gfx.h:362
short(* playSound)(s32 id)
returns the voice of a key-on
Definition sound.h:187
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
Definition gfx.h:223
void(* setPivot)()
(x, y)
Definition gfx.h:250
void(* setScale)()
(x, y, z), ONE = 1.0
Definition gfx.h:248
void(* setLayerId)()
(id, depth)
Definition gfx.h:244
void(* setClutRow)()
(row)
Definition gfx.h:247
void(* draw)()
(sheet, frame, x, y)
Definition gfx.h:246
void(* setTexture)()
(x, y)
Definition gfx.h:242
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
void(* setDepth)()
Definition text.h:183
void(* setRightAlign)()
no prototype: callers would truncate u8 args
Definition text.h:178
void(* setNumber)()
Definition text.h:166
void(* setString)()
Definition text.h:165
void(* setVisible)(struct TextWindow *obj, u8 arg)
Definition text.h:177
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
Definition gfx.h:325
void(* setImagePos)()
(x, y)
Definition gfx.h:336
void(* loadArchive)()
(archive): each image 64 halfwords to the right
Definition gfx.h:338
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
#define PALETTE_WHITE
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs,...
Definition text.h:112
#define PALETTE_GREY
what is unavailable
Definition text.h:119
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.
Definition tim_loader.c:119