Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
screen.h
Go to the documentation of this file.
1#ifndef CARDGAME_SCREEN_H
2#define CARDGAME_SCREEN_H
3
4/* CARDGAME's battle screen: its task, panels, card sprites, blinkers,
5 gauges, numbers and windows, the fader, the preloader and the scene
6 (screen.c, panels.c, sprites.c, windows.c, message_window.c, fader.c,
7 preloader.c and scene.c). */
8
10
11/* CARDGAME's own pictures, a TIM archive */
12#if VERSION_US || VERSION_JP
13#define FILE_CARDGAME_TIMS 0x24E
14#elif VERSION_EU
15#define FILE_CARDGAME_TIMS 0x25D
16#endif
17
18/* A file CARDGAME_tickPreloader reads; a text file is in each language */
19typedef struct CardFileEntry {
20 /* 0x0 */ s16 file; /* -2: the files before are enough to start, -1: the end */
21 /* 0x2 */ s16 isText;
23
24/* Reads CARDGAME's files into the file cache, one at a time */
25typedef struct CardPreloader {
27 /* 0x50 */ s32 ready; /* the files before the first -2 are in */
28 /* 0x54 */ s16 index;
29 /* 0x56 */ s16 file;
31
32/* Fades the screen to a colour: a POLY_F4 over it, blended (blend is the
33 semi-transparency rate) */
34typedef struct CardFader {
36 /* 0x50 */ s32 mode; /* 0 idle, 1 fading, 2 done: the task ends */
37 /* 0x54 */ s32 time; /* left */
38 /* 0x58 */ s32 duration;
39 /* 0x5C */ u8 blend;
40 /* 0x5D */ u8 killWhenDone;
41 /* 0x5E */ u8 target[3];
42 /* 0x61 */ u8 from[3];
43 /* 0x64 */ u8 color[3];
44 /* 0x68 */ void (*setColor)(struct CardFader *fader, u8 r, u8 g, u8 b);
45 /* 0x6C */ void (*start)(struct CardFader *fader, u8 r, u8 g, u8 b, s32 frames, s32 killWhenDone);
46 /* 0x70 */ s32 (*isDone)(struct CardFader *fader);
47 /* 0x74 */ void (*kill)(struct CardFader *fader);
48} CardFader;
49
50/* A fade colour and blend mode (CardBattle.fade - 1 picks one) */
51typedef struct CardFadeColor {
52 /* 0x0 */ u8 r;
53 /* 0x1 */ u8 g;
54 /* 0x2 */ u8 b;
55 /* 0x3 */ u8 blend;
57
58/* An offset from a window's corner */
59typedef struct CardOffset {
60 /* 0x0 */ s16 x;
61 /* 0x2 */ s16 y;
63
64/* How each of the six CardWindow windows is drawn */
65typedef struct CardWindowLayout {
66 /* 0x0 */ s16 x; /* its pivot, from the window's corner */
67 /* 0x2 */ s16 y;
68 /* 0x4 */ u8 sprite;
69 /* 0x5 */ u8 kind; /* 2: a sprite of the fourth TIM, else of the third */
71
72/* A number drawn with the TIM archive's digits (CARDGAME_drawNumber) */
73typedef struct CardNumber {
74 /* 0x00 */ s16 value;
75 /* 0x02 */ s16 x;
76 /* 0x04 */ s16 y;
77 /* 0x06 */ s16 scaleX;
78 /* 0x08 */ s16 scaleY;
79 /* 0x0A */ s16 pivotX;
80 /* 0x0C */ s16 pivotY;
81 /* 0x0E */ u8 digits;
82 /* 0x0F */ u8 leadingZeros;
83 /* 0x10 */ u8 depth;
85
86/* The battle screen's task items */
87typedef struct CardScreenItems {
88 /* 0x00 */ Cursor *cursor;
89 /* 0x04 */ TextWindow *texts[3];
90 /* 0x10 */ TextWindow *panelTexts[2]; /* the label under each side's panel (CARDGAME_drawPanelIcon) */
91 /* 0x18 */ TextWindow *moreTexts[8];
93
94/* A panel's open (state 1) or close (state 3) scale, which goes over
95 `duration` frames */
96typedef struct CardPanelScale {
97 /* 0x00 */ s16 value;
98 /* 0x02 */ u8 pad2[2]; /* never read or written */
99 /* 0x04 */ s16 time;
100 /* 0x06 */ s16 duration;
101 /* 0x08 */ u8 state;
102 /* 0x09 */ u8 pad9[3]; /* never read or written: CardScreen.panels[2] are 0x54 bytes apart */
104
105/* Where CARDGAME_drawPanel draws the parts of a side's panel (CARDGAME_panelLayouts), relative to
106 CardPanel.x and y (or the box's, boxX and boxY) */
107typedef struct CardPanelLayout {
108 /* 0x00 */ u8 unk0; /* 1 in both layouts; nothing reads it */
109 /* 0x01 */ u8 frame; /* the panel's sprite */
110 /* 0x02 */ u8 winsSprite; /* plus CardPanel.wins: the sprite at winsX, winsY */
111 /* 0x03 */ u8 boxLabelSprite;
112 /* 0x04 */ CardOffset flagIcons; /* five, 0x2A apart */
113 /* 0x08 */ CardOffset flagNumbers; /* CardPanel.points, 0x2A apart */
116 /* 0x14 */ CardOffset discardCount; /* from the box */
117 /* 0x18 */ CardOffset apBar;
118 /* 0x1C */ CardOffset apTotal;
119 /* 0x20 */ CardOffset hpBar;
120 /* 0x24 */ CardOffset hpTotal;
123 /* 0x30 */ CardOffset boxLabel; /* from the box */
124 /* 0x34 */ CardOffset flagLights; /* five, 0x2A apart */
127 /* 0x40 */ CardOffset boxLight; /* from the box */
128 /* 0x44 */ CardOffset apLight;
129 /* 0x48 */ CardOffset hpLight;
131
132/* One side's panel on the battle screen (CardScreen.panels): 0 is the
133 player's, 1 the opponent's */
134typedef struct CardPanel {
135 /* 0x00 */ s16 time;
136 /* 0x02 */ s16 duration;
137 /* 0x04 */ s16 state;
138 /* 0x06 */ s16 event; /* for a frame, until CARDGAME_slidePanel clears it: 2 the panel started sliding in, 1 it slid out; nothing reads it */
139 /* 0x08 */ s32 blinkTime; /* a frame counter for the blinking (CARDGAME_drawPanel) */
140 /* 0x0C */ s16 x;
141 /* 0x0E */ s16 y;
142 /* 0x10 */ s16 apTotal; /* the values shown (CARDGAME_setPanelValue) */
143 /* 0x12 */ s16 hpTotal;
144 /* 0x14 */ u8 pad14[4]; /* never read or written */
145 /* 0x18 */ u8 points[5]; /* one per card colour */
146 /* 0x1D */ u8 deckCount;
147 /* 0x1E */ u8 handCount;
148 /* 0x20 */ s16 boxX; /* the discards' box, which slides on its own */
149 /* 0x22 */ s16 boxY;
150 /* 0x24 */ u8 pad24[4]; /* never read or written */
151 /* 0x28 */ s32 discardCount;
152 /* 0x2C */ u8 pad2C[4]; /* never read or written */
153 /* 0x30 */ u8 flags[10];
154 /* 0x3A */ u8 pad3A[2]; /* never read or written */
155 /* 0x3C */ s16 winsX; /* where the rounds won are shown */
156 /* 0x3E */ s16 winsY;
157 /* 0x40 */ u8 pad40[4]; /* never read or written */
158 /* 0x44 */ s32 wins; /* the rounds won shown */
160} CardPanel;
161
162/* A card on the battle screen (CardScreen.sprites) */
163typedef struct CardSprite {
164 /* 0x00 */ s32 x;
165 /* 0x04 */ s32 y;
166 /* 0x08 */ s32 targetX;
167 /* 0x0C */ s32 targetY;
168 /* 0x10 */ s32 startX;
169 /* 0x14 */ s32 startY;
170 /* 0x18 */ s16 scaleX;
171 /* 0x1A */ s16 scaleY;
172 /* 0x1C */ s16 targetScaleX;
173 /* 0x1E */ s16 targetScaleY;
174 /* 0x20 */ s16 startScaleX;
175 /* 0x22 */ s16 startScaleY;
176 /* 0x24 */ s16 slot;
177 /* 0x26 */ s16 moving;
178 /* 0x28 */ s32 time;
179 /* 0x2C */ s32 duration;
180 /* 0x30 */ s32 growTime; /* the frames it grows for before it flies (CARDGAME_flySprite) */
181 /* 0x34 */ s32 effectTime;
182 /* 0x38 */ s16 color; /* the card's colour, from 0 */
183 /* 0x3A */ s16 index; /* in the battle's card list */
184 /* 0x3C */ s16 isKind16;
185 /* 0x3E */ u8 marks[3]; /* the plays that apply to the card, drawn as marks */
186 /* 0x41 */ u8 points; /* the card's */
187 /* 0x42 */ u8 state;
188 /* 0x43 */ u8 ap; /* the values shown, which count towards the slot's */
189 /* 0x44 */ u8 hp;
190 /* 0x45 */ u8 visible;
191 /* 0x46 */ u8 order; /* a played card's place in the record, from 1 */
192 /* 0x47 */ u8 effect; /* 1-4, drawn by CARDGAME_drawSpriteEffect */
193 /* 0x48 */ u8 highlight; /* bit 0 the cursor, bit 1 picked, bit 2 glowing */
194 /* 0x49 */ u8 dimmed;
195} CardSprite;
196
197/* What CARDGAME_setPanelValue sets: 0-4 a colour's points, then these */
205
206/* A blinking marker on the battle screen (CardScreen.blinkers), which can
207 move to a target */
208typedef struct CardBlinker {
209 /* 0x00 */ s16 x;
210 /* 0x02 */ s16 y;
211 /* 0x04 */ s16 startX;
212 /* 0x06 */ s16 startY;
213 /* 0x08 */ s16 targetX;
214 /* 0x0A */ s16 targetY;
215 /* 0x0C */ s16 blinkTime;
216 /* 0x0E */ u8 time;
217 /* 0x0F */ u8 duration;
218 /* 0x10 */ u8 state;
220
221/* A value that goes from `from` to `to` (0x1000 is 1) over `duration` frames */
222typedef struct CardGauge {
223 /* 0x00 */ s16 from;
224 /* 0x02 */ s16 to;
225 /* 0x04 */ s16 time;
226 /* 0x06 */ s16 duration;
227 /* 0x08 */ s16 state;
228 /* 0x0A */ s16 value;
229} CardGauge;
230
231/* A window that opens (its scale goes from `from` to `to`) */
232typedef struct CardWindow {
233 /* 0x00 */ s16 x;
234 /* 0x02 */ s16 y;
235 /* 0x04 */ s16 from;
236 /* 0x06 */ s16 to;
237 /* 0x08 */ s16 time;
238 /* 0x0A */ s16 duration;
239 /* 0x0C */ s16 layout; /* in CARDGAME_windowLayouts */
240 /* 0x0E */ s16 showCount;
241 /* 0x10 */ s32 value; /* by its layout: a string, a card, or points | colour << 4 */
242 /* 0x14 */ u8 numbers[3]; /* two numbers, and whether they are shown */
243 /* 0x17 */ u8 state;
244} CardWindow;
245
246/* The battle screen's message window (CardScreen.message), which
247 CARDGAME_runBattleMenu keeps a copy of (CARDGAME_savedScreenState) */
248typedef struct CardMessageWindow {
249 /* 0x00 */ s32 place; /* in CARDGAME_messageWindowPositions */
250 /* 0x04 */ s32 message;
251 /* 0x08 */ s32 pad8; /* never read or written */
252 /* 0x0C */ s16 time;
253 /* 0x0E */ s16 duration;
254 /* 0x10 */ s16 choice; /* the cursor's row */
255 /* 0x12 */ s16 pad12[2]; /* never read or written */
256 /* 0x16 */ u8 state; /* 1 opening, 2 open, 4 confirmed, 5 closing */
257 /* 0x17 */ u8 prompt; /* what it asks: 0 nothing, else a choice with the cursor */
259
260/* The battle screen (created by CARDGAME_createScreen): the two panels, the cards on
261 the table and the windows. Its 14 task items are a cursor and 13 text
262 windows. */
263typedef struct CardScreen {
265 /* 0x050 */ s16 *cards; /* the battle's card list */
266 /* 0x054 */ s32 spriteFlags; /* this frame: bit 0 a sprite is animated, bit 1 a flying one landed */
267 /* 0x058 */ u32 time;
268 /* 0x05C */ s16 opponent; /* CardBattle.arg */
269 /* 0x05E */ s16 opponentLevel; /* CardBattle.opponentLevel */
270 /* 0x060 */ CardPanel panels[2];
271 /* 0x108 */ CardSprite sprites[40];
272 /* 0xCE8 */ CardBlinker blinkers[12];
273 /* 0xDC0 */ CardGauge gauges[3];
275 /* 0xDFC */ u8 padDFC[4]; /* never read or written */
276 /* 0xE00 */ s16 menuTime;
277 /* 0xE02 */ s16 menuDuration;
278 /* 0xE04 */ s16 menuRow;
279 /* 0xE06 */ u8 padE06[4]; /* never read or written */
280 /* 0xE0A */ s16 menuState;
281 /* 0xE0C */ CardWindow windows[6];
282 /* 0xE9C */ u8 fadeRow; /* the background's palette row, 0 to 11 */
283 /* 0xE9D */ u8 fadeTime; /* four frames a row */
284 /* 0xE9E */ u8 fadeState; /* 0 dark, 1 fading in, 2 shown */
285 /* 0xEA0 */ void (*setPanelValue)(struct CardScreen *screen, s32 side, u32 which, s32 value);
286 /* 0xEA4 */ void (*openGauge)(struct CardScreen *screen, s32 index, s16 value);
287 /* 0xEA8 */ void (*closeGauge)(struct CardScreen *screen, s32 index);
288 /* 0xEAC */ void (*openWindow)(struct CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y);
289 /* 0xEB0 */ void (*closeWindow)(struct CardScreen *screen, s32 index);
290 /* 0xEB4 */ void (*clearPanelFlags)(struct CardScreen *screen);
291 /* 0xEB8 */ void (*setPanelFlags)(struct CardScreen *screen, s32 bits);
292 /* 0xEBC */ void (*closePanel)(struct CardScreen *screen, s32 side);
293 /* 0xEC0 */ void (*openPanel)(struct CardScreen *screen, s32 side);
294 /* 0xEC4 */ void (*closePanels)(struct CardScreen *screen);
295 /* 0xEC8 */ void (*openPanels)(struct CardScreen *screen);
296 /* 0xECC */ void (*resetPanels)(struct CardScreen *screen);
297 /* 0xED0 */ void (*openPanelIcon)(struct CardScreen *screen, s32 side);
298 /* 0xED4 */ void (*closePanelIcon)(struct CardScreen *screen, s32 side);
299 /* 0xED8 */ s32 (*getHandOffset)(s32 count, s32 index);
300 /* 0xEDC */ s32 (*showBlinker)(struct CardScreen *screen, s32 index, s16 x, s16 y);
301 /* 0xEE0 */ s32 (*startBlinkerMove)(struct CardScreen *screen, s32 index, u8 duration, s16 x, s32 y);
302 /* 0xEE4 */ void (*openMessage)(struct CardScreen *screen, s32 message, s32 prompt, s16 choice, s32 place);
303 /* 0xEE8 */ void (*closeMessage)(struct CardScreen *screen);
304 /* 0xEEC */ void (*confirmMessage)(struct CardScreen *screen);
305 /* 0xEF0 */ void (*setMessageChoice)(struct CardScreen *screen, s32 choice);
306 /* 0xEF4 */ void (*openMenu)(struct CardScreen *screen, s16 row);
307 /* 0xEF8 */ void (*closeMenu)(struct CardScreen *screen);
308 /* 0xEFC */ void (*confirmMenu)(struct CardScreen *screen);
309 /* 0xF00 */ void (*setMenuRow)(struct CardScreen *screen, s16 row);
310 /* 0xF04 */ void (*dealSprites)(struct CardScreen *screen, s16 duration, s16 count, s32 x, s32 y);
311 /* 0xF08 */ void (*startMove)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
312 /* 0xF0C */ void (*startSlide)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
313 /* 0xF10 */ s32 (*startFly)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
314 /* 0xF14 */ s32 (*addSprite)(struct CardScreen *screen, s32 index, s32 x, s32 y);
315 /* 0xF18 */ s32 (*removeSprite)(struct CardScreen *screen, s32 index);
316 /* 0xF1C */ s32 (*startBlink)(struct CardScreen *screen, s32 index);
317 /* 0xF20 */ void (*setSpriteScale)(struct CardScreen *screen, s32 index, s32 scaleX, s32 scaleY);
318 /* 0xF24 */ void (*scaleSprite)(struct CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY);
319 /* 0xF28 */ s32 (*startFlip)(struct CardScreen *screen, s32 index);
320 /* 0xF2C */ s32 (*startJitter)(struct CardScreen *screen, s32 index);
321 /* 0xF30 */ s32 (*startShake)(struct CardScreen *screen, s32 index);
322 /* 0xF34 */ s32 (*startRecovery)(struct CardScreen *screen, s32 index);
323 /* 0xF38 */ s32 (*startEffect)(struct CardScreen *screen, s32 index, s32 which);
324 /* 0xF3C */ void (*setSpriteCard)(struct CardScreen *screen, s32 sprite, s32 index);
325 /* 0xF40 */ s32 (*getCardColor)(struct CardScreen *screen, s32 index);
326 /* 0xF44 */ s32 (*loadCardImages)(s16 *dst, s16 *player, s16 *opponent);
327} CardScreen;
328
329/* The functions and data the overlay's files share */
330extern RECT CARDGAME_screenRect;
331extern RECT CARDGAME_fadeRect;
333extern s16 CARDGAME_otherCards[]; /* the 100 cards whose images CARDGAME_loadCardImages loads after the decks (CARDGAME_getOtherCard) */
334extern s16 CARDGAME_commonCards[]; /* the cards everyone has, loaded after the two decks */
335extern CardOffset CARDGAME_gaugePositions[]; /* where the three CardGauge gauges are */
336extern u16 CARDGAME_windowTextOffsets[]; /* a window's text x, by CARDGAME_drawWindowText's index */
340void CARDGAME_updateWindow(CardScreen *screen, CardScreenItems *items, CardWindow *window, s32 index);
345void CARDGAME_moveBlinker(CardBlinker *blinker);
346void CARDGAME_drawBlinker(CardBlinker *blinker);
347void CARDGAME_drawPanelIcon(CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale);
348void CARDGAME_updatePanelIcon(CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale);
349void CARDGAME_slidePanel(CardPanel *panel, CardScreenItems *items, s32 side);
350void CARDGAME_drawPanel(CardPanel *panel, CardScreenItems *items, s32 side);
352void CARDGAME_drawSpriteMarks(CardScreen *screen, CardSprite *sprite);
353void CARDGAME_drawSpriteOrder(CardScreen *screen, CardSprite *sprite);
354void CARDGAME_drawSpriteEffect(CardScreen *screen, CardSprite *sprite);
355void CARDGAME_drawSpriteDim(CardScreen *screen, CardSprite *sprite);
356void CARDGAME_drawSpriteCard(CardScreen *screen, CardSprite *sprite);
357void CARDGAME_drawSpriteBlink(CardScreen *screen, CardSprite *sprite);
358void CARDGAME_animateSprite(CardScreen *screen, CardScreenItems *items, CardSprite *sprite);
359extern s16 CARDGAME_shakeOffsets[]; /* CARDGAME_shakeSprite's x offsets, by time */
360extern s16 CARDGAME_jitterOffsets[]; /* CARDGAME_jitterSprite's x and y offsets */
361
362/* The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep.id) */
363void CARDGAME_updateScene(Task *task, CardBattle **items);
364void CARDGAME_drawNumber(CardNumber *number, s32 scaled);
365void CARDGAME_drawGauge(CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p);
366void CARDGAME_updateGauge(CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p);
370void CARDGAME_drawWindowText(CardScreen *screen, CardWindow *window, TextWindow *text, s32 file, s32 index);
371void CARDGAME_drawCenteredText(CardScreen *screen, CardScreenItems *items, CardWindow *window, TextWindow *text, s32 file);
373void CARDGAME_drawMessageFrame(CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y);
374void CARDGAME_drawMessageMark(CardScreen *screen, CardScreenItems *items, s32 x, s32 y);
375void CARDGAME_drawMenuFrame(CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y);
376s32 CARDGAME_getHandOffset(s32 count, s32 index);
379s32 CARDGAME_holdSprite(CardScreen *screen, CardSprite *sprite, s32 duration);
382void CARDGAME_drawSprite(CardScreen *screen, CardSprite *sprite);
384void CARDGAME_openGauge(CardScreen *screen, s32 index, s16 value);
385void CARDGAME_closeGauge(CardScreen *screen, s32 index);
386void CARDGAME_openWindow(CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y);
387void CARDGAME_closeWindow(CardScreen *screen, s32 index);
388s32 CARDGAME_showBlinker(CardScreen *screen, s32 index, s16 x, s16 y);
389s32 CARDGAME_startBlinkerMove(CardScreen *screen, s32 index, u8 duration, s16 x, s32 y);
390void CARDGAME_openMessage(CardScreen *screen, s32 arg1, s32 arg2, s16 arg3, s32 arg4);
393void CARDGAME_setMessageChoice(CardScreen *screen, s32 value);
394void CARDGAME_openMenuWindow(CardScreen *screen, s16 value);
397void CARDGAME_setMenuWindowRow(CardScreen *screen, s16 value);
398void CARDGAME_resetPanels(CardScreen *screen);
399void CARDGAME_openPanels(CardScreen *screen);
400void CARDGAME_closePanels(CardScreen *screen);
401void CARDGAME_openPanel(CardScreen *screen, s32 side);
402void CARDGAME_closePanel(CardScreen *screen, s32 side);
403void CARDGAME_openPanelIcon(CardScreen *screen, s32 side);
404void CARDGAME_closePanelIcon(CardScreen *screen, s32 side);
405s32 CARDGAME_addSprite(CardScreen *screen, s32 index, s32 x, s32 y);
410s32 CARDGAME_startSpriteEffect(CardScreen *screen, s32 index, s32 which);
411s32 CARDGAME_setSpriteScaleTarget(CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY, s32 instant);
412void CARDGAME_setSpriteScale(CardScreen *screen, s32 index, s32 scaleX, s32 scaleY);
413void CARDGAME_scaleSprite(CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY);
414void CARDGAME_setSpriteMove(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
415void CARDGAME_startSpriteMove(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
416void CARDGAME_startSpriteSlide(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
417s32 CARDGAME_startSpriteFly(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y);
418void CARDGAME_setPanelValue(CardScreen *screen, s32 side, u32 which, s32 value);
419void CARDGAME_setPanelFlags(CardScreen *screen, s32 bits);
423void CARDGAME_dealSprites(CardScreen *screen, s16 duration, s16 count, s32 x, s32 y);
425void CARDGAME_setSpriteCard(CardScreen *screen, s32 sprite, s32 index);
426void CARDGAME_loadCardImage(TimLoader *loader, u8 *image, s32 slot);
432void CARDGAME_moveSprite(CardScreen *screen, CardSprite *sprite);
435extern s32 CARDGAME_pictureSheet[]; /* the sprite sheet CARDGAME_drawCardPicture draws a card's picture with */
436extern u8 CARDGAME_loopFrames[]; /* the frames of a sprite's effect 1, which loops */
437extern u8 CARDGAME_onceFrames[]; /* the frames of its effect 2, which plays once */
438extern u8 CARDGAME_highlightCluts[]; /* a palette cycle: 0, 1, 2, 3, 2, 1 */
439extern s32 CARDGAME_messageWindowPositions[][2]; /* the message window's places (x, y), by CardScreen.message.place */
440extern CardPanelLayout CARDGAME_panelLayouts[2]; /* the panels' layouts, by side */
441extern u8 CARDGAME_panelLightCluts[8]; /* the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1 */
442extern u8 CARDGAME_panelBarSprites[8][2]; /* the sprites of the panel's two bars, by LANGUAGE (USA: 1) */
443extern u8 CARDGAME_flag7Frames[]; /* the frames of the panel's sprites for flags 7, 6 and 5 and its five flag icons (CARDGAME_flagIconSprites), when the flag is set: 0, 1, 2, 1, 0 */
444extern u8 CARDGAME_flag6Frames[];
445extern u8 CARDGAME_boxFrames[];
446extern u8 CARDGAME_flagIconSprites[]; /* the sprites of the panel's five flag icons */
448void CARDGAME_drawFader(CardFader *fader, RECT rect);
449void CARDGAME_stepFader(CardFader *fader);
450void CARDGAME_setFaderColor(CardFader *fader, u8 r, u8 g, u8 b);
451void CARDGAME_startFade(CardFader *fader, u8 r, u8 g, u8 b, s32 frames, s32 killWhenDone);
453void CARDGAME_killFader(CardFader *fader);
454void CARDGAME_tickFader(CardFader *fader);
456
457#endif /* CARDGAME_SCREEN_H */
CARDGAME's shared declarations: the headers it builds on and the types the other headers point to bef...
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
unsigned char u8
Definition common.h:8
#define TASK_HEADER(Type)
Definition task.h:39
void CARDGAME_drawBlinker(CardBlinker *blinker)
Draws a blinker, its CLUT row changing every four frames.
Definition panels.c:430
void CARDGAME_drawPanelIcon(CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale)
Draws a side's panel icon at the panel's open or close scale, and once the panel is open (state 2) it...
Definition panels.c:339
void CARDGAME_updateScreen(CardScreen *screen, CardScreenItems *items)
The card screen's task: makes its cursor and text windows, then each frame updates its blinkers,...
Definition screen.c:8
void CARDGAME_updateMenuWindow(CardScreen *screen, CardScreenItems *items)
A menu window (CardScreen.menuState): it opens, shows text file 0x10 with the cursor on menuRow,...
void CARDGAME_drawSpriteEffect(CardScreen *screen, CardSprite *sprite)
Draws a sprite's effect animation (1-4, frames 0x28-0x4C of the fourth TIM) and ends it when its time...
Definition sprites.c:242
void CARDGAME_setPanelFlags(CardScreen *screen, s32 bits)
CardScreen.setPanelFlags: sets the panels' blink flags from bits, two to a flag: the even bits the pl...
Definition screen.c:503
void CARDGAME_setPanelValue(CardScreen *screen, s32 side, u32 which, s32 value)
CardScreen.setPanelValue: sets one of side's panel values: its points (0 to 4), its deck,...
Definition screen.c:466
s32 CARDGAME_startSpriteRecovery(CardScreen *screen, s32 index)
Starts a sprite's effect 2 with the recovery sound (state 8), and then its blink.
Definition screen.c:363
CardFileEntry CARDGAME_preloadFiles[]
Definition cardgame_3.c:112
void CARDGAME_drawWindowNumbers(CardScreen *screen, CardScreenItems *items, CardWindow *window)
Puts a window's two numbers (numbers) on its texts, right aligned.
Definition windows.c:181
void CARDGAME_confirmMessage(CardScreen *screen)
Confirms the message window's choice: the cursor nudges, then it closes.
Definition screen.c:143
void CARDGAME_updateSprites(CardScreen *screen, CardScreenItems *items)
Animates the sprites, then draws them: the moving ones first.
Definition sprites.c:577
u8 CARDGAME_highlightCluts[]
a palette cycle: 0, 1, 2, 3, 2, 1
Definition cardgame_3.c:82
CardFader * CARDGAME_createFader(u8 blend)
Creates a fader, with the semi-transparency rate BLEND.
Definition fader.c:112
s32 CARDGAME_startSpriteFlip(CardScreen *screen, s32 index)
Starts turning a sprite over (state 4, CARDGAME_flipSprite)
Definition screen.c:322
s32 CARDGAME_startBlinkerMove(CardScreen *screen, s32 index, u8 duration, s16 x, s32 y)
Starts moving blinker index to x, y over duration frames.
Definition screen.c:110
u8 CARDGAME_flag7Frames[]
the frames of the panel's sprites for flags 7, 6 and 5 and its five flag icons (CARDGAME_flagIconSpri...
Definition cardgame_3.c:44
void CARDGAME_resetPanels(CardScreen *screen)
Puts both panels away at once.
Definition screen.c:186
void CARDGAME_drawCenteredText(CardScreen *screen, CardScreenItems *items, CardWindow *window, TextWindow *text, s32 file)
Puts a window's string value of file on text, centred on the screen (string 0x1F in palette 3),...
Definition windows.c:207
void CARDGAME_openWindow(CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y)
Opens window index (CardScreen.windows) at x, y, with its layout and value.
Definition screen.c:70
RECT CARDGAME_fadeRect
Definition cardgame_3.c:178
void CARDGAME_tickFader(CardFader *fader)
A fader's task: steps its fade while fading, draws it over CARDGAME_fadeRect every frame and ends onc...
Definition fader.c:90
void CARDGAME_openPanels(CardScreen *screen)
Slides both panels in, over 20 frames.
Definition screen.c:208
void CARDGAME_closeWindow(CardScreen *screen, s32 index)
Closes window index.
Definition screen.c:84
s32 CARDGAME_messageWindowPositions[][2]
the message window's places (x, y), by CardScreen.message.place
Definition cardgame_3.c:30
void CARDGAME_openPanelIcon(CardScreen *screen, s32 side)
Grows side's panel icon over 12 frames.
Definition screen.c:284
void CARDGAME_animateSprite(CardScreen *screen, CardScreenItems *items, CardSprite *sprite)
Runs a sprite's animation for its state; sets bit 0 of spriteFlags while one runs.
Definition sprites.c:512
s32 CARDGAME_getHandOffset(s32 count, s32 index)
CardScreen.getHandOffset: how far the hand's card index is from its first: 0x2900 a card up to six ca...
void CARDGAME_setFaderColor(CardFader *fader, u8 r, u8 g, u8 b)
Sets the colour at once.
Definition fader.c:55
void CARDGAME_closeMessage(CardScreen *screen)
Closes the message window.
Definition screen.c:135
void CARDGAME_drawMenuFrame(CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y)
Draws the menu window's frame at a scale.
s32 CARDGAME_getCardColor(CardScreen *screen, s32 index)
CardScreen.getCardColor: the colour of the screen's card index.
Definition screen.c:606
void CARDGAME_killFader(CardFader *fader)
Ends the task.
Definition fader.c:84
u8 CARDGAME_loopFrames[]
the frames of a sprite's effect 1, which loops
Definition cardgame_3.c:76
void CARDGAME_openMenuWindow(CardScreen *screen, s16 value)
Opens the menu window with the cursor on row.
Definition screen.c:156
void CARDGAME_drawSpriteBlink(CardScreen *screen, CardSprite *sprite)
Draws a blinking sprite's flash (state 11), its CLUT row changing.
Definition sprites.c:497
void CARDGAME_drawMessageFrame(CardScreen *screen, CardScreenItems *items, s16 scale, s32 x, s32 y)
Draws the message window's frame at a scale.
void CARDGAME_updateBlinkers(CardScreen *screen, CardScreenItems *items)
Moves and draws the twelve blinkers.
Definition panels.c:456
void CARDGAME_closePanelIcon(CardScreen *screen, s32 side)
Shrinks side's panel icon over 6 frames.
Definition screen.c:292
u8 CARDGAME_panelBarSprites[8][2]
the sprites of the panel's two bars, by LANGUAGE (USA: 1)
Definition cardgame_3.c:40
void CARDGAME_closePanels(CardScreen *screen)
Slides both panels out, over 10 frames.
Definition screen.c:231
s32 CARDGAME_showBlinker(CardScreen *screen, s32 index, s16 x, s16 y)
Shows blinker index, still, at x, y.
Definition screen.c:95
void CARDGAME_startSpriteSlide(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Starts moving a sprite to x, y over duration without sounds (state 3)
Definition screen.c:443
s32 CARDGAME_setSpriteScaleTarget(CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY, s32 instant)
Scales a sprite to scaleX, scaleY: at once when instant is 1, else over duration (state 2)
Definition screen.c:398
void CARDGAME_confirmMenuWindow(CardScreen *screen)
Confirms the menu window's row: the cursor nudges, then it closes.
Definition screen.c:173
void CARDGAME_drawWindowFrame(CardScreen *screen, CardScreenItems *items, CardWindow *window)
Draws a window's frame (CARDGAME_windowLayouts), scaled while it opens, and its count.
Definition windows.c:142
u8 CARDGAME_onceFrames[]
the frames of its effect 2, which plays once
Definition cardgame_3.c:79
s32 CARDGAME_holdSprite(CardScreen *screen, CardSprite *sprite, s32 duration)
Holds a sprite for duration frames, then ends its effect: 1 at the end.
Definition sprites.c:140
void CARDGAME_openGauge(CardScreen *screen, s32 index, s16 value)
Opens gauge index showing value, over 10 frames.
Definition screen.c:51
void CARDGAME_clearPanelFlags(CardScreen *screen)
CardScreen.clearPanelFlags: clears both panels' blink flags.
Definition screen.c:567
void CARDGAME_drawFader(CardFader *fader, RECT rect)
Draws the fader over RECT, in layer 0x100.
Definition fader.c:6
void CARDGAME_drawSpriteHighlights(CardScreen *screen, CardSprite *sprite)
Draws the highlights over a sprite (highlight bits 0-2), with a cycling palette.
Definition sprites.c:291
void CARDGAME_closeGauge(CardScreen *screen, s32 index)
Closes gauge index, over 5 frames.
Definition screen.c:61
void CARDGAME_updateWindows(CardScreen *screen, CardScreenItems *items)
Runs and draws the six windows.
Definition windows.c:322
s32 CARDGAME_flipSprite(CardScreen *screen, CardSprite *sprite)
Turns a sprite over for 12 frames, its side swapped after 7: 1 at the end.
Definition sprites.c:181
void CARDGAME_closePanel(CardScreen *screen, s32 side)
Slides side's panel out over 5 frames, stopping the other's.
Definition screen.c:269
void CARDGAME_drawMessageMark(CardScreen *screen, CardScreenItems *items, s32 x, s32 y)
Draws sprite 0x18 of the message window.
s16 CARDGAME_shakeOffsets[]
CARDGAME_shakeSprite's x offsets, by time.
Definition cardgame_3.c:65
void CARDGAME_drawSpriteMarks(CardScreen *screen, CardSprite *sprite)
Draws a card's marks that are set (marks[0..2]: sprites 0x37 to 0x39), in a row 8 pixels apart.
Definition sprites.c:344
void CARDGAME_drawSpriteOrder(CardScreen *screen, CardSprite *sprite)
Draws a sprite's order number (order), the place of its card in the record.
Definition sprites.c:327
u16 CARDGAME_windowTextOffsets[]
a window's text x, by CARDGAME_drawWindowText's index
Definition cardgame_3.c:27
s16 CARDGAME_commonCards[]
the cards everyone has, loaded after the two decks
Definition cardgame_3.c:101
s32 CARDGAME_holdSpriteThenBlink(CardScreen *screen, CardSprite *sprite)
Holds a sprite for 10 frames, then starts its blink: 1 at the end.
Definition sprites.c:128
void CARDGAME_updateMessageWindow(CardScreen *screen, CardScreenItems *items)
The message window: it opens at its place, shows its prompt (showMessagePrompt) and message (showMess...
void CARDGAME_drawSpriteCard(CardScreen *screen, CardSprite *sprite)
Draws a card sprite: its frame (visible 1, with the numbers or the mark and the image) or its back (v...
Definition sprites.c:418
s16 CARDGAME_otherCards[]
the 100 cards whose images CARDGAME_loadCardImages loads after the decks (CARDGAME_getOtherCard)
Definition cardgame_3.c:85
s32 CARDGAME_jitterSprite(CardScreen *screen, CardSprite *sprite)
Jitters a sprite about where it started and squashes it, for 12 frames: 1 at the end.
Definition sprites.c:153
void CARDGAME_drawNumber(CardNumber *number, s32 scaled)
Draws a number with the TIM archive's digits, seven pixels apart, without leading zeros unless asked;...
Definition windows.c:41
void CARDGAME_openPanel(CardScreen *screen, s32 side)
Slides side's panel in over 10 frames, stopping the other's.
Definition screen.c:253
void CARDGAME_closeMenuWindow(CardScreen *screen)
Closes the menu window.
Definition screen.c:165
s16 CARDGAME_jitterOffsets[]
CARDGAME_jitterSprite's x and y offsets.
Definition cardgame_3.c:68
CardScreen * CARDGAME_createScreen(s16 *cards)
Creates the card screen over cards, with its functions.
Definition screen.c:684
CardPanelLayout CARDGAME_panelLayouts[2]
the panels' layouts, by side
Definition cardgame_3.c:31
void CARDGAME_drawBackground(CardScreen *screen)
Draws the scrolling background, which fades in through its palettes (fadeState 1) and then stays.
Definition windows.c:7
u8 CARDGAME_flag6Frames[]
Definition cardgame_3.c:47
s32 CARDGAME_addSprite(CardScreen *screen, s32 index, s32 x, s32 y)
CardScreen.addSprite: puts a card sprite, still and at full size, at x, y.
Definition screen.c:300
u8 CARDGAME_boxFrames[]
Definition cardgame_3.c:50
void CARDGAME_setSpriteScale(CardScreen *screen, s32 index, s32 scaleX, s32 scaleY)
CardScreen.setSpriteScale: scales a sprite at once.
Definition screen.c:415
s32 CARDGAME_pictureSheet[]
the sprite sheet CARDGAME_drawCardPicture draws a card's picture with
Definition cardgame_3.c:71
u8 CARDGAME_flagIconSprites[]
the sprites of the panel's five flag icons
Definition cardgame_3.c:53
void CARDGAME_drawSprite(CardScreen *screen, CardSprite *sprite)
Draws a sprite and its marks, unless it is scaled to nothing.
Definition sprites.c:565
void CARDGAME_startFade(CardFader *fader, u8 r, u8 g, u8 b, s32 frames, s32 killWhenDone)
Fades from the current colour to r, g, b in FRAMES vsyncs; the task ends at the end when KILLWHENDONE...
Definition fader.c:63
CardPanelValue
What CARDGAME_setPanelValue sets: 0-4 a colour's points, then these.
Definition screen.h:198
@ CARD_PANEL_HAND
Definition screen.h:200
@ CARD_PANEL_DISCARDS
Definition screen.h:201
@ CARD_PANEL_HP
Definition screen.h:203
@ CARD_PANEL_AP
Definition screen.h:202
@ CARD_PANEL_DECK
Definition screen.h:199
void CARDGAME_scaleSprite(CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY)
CardScreen.scaleSprite: scales a sprite over duration.
Definition screen.c:420
s32 CARDGAME_loadCardImages(s16 *dst, s16 *player, s16 *opponent)
CardScreen.loadCardImages: loads the images of the player's 40 cards, the opponent's 40,...
Definition screen.c:648
void CARDGAME_startSpriteMove(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Starts moving a sprite to x, y over duration (state 2), with a sound at the start and the end.
Definition screen.c:436
void CARDGAME_stepFader(CardFader *fader)
Moves the colour towards the target as the time runs out.
Definition fader.c:34
void CARDGAME_loadCardImage(TimLoader *loader, u8 *image, s32 slot)
Loads a card's image to VRAM slot slot, in columns of eight, with its CLUT.
Definition screen.c:634
void CARDGAME_dealSprites(CardScreen *screen, s16 duration, s16 count, s32 x, s32 y)
CardScreen.dealSprites: lays out count sprites as a hand from x, y, at once (duration 0) or moving th...
Definition screen.c:591
void CARDGAME_updateGauges(CardScreen *screen, CardScreenItems *items)
Runs and draws the three gauges.
Definition windows.c:105
s32 CARDGAME_isFadeDone(CardFader *fader)
1 once the fade has reached its colour
Definition fader.c:79
CardOffset CARDGAME_gaugePositions[]
where the three CardGauge gauges are
Definition cardgame_3.c:20
void CARDGAME_updateGauge(CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p)
Grows (state 1), holds (2) or shrinks (3) a gauge, and draws it.
Definition windows.c:78
s32 CARDGAME_shakeSprite(CardScreen *screen, CardSprite *sprite)
Shakes a sprite sideways and stretches it, for 12 frames: 1 at the end.
Definition sprites.c:101
void CARDGAME_slidePanel(CardPanel *panel, CardScreenItems *items, s32 side)
Moves a side's panel between its shown and hidden places: in (state 1, slidePanelIn),...
Definition panels.c:235
void CARDGAME_drawPanel(CardPanel *panel, CardScreenItems *items, s32 side)
Draws a side's panel (CardScreen.panels): its lights, bars, numbers and parts (drawPanelParts),...
Definition panels.c:57
void CARDGAME_openMessage(CardScreen *screen, s32 arg1, s32 arg2, s16 arg3, s32 arg4)
Opens the message window at place with message, asking prompt with the cursor on choice.
Definition screen.c:123
RECT CARDGAME_screenRect
The functions and data the overlay's files share.
Definition cardgame_3.c:8
void CARDGAME_tickPreloader(CardPreloader *task)
Requests the files of CARDGAME_preloadFiles one after the other, and ends after the last.
Definition preloader.c:7
void CARDGAME_drawCardPicture(CardSprite *sprite)
Draws a card's picture: a one-part sprite sheet (CARDGAME_pictureSheet) made on the fly,...
Definition sprites.c:204
void CARDGAME_setMessageChoice(CardScreen *screen, s32 value)
Puts the message window's cursor on choice.
Definition screen.c:151
s32 CARDGAME_startSpriteBlink(CardScreen *screen, s32 index)
Starts a sprite's blink (state 11), with the confirm sound.
Definition screen.c:581
s32 CARDGAME_startSpriteJitter(CardScreen *screen, s32 index)
Starts a sprite's jitter (state 6, CARDGAME_jitterSprite), with effect 1.
Definition screen.c:334
void CARDGAME_moveBlinker(CardBlinker *blinker)
Moves a blinker towards its target; it stops there (state 1)
Definition panels.c:415
void CARDGAME_setMenuWindowRow(CardScreen *screen, s16 value)
Puts the menu window's cursor on row.
Definition screen.c:181
CardPreloader * CARDGAME_startPreloader(void)
Starts the preloader of the card game's files (CARDGAME_tickPreloader)
Definition preloader.c:46
s32 CARDGAME_startSpriteEffect(CardScreen *screen, s32 index, s32 which)
Starts a sprite's effect 3 (which 0) for 36 frames, or 4 for 28.
Definition screen.c:376
u8 CARDGAME_panelLightCluts[8]
the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1
Definition cardgame_3.c:39
s32 CARDGAME_startSpriteFly(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Starts a sprite's flight to x, y and back (state 5, CARDGAME_flySprite), after it grows for 16 frames...
Definition screen.c:450
s32 CARDGAME_startSpriteShake(CardScreen *screen, s32 index)
Starts a sprite's shake (state 7, CARDGAME_shakeSprite), with effect 1.
Definition screen.c:349
void CARDGAME_drawWindowText(CardScreen *screen, CardWindow *window, TextWindow *text, s32 file, s32 index)
Puts a window's string value of file on text, or hides text when it has none.
Definition windows.c:196
s32 CARDGAME_getOtherCard(s32 index)
Card index of CARDGAME_otherCards.
Definition screen.c:641
void CARDGAME_drawGauge(CardScreen *screen, CardScreenItems *items, s32 index, CardGauge *p)
Draws a gauge at its place (CARDGAME_gaugePositions), at its scale.
Definition windows.c:66
s32 CARDGAME_flySprite(CardScreen *screen, CardSprite *sprite)
Flies a sprite from start to target along an arc while scaling it; at the end it swaps start and targ...
Definition sprites.c:42
void CARDGAME_updatePanels(CardScreen *screen, CardScreenItems *items)
Runs and draws both panels and their icons.
Definition panels.c:473
void CARDGAME_updateScene(Task *task, CardBattle **items)
The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep....
Definition scene.c:8
void CARDGAME_moveSprite(CardScreen *screen, CardSprite *sprite)
Moves and scales a sprite towards its targets; at the end it plays a sound (unless in state 3) and go...
Definition sprites.c:12
void CARDGAME_updateWindow(CardScreen *screen, CardScreenItems *items, CardWindow *window, s32 index)
Opens (state 1), shows (2) or closes (3) window index, each its own way.
Definition windows.c:228
u8 CARDGAME_flagIconFrames[]
Definition cardgame_3.c:56
void CARDGAME_drawSpriteDim(CardScreen *screen, CardSprite *sprite)
Draws the shade over a dimmed sprite.
Definition sprites.c:480
void CARDGAME_setSpriteCard(CardScreen *screen, s32 sprite, s32 index)
CardScreen.setSpriteCard: shows the screen's card index on sprite, with its AP, HP,...
Definition screen.c:616
void CARDGAME_setSpriteMove(CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Sets a sprite's move to x, y over duration, from where it is.
Definition screen.c:425
void CARDGAME_updatePanelIcon(CardScreen *screen, CardScreenItems *items, s32 side, CardPanelScale *scale)
Grows (state 1) or shrinks (3) side's panel icon, and draws it.
Definition panels.c:390
s32 CARDGAME_removeSprite(CardScreen *screen, s32 index)
CardScreen.removeSprite: hides a sprite.
Definition screen.c:573
CardWindowLayout CARDGAME_windowLayouts[]
Definition cardgame_3.c:23
The card battle (CARDGAME_createBattle).
Definition battle.h:226
A blinking marker on the battle screen (CardScreen.blinkers), which can move to a target.
Definition screen.h:208
s16 targetX
Definition screen.h:213
s16 blinkTime
Definition screen.h:215
s16 targetY
Definition screen.h:214
u8 duration
Definition screen.h:217
s16 startX
Definition screen.h:211
s16 startY
Definition screen.h:212
A fade colour and blend mode (CardBattle.fade - 1 picks one)
Definition screen.h:51
Fades the screen to a colour: a POLY_F4 over it, blended (blend is the semi-transparency rate)
Definition screen.h:34
u8 color[3]
Definition screen.h:43
s32 time
left
Definition screen.h:37
u8 from[3]
Definition screen.h:42
void(* kill)(struct CardFader *fader)
Definition screen.h:47
void(* setColor)(struct CardFader *fader, u8 r, u8 g, u8 b)
Definition screen.h:44
u8 blend
Definition screen.h:39
s32 duration
Definition screen.h:38
u8 killWhenDone
Definition screen.h:40
u8 target[3]
Definition screen.h:41
s32(* isDone)(struct CardFader *fader)
Definition screen.h:46
s32 mode
0 idle, 1 fading, 2 done: the task ends
Definition screen.h:36
void(* start)(struct CardFader *fader, u8 r, u8 g, u8 b, s32 frames, s32 killWhenDone)
Definition screen.h:45
A file CARDGAME_tickPreloader reads; a text file is in each language.
Definition screen.h:19
s16 file
-2: the files before are enough to start, -1: the end
Definition screen.h:20
A value that goes from from to to (0x1000 is 1) over duration frames.
Definition screen.h:222
s16 state
Definition screen.h:227
s16 from
Definition screen.h:223
s16 time
Definition screen.h:225
s16 value
Definition screen.h:228
s16 duration
Definition screen.h:226
s16 to
Definition screen.h:224
The battle screen's message window (CardScreen.message), which CARDGAME_runBattleMenu keeps a copy of...
Definition screen.h:248
s16 pad12[2]
never read or written
Definition screen.h:255
u8 prompt
what it asks: 0 nothing, else a choice with the cursor
Definition screen.h:257
s16 choice
the cursor's row
Definition screen.h:254
s32 pad8
never read or written
Definition screen.h:251
u8 state
1 opening, 2 open, 4 confirmed, 5 closing
Definition screen.h:256
s32 place
in CARDGAME_messageWindowPositions
Definition screen.h:249
A number drawn with the TIM archive's digits (CARDGAME_drawNumber)
Definition screen.h:73
s16 x
Definition screen.h:75
u8 leadingZeros
Definition screen.h:82
s16 pivotX
Definition screen.h:79
s16 scaleX
Definition screen.h:77
u8 digits
Definition screen.h:81
s16 y
Definition screen.h:76
s16 value
Definition screen.h:74
s16 scaleY
Definition screen.h:78
u8 depth
Definition screen.h:83
s16 pivotY
Definition screen.h:80
An offset from a window's corner.
Definition screen.h:59
s16 x
Definition screen.h:60
s16 y
Definition screen.h:61
Where CARDGAME_drawPanel draws the parts of a side's panel (CARDGAME_panelLayouts),...
Definition screen.h:107
CardOffset flag6Light
Definition screen.h:125
CardOffset handCount
Definition screen.h:115
CardOffset apTotal
Definition screen.h:118
CardOffset hpLight
Definition screen.h:129
CardOffset boxLight
from the box
Definition screen.h:127
CardOffset hpTotal
Definition screen.h:120
CardOffset flagIcons
five, 0x2A apart
Definition screen.h:112
CardOffset discardCount
from the box
Definition screen.h:116
CardOffset flag7Part
Definition screen.h:122
CardOffset hpBar
Definition screen.h:119
CardOffset deckCount
Definition screen.h:114
CardOffset flagNumbers
CardPanel.points, 0x2A apart.
Definition screen.h:113
CardOffset flag6Part
Definition screen.h:121
u8 winsSprite
plus CardPanel.wins: the sprite at winsX, winsY
Definition screen.h:110
CardOffset flagLights
five, 0x2A apart
Definition screen.h:124
u8 unk0
1 in both layouts; nothing reads it
Definition screen.h:108
CardOffset apBar
Definition screen.h:117
CardOffset flag7Light
Definition screen.h:126
u8 frame
the panel's sprite
Definition screen.h:109
CardOffset boxLabel
from the box
Definition screen.h:123
CardOffset apLight
Definition screen.h:128
A panel's open (state 1) or close (state 3) scale, which goes over duration frames.
Definition screen.h:96
u8 pad2[2]
never read or written
Definition screen.h:98
u8 pad9[3]
never read or written: CardScreen.panels[2] are 0x54 bytes apart
Definition screen.h:102
One side's panel on the battle screen (CardScreen.panels): 0 is the player's, 1 the opponent's.
Definition screen.h:134
s16 event
for a frame, until CARDGAME_slidePanel clears it: 2 the panel started sliding in, 1 it slid out; noth...
Definition screen.h:138
s32 wins
the rounds won shown
Definition screen.h:158
u8 pad2C[4]
never read or written
Definition screen.h:152
s16 time
Definition screen.h:135
s16 duration
Definition screen.h:136
u8 handCount
Definition screen.h:147
u8 pad14[4]
never read or written
Definition screen.h:144
s16 hpTotal
Definition screen.h:143
s16 apTotal
the values shown (CARDGAME_setPanelValue)
Definition screen.h:142
s16 boxY
Definition screen.h:149
s32 blinkTime
a frame counter for the blinking (CARDGAME_drawPanel)
Definition screen.h:139
u8 pad3A[2]
never read or written
Definition screen.h:154
u8 pad24[4]
never read or written
Definition screen.h:150
s32 discardCount
Definition screen.h:151
u8 pad40[4]
never read or written
Definition screen.h:157
u8 points[5]
one per card colour
Definition screen.h:145
CardPanelScale scale
Definition screen.h:159
s16 x
Definition screen.h:140
s16 state
Definition screen.h:137
s16 y
Definition screen.h:141
s16 winsX
where the rounds won are shown
Definition screen.h:155
s16 winsY
Definition screen.h:156
u8 deckCount
Definition screen.h:146
s16 boxX
the discards' box, which slides on its own
Definition screen.h:148
u8 flags[10]
Definition screen.h:153
Reads CARDGAME's files into the file cache, one at a time.
Definition screen.h:25
s32 ready
the files before the first -2 are in
Definition screen.h:27
The battle screen's task items.
Definition screen.h:87
TextWindow * panelTexts[2]
the label under each side's panel (CARDGAME_drawPanelIcon)
Definition screen.h:90
TextWindow * moreTexts[8]
Definition screen.h:91
TextWindow * texts[3]
Definition screen.h:89
Cursor * cursor
Definition screen.h:88
The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the ...
Definition screen.h:263
CardMessageWindow message
Definition screen.h:274
CardBlinker blinkers[12]
Definition screen.h:272
void(* setSpriteCard)(struct CardScreen *screen, s32 sprite, s32 index)
Definition screen.h:324
void(* openWindow)(struct CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y)
Definition screen.h:288
u8 fadeRow
the background's palette row, 0 to 11
Definition screen.h:282
void(* closePanel)(struct CardScreen *screen, s32 side)
Definition screen.h:292
s16 * cards
the battle's card list
Definition screen.h:265
u8 padE06[4]
never read or written
Definition screen.h:279
s32(* startFly)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Definition screen.h:313
u32 time
Definition screen.h:267
void(* dealSprites)(struct CardScreen *screen, s16 duration, s16 count, s32 x, s32 y)
Definition screen.h:310
void(* openMenu)(struct CardScreen *screen, s16 row)
Definition screen.h:306
void(* setPanelValue)(struct CardScreen *screen, s32 side, u32 which, s32 value)
Definition screen.h:285
void(* scaleSprite)(struct CardScreen *screen, s32 index, s32 duration, s32 scaleX, s32 scaleY)
Definition screen.h:318
s32(* getCardColor)(struct CardScreen *screen, s32 index)
Definition screen.h:325
void(* setPanelFlags)(struct CardScreen *screen, s32 bits)
Definition screen.h:291
void(* clearPanelFlags)(struct CardScreen *screen)
Definition screen.h:290
u8 padDFC[4]
never read or written
Definition screen.h:275
CardGauge gauges[3]
Definition screen.h:273
u8 fadeTime
four frames a row
Definition screen.h:283
void(* startMove)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Definition screen.h:311
void(* resetPanels)(struct CardScreen *screen)
Definition screen.h:296
void(* openPanels)(struct CardScreen *screen)
Definition screen.h:295
void(* setMessageChoice)(struct CardScreen *screen, s32 choice)
Definition screen.h:305
s32(* startShake)(struct CardScreen *screen, s32 index)
Definition screen.h:321
CardSprite sprites[40]
Definition screen.h:271
void(* openMessage)(struct CardScreen *screen, s32 message, s32 prompt, s16 choice, s32 place)
Definition screen.h:302
s32(* getHandOffset)(s32 count, s32 index)
Definition screen.h:299
void(* closeMenu)(struct CardScreen *screen)
Definition screen.h:307
void(* confirmMessage)(struct CardScreen *screen)
Definition screen.h:304
s32(* removeSprite)(struct CardScreen *screen, s32 index)
Definition screen.h:315
s32(* startEffect)(struct CardScreen *screen, s32 index, s32 which)
Definition screen.h:323
void(* setSpriteScale)(struct CardScreen *screen, s32 index, s32 scaleX, s32 scaleY)
Definition screen.h:317
void(* closePanels)(struct CardScreen *screen)
Definition screen.h:294
s32(* startJitter)(struct CardScreen *screen, s32 index)
Definition screen.h:320
void(* openPanelIcon)(struct CardScreen *screen, s32 side)
Definition screen.h:297
CardWindow windows[6]
Definition screen.h:281
void(* closeMessage)(struct CardScreen *screen)
Definition screen.h:303
s32 spriteFlags
this frame: bit 0 a sprite is animated, bit 1 a flying one landed
Definition screen.h:266
s16 menuState
Definition screen.h:280
void(* closeWindow)(struct CardScreen *screen, s32 index)
Definition screen.h:289
s32(* loadCardImages)(s16 *dst, s16 *player, s16 *opponent)
Definition screen.h:326
u8 fadeState
0 dark, 1 fading in, 2 shown
Definition screen.h:284
s32(* startBlink)(struct CardScreen *screen, s32 index)
Definition screen.h:316
s16 menuTime
Definition screen.h:276
void(* confirmMenu)(struct CardScreen *screen)
Definition screen.h:308
s16 opponent
CardBattle.arg.
Definition screen.h:268
void(* closeGauge)(struct CardScreen *screen, s32 index)
Definition screen.h:287
s32(* showBlinker)(struct CardScreen *screen, s32 index, s16 x, s16 y)
Definition screen.h:300
s16 menuRow
Definition screen.h:278
s32(* startFlip)(struct CardScreen *screen, s32 index)
Definition screen.h:319
void(* setMenuRow)(struct CardScreen *screen, s16 row)
Definition screen.h:309
void(* closePanelIcon)(struct CardScreen *screen, s32 side)
Definition screen.h:298
void(* openGauge)(struct CardScreen *screen, s32 index, s16 value)
Definition screen.h:286
s32(* addSprite)(struct CardScreen *screen, s32 index, s32 x, s32 y)
Definition screen.h:314
void(* startSlide)(struct CardScreen *screen, s32 index, s32 duration, s32 x, s32 y)
Definition screen.h:312
void(* openPanel)(struct CardScreen *screen, s32 side)
Definition screen.h:293
s16 menuDuration
Definition screen.h:277
s32(* startBlinkerMove)(struct CardScreen *screen, s32 index, u8 duration, s16 x, s32 y)
Definition screen.h:301
CardPanel panels[2]
Definition screen.h:270
s16 opponentLevel
CardBattle.opponentLevel.
Definition screen.h:269
s32(* startRecovery)(struct CardScreen *screen, s32 index)
Definition screen.h:322
A card on the battle screen (CardScreen.sprites)
Definition screen.h:163
s32 growTime
the frames it grows for before it flies (CARDGAME_flySprite)
Definition screen.h:180
s16 index
in the battle's card list
Definition screen.h:183
s16 moving
Definition screen.h:177
u8 ap
the values shown, which count towards the slot's
Definition screen.h:188
s16 targetScaleY
Definition screen.h:173
s32 duration
Definition screen.h:179
u8 dimmed
Definition screen.h:194
s16 color
the card's colour, from 0
Definition screen.h:182
s32 startY
Definition screen.h:169
s32 startX
Definition screen.h:168
s16 targetScaleX
Definition screen.h:172
s16 startScaleX
Definition screen.h:174
s32 effectTime
Definition screen.h:181
s16 slot
Definition screen.h:176
s32 targetY
Definition screen.h:167
s32 time
Definition screen.h:178
u8 points
the card's
Definition screen.h:186
u8 order
a played card's place in the record, from 1
Definition screen.h:191
u8 visible
Definition screen.h:190
u8 highlight
bit 0 the cursor, bit 1 picked, bit 2 glowing
Definition screen.h:193
s16 isKind16
Definition screen.h:184
s16 startScaleY
Definition screen.h:175
s32 targetX
Definition screen.h:166
s16 scaleX
Definition screen.h:170
u8 marks[3]
the plays that apply to the card, drawn as marks
Definition screen.h:185
u8 effect
1-4, drawn by CARDGAME_drawSpriteEffect
Definition screen.h:192
s16 scaleY
Definition screen.h:171
How each of the six CardWindow windows is drawn.
Definition screen.h:65
u8 kind
2: a sprite of the fourth TIM, else of the third
Definition screen.h:69
s16 x
its pivot, from the window's corner
Definition screen.h:66
A window that opens (its scale goes from from to to)
Definition screen.h:232
s16 time
Definition screen.h:237
s16 duration
Definition screen.h:238
u8 numbers[3]
two numbers, and whether they are shown
Definition screen.h:242
s16 from
Definition screen.h:235
s16 showCount
Definition screen.h:240
s32 value
by its layout: a string, a card, or points | colour << 4
Definition screen.h:241
s16 layout
in CARDGAME_windowLayouts
Definition screen.h:239
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
Definition text.h:19
Any task, seen through its header.
Definition task.h:62
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
Definition text.h:131
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
Definition gfx.h:325