Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
panels.c
Go to the documentation of this file.
1/* CARDGAME's panels, one a side, with their lights, bars, numbers and
2 icons, and the blinkers. */
3
5
6/* Draws a side's panel image of its wins, its parts blinking by its flags,
7 and its frame */
8static inline void drawPanelParts(CardPanel *panel, s32 side, s32 y, s32 imageY) {
9 SpriteDrawer drawer;
10 s32 t;
11 s32 frame;
12 s32 boxFrame;
13 s32 iconT;
14 s32 iconFrame;
15 s32 i;
16
17 initSpriteDrawer(&drawer);
18 drawer.setLayerId(0x100, 1);
19 drawer.setTexture(0x280, 0);
20 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 2), CARDGAME_panelLayouts[side].winsSprite + panel->wins, panel->winsX, imageY);
21 t = panel->blinkTime % 30;
22 if (panel->flags[7] != 0) {
23 frame = t / 6;
24 } else {
25 frame = 0;
26 }
28 t = panel->blinkTime % 30;
29 if (panel->flags[6] != 0) {
30 frame = t / 6;
31 } else {
32 frame = 0;
33 }
35 t = panel->blinkTime % 30;
36 if (panel->flags[5] != 0) {
37 boxFrame = t / 6;
38 } else {
39 boxFrame = 0;
40 }
41 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 2), CARDGAME_boxFrames[boxFrame] + 0x31, panel->boxX, panel->boxY);
42 iconT = panel->blinkTime % 30;
43 for (i = 0; i < 5; i++) {
44 if (panel->flags[i] != 0) {
45 iconFrame = iconT / 6;
46 } else {
47 iconFrame = 0;
48 }
50 }
52 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 2), CARDGAME_panelLayouts[side].frame, panel->x, y);
53}
54
55/* Draws a side's panel (CardScreen.panels): its lights, bars, numbers and
56 parts (drawPanelParts), which blink by its flags */
57void CARDGAME_drawPanel(CardPanel *panel, CardScreenItems *items, s32 side) {
58 s32 y;
59 s32 imageY;
60
61 y = panel->y;
62 imageY = panel->winsY;
63#if PAL_VIDEO
64 if (SHIFT_PAL_SCREEN) {
65 if (side == 0) {
66 y += 12;
67 imageY += 12;
68 } else {
69 y -= 12;
70 imageY -= 12;
71 }
72 }
73#endif
74 /* the lights */
75 {
76 SpriteDrawer drawer;
77 s32 t;
78 s32 i;
79
80 t = panel->blinkTime % 36;
81 initSpriteDrawer(&drawer);
82 drawer.setLayerId(0x100, 1);
83 drawer.setTexture(0x340, 0);
85 for (i = 0; i < 5; i++) {
86 if (panel->flags[i] != 0) {
87 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 3), 0xD, panel->x + CARDGAME_panelLayouts[side].flagLights.x + i * 0x2A, y + CARDGAME_panelLayouts[side].flagLights.y);
88 }
89 }
90 if (panel->flags[8] != 0) {
91 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 3), 0xC, panel->x + CARDGAME_panelLayouts[side].apLight.x, y + CARDGAME_panelLayouts[side].apLight.y);
92 }
93 if (panel->flags[9] != 0) {
94 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 3), 0xC, panel->x + CARDGAME_panelLayouts[side].hpLight.x, y + CARDGAME_panelLayouts[side].hpLight.y);
95 }
96 if (panel->flags[6] != 0) {
98 }
99 if (panel->flags[7] != 0) {
101 }
102 if (panel->flags[5] != 0) {
103 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 3), 0xF, panel->boxX + CARDGAME_panelLayouts[side].boxLight.x, panel->boxY + CARDGAME_panelLayouts[side].boxLight.y);
104 }
105 }
106 /* the bars and the numbers */
107 {
108 SpriteDrawer drawer;
109 CardNumber number;
110 s32 t;
111 s32 i;
112
113 t = panel->blinkTime % 24;
114 initSpriteDrawer(&drawer);
115 drawer.setLayerId(0x100, 1);
116 drawer.setTexture(0x340, 0);
117 if (panel->flags[8] != 0) {
118 drawer.setClutRow(t / 6 + 1);
119 } else {
120 drawer.setClutRow(0);
121 }
122#if VERSION_US
124#elif VERSION_EU || VERSION_JP
126#endif
127 if (panel->flags[9] != 0) {
128 drawer.setClutRow(t / 6 + 1);
129 } else {
130 drawer.setClutRow(0);
131 }
132#if VERSION_US
134#elif VERSION_EU || VERSION_JP
136#endif
137
138 number.depth = 1;
139 number.x = panel->x + CARDGAME_panelLayouts[side].deckCount.x;
140 number.y = CARDGAME_panelLayouts[side].deckCount.y + y;
141 number.digits = 2;
142 number.leadingZeros = 1;
143 number.value = panel->deckCount;
144 CARDGAME_drawNumber(&number, 0);
145 number.x = panel->x + CARDGAME_panelLayouts[side].handCount.x;
146 number.y = CARDGAME_panelLayouts[side].handCount.y + y;
147 number.digits = 2;
148 number.leadingZeros = 1;
149 number.value = panel->handCount;
150 CARDGAME_drawNumber(&number, 0);
151 number.x = panel->x + CARDGAME_panelLayouts[side].apTotal.x;
152 number.y = CARDGAME_panelLayouts[side].apTotal.y + y;
153 number.digits = 3;
154 number.leadingZeros = 0;
155 number.value = panel->apTotal;
156 CARDGAME_drawNumber(&number, 0);
157 number.x = panel->x + CARDGAME_panelLayouts[side].hpTotal.x;
158 number.y = CARDGAME_panelLayouts[side].hpTotal.y + y;
159 number.digits = 3;
160 number.leadingZeros = 0;
161 number.value = panel->hpTotal;
162 CARDGAME_drawNumber(&number, 0);
163 for (i = 0; i < 5; i++) {
164 number.x = panel->x + CARDGAME_panelLayouts[side].flagNumbers.x + i * 0x2A;
165 number.y = CARDGAME_panelLayouts[side].flagNumbers.y + y;
166 number.digits = 2;
167 number.leadingZeros = 1;
168 number.value = panel->points[i];
169 CARDGAME_drawNumber(&number, 0);
170 }
171 number.x = panel->boxX + CARDGAME_panelLayouts[side].discardCount.x;
172 number.y = panel->boxY + CARDGAME_panelLayouts[side].discardCount.y;
173 number.digits = 2;
174 number.leadingZeros = 1;
175 number.value = panel->discardCount;
176 CARDGAME_drawNumber(&number, 0);
177 }
178 drawPanelParts(panel, side, y, imageY);
179 panel->blinkTime = (panel->blinkTime + GFX.funcs.getFrameTime()) & 0xFFFF;
180}
181
182/* Slides a side's whole panel in from its hidden places to its shown ones,
183 where it stays (state 2) */
184static inline void slidePanelIn(CardPanel *panel, s32 shownX, s32 shownY, s32 hiddenX, s32 hiddenY,
185 s32 shownBoxX, s32 hiddenBoxX, s32 shownBoxY, s32 hiddenBoxY,
186 s32 shownWinsX, s32 hiddenWinsX, s32 shownWinsY, s32 hiddenWinsY) {
187 if ((panel->time -= GFX.funcs.getFrameTime()) > 0) {
188 panel->x = shownX - (shownX - hiddenX) * panel->time / panel->duration;
189 panel->y = shownY - (shownY - hiddenY) * panel->time / panel->duration;
190 panel->boxX = shownBoxX - (shownBoxX - hiddenBoxX) * panel->time / panel->duration;
191 panel->boxY = shownBoxY - (shownBoxY - hiddenBoxY) * panel->time / panel->duration;
192 panel->winsX = shownWinsX - (shownWinsX - hiddenWinsX) * panel->time / panel->duration;
193 panel->winsY = shownWinsY - (shownWinsY - hiddenWinsY) * panel->time / panel->duration;
194 } else {
195 panel->state = 2;
196 panel->time = 0;
197 panel->duration = 0;
198 panel->x = shownX;
199 panel->y = shownY;
200 panel->boxX = shownBoxX;
201 panel->boxY = shownBoxY;
202 panel->winsX = shownWinsX;
203 panel->winsY = shownWinsY;
204 }
205}
206
207/* Slides a side's whole panel out from its shown places to its hidden ones,
208 where it's gone (state 0) */
209static inline void slidePanelOut(CardPanel *panel, s32 shownX, s32 shownY, s32 hiddenX, s32 hiddenY,
210 s32 shownBoxX, s32 hiddenBoxX, s32 shownBoxY, s32 hiddenBoxY,
211 s32 shownWinsX, s32 hiddenWinsX, s32 shownWinsY, s32 hiddenWinsY) {
212 if ((panel->time -= GFX.funcs.getFrameTime()) > 0) {
213 panel->x = hiddenX - (hiddenX - shownX) * panel->time / panel->duration;
214 panel->y = hiddenY - (hiddenY - shownY) * panel->time / panel->duration;
215 panel->boxX = hiddenBoxX - (hiddenBoxX - shownBoxX) * panel->time / panel->duration;
216 panel->boxY = hiddenBoxY - (hiddenBoxY - shownBoxY) * panel->time / panel->duration;
217 panel->winsX = hiddenWinsX - (hiddenWinsX - shownWinsX) * panel->time / panel->duration;
218 panel->winsY = hiddenWinsY - (hiddenWinsY - shownWinsY) * panel->time / panel->duration;
219 } else {
220 panel->state = 0;
221 panel->event = 1;
222 panel->time = 0;
223 panel->duration = 0;
224 panel->x = hiddenX;
225 panel->y = hiddenY;
226 panel->boxX = hiddenBoxX;
227 panel->boxY = hiddenBoxY;
228 panel->winsX = hiddenWinsX;
229 panel->winsY = hiddenWinsX; /* not hiddenWinsY */
230 }
231}
232
233/* Moves a side's panel between its shown and hidden places: in (state 1,
234 slidePanelIn), out (3, slidePanelOut), or only x/y in or out (4, 5) */
236 s32 shownX;
237 s32 shownY;
238 s32 hiddenX;
239 s32 hiddenY;
240 s32 shownBoxX;
241 s32 hiddenBoxX;
242 s32 shownBoxY;
243 s32 hiddenBoxY;
244 s32 shownWinsX;
245 s32 hiddenWinsX;
246 s32 shownWinsY;
247 s32 hiddenWinsY;
248
249 if (side == 0) {
250 shownX = 0;
251 shownY = 0x8D;
252 hiddenX = 0;
253 hiddenY = 0xF1;
254 shownBoxX = 0x120;
255 shownBoxY = 0x8F;
256 hiddenBoxX = 0x147;
257 hiddenBoxY = 0x8F;
258 shownWinsX = 0x113;
259 shownWinsY = 0xBD;
260 hiddenWinsY = 0xBD;
261 /* the match depends on setting it in both branches, not once after them */
262 hiddenWinsX = 0x13A;
263 } else {
264 shownX = 0;
265 shownY = 0;
266 hiddenX = 0;
267 hiddenY = -100;
268 shownBoxX = 0x120;
269 shownBoxY = 0x50;
270 hiddenBoxX = 0x147;
271 hiddenBoxY = 0x50;
272 shownWinsX = 0x113;
273 shownWinsY = 0x26;
274 hiddenWinsY = 0x26;
275 hiddenWinsX = 0x13A;
276 }
277 /* the match depends on the empty case 0 */
278 switch (panel->event) {
279 case 1:
280 panel->event = 0;
281 break;
282 case 2:
283 panel->event = 0;
284 break;
285 case 0:
286 break;
287 }
288 switch (panel->state) {
289 case 1:
290 slidePanelIn(panel, shownX, shownY, hiddenX, hiddenY, shownBoxX, hiddenBoxX, shownBoxY, hiddenBoxY,
291 shownWinsX, hiddenWinsX, shownWinsY, hiddenWinsY);
292 break;
293 case 3:
294 slidePanelOut(panel, shownX, shownY, hiddenX, hiddenY, shownBoxX, hiddenBoxX, shownBoxY, hiddenBoxY,
295 shownWinsX, hiddenWinsX, shownWinsY, hiddenWinsY);
296 break;
297 case 4:
298 panel->boxX = hiddenBoxX;
299 panel->boxY = hiddenBoxY;
300 panel->winsX = hiddenWinsX;
301 panel->winsY = hiddenWinsX;
302 if ((panel->time -= GFX.funcs.getFrameTime()) > 0) {
303 panel->x = shownX - (shownX - hiddenX) * panel->time / panel->duration;
304 panel->y = shownY - (shownY - hiddenY) * panel->time / panel->duration;
305 } else {
306 panel->state = 2;
307 panel->time = 0;
308 panel->duration = 0;
309 panel->x = shownX;
310 panel->y = shownY;
311 }
312 break;
313 case 5:
314 panel->boxX = hiddenBoxX;
315 panel->boxY = hiddenBoxY;
316 panel->winsX = hiddenWinsX;
317 panel->winsY = hiddenWinsX;
318 if ((panel->time -= GFX.funcs.getFrameTime()) > 0) {
319 panel->x = hiddenX - (hiddenX - shownX) * panel->time / panel->duration;
320 panel->y = hiddenY - (hiddenY - shownY) * panel->time / panel->duration;
321 } else {
322 panel->state = 0;
323 panel->event = 1;
324 panel->time = 0;
325 panel->duration = 0;
326 panel->x = hiddenX;
327 panel->y = hiddenY;
328 }
329 break;
330 case 0:
331 case 2:
332 break;
333 }
334}
335
336/* Draws a side's panel icon at the panel's open or close scale, and once the
337 panel is open (state 2) its label; the European version takes both
338 positions from CARDGAME_panelIconPositions, by SHIFT_PAL_SCREEN */
340 SpriteDrawer drawer;
341 s32 iconX;
342 s32 iconY;
343 s32 textX;
344 s32 textY;
345
346#if PAL_VIDEO
347 if (side == 0) {
352 } else {
357 }
358#else
359 if (side == 0) {
360 iconX = 0x7C;
361 iconY = 0x33;
362 textX = 0x8A;
363 textY = 0x34;
364 } else {
365 iconX = 0x7C;
366 iconY = 0x23;
367 textX = 0x8A;
368 textY = 0x24;
369 }
370#endif
371 if (scale->state != 0) {
372 initSpriteDrawer(&drawer);
373 drawer.setLayerId(0x100, 1);
374 drawer.setTexture(0x280, 0);
375 drawer.setPivot(screen->panels[side].x + iconX, screen->panels[side].y + iconY);
376 drawer.setScale(scale->value, 0x1000, 0x1000);
377 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 2), side == 0 ? 0x44 : 0x43,
378 screen->panels[side].x + iconX, screen->panels[side].y + iconY);
379 }
380 if (scale->state == 2) {
381 items->panelTexts[side]->setPos(items->panelTexts[side], screen->panels[side].x + textX,
382 screen->panels[side].y + textY);
383 items->panelTexts[side]->setString(items->panelTexts[side], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_GAME)), 0x3F);
384 } else {
385 items->panelTexts[side]->setVisible(items->panelTexts[side], 0);
386 }
387}
388
389/* Grows (state 1) or shrinks (3) side's panel icon, and draws it */
391 switch (scale->state) {
392 case 1:
393 scale->value = 0x1000 - (scale->time << 12) / scale->duration;
394 scale->time -= GFX.funcs.getFrameTime();
395 if (scale->time <= 0) {
396 scale->state = 2;
397 }
398 break;
399 case 3:
400 scale->value = (scale->time << 12) / scale->duration;
401 scale->time -= GFX.funcs.getFrameTime();
402 if (scale->time <= 0) {
403 scale->state = 0;
404 }
405 break;
406 case 0:
407 break;
408 case 2:
409 break;
410 }
411 CARDGAME_drawPanelIcon(screen, items, side, scale);
412}
413
414/* Moves a blinker towards its target; it stops there (state 1) */
416 blinker->time -= GFX.funcs.getFrameTime();
417 if (blinker->time != 0) {
418 blinker->x = blinker->targetX - (blinker->targetX - blinker->startX) * blinker->time / blinker->duration;
419 blinker->y = blinker->targetY - (blinker->targetY - blinker->startY) * blinker->time / blinker->duration;
420 } else {
421 blinker->state = 1;
422 blinker->duration = 0;
423 blinker->time = 0;
424 blinker->x = blinker->targetX;
425 blinker->y = blinker->targetY;
426 }
427}
428
429/* Draws a blinker, its CLUT row changing every four frames */
431 SpriteDrawer drawer;
432 s32 row;
433
434 initSpriteDrawer(&drawer);
435 drawer.setLayerId(0x100, 1);
436 drawer.setTexture(0x340, 0);
437 switch (++blinker->blinkTime >> 2) {
438 default:
439 blinker->blinkTime = 0;
440 /* fallthrough */
441 case 0:
442 row = 0;
443 break;
444 case 1:
445 row = 3;
446 break;
447 case 2:
448 row = 1;
449 break;
450 }
451 drawer.setClutRow(row);
452 drawer.draw(FILE_CACHE.getEntry(FILE_CARDGAME_TIMS << 16 | 3), 8, blinker->x, blinker->y);
453}
454
455/* Moves and draws the twelve blinkers */
457 u32 i;
458 s32 two;
459
460 i = 0;
461 two = 2;
462 for (; i < 12; i++) {
463 if (screen->blinkers[i].state != 0) {
464 if (screen->blinkers[i].state == two) {
465 CARDGAME_moveBlinker(&screen->blinkers[i]);
466 }
467 CARDGAME_drawBlinker(&screen->blinkers[i]);
468 }
469 }
470}
471
472/* Runs and draws both panels and their icons */
474 CARDGAME_updatePanelIcon(screen, items, 0, &screen->panels[0].scale);
475 CARDGAME_updatePanelIcon(screen, items, 1, &screen->panels[1].scale);
476 CARDGAME_slidePanel(&screen->panels[0], items, 0);
477 CARDGAME_slidePanel(&screen->panels[1], items, 1);
478 CARDGAME_drawPanel(&screen->panels[0], items, 0);
479 CARDGAME_drawPanel(&screen->panels[1], items, 1);
480}
CARDGAME.PRO: the card battle (mode 0x700).
CardOffset CARDGAME_panelIconPositions[2][2][2]
CARDGAME_drawPanelIcon's icon and label positions, by SHIFT_PAL_SCREEN and side (EU)
Definition cardgame_3.c:60
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
u8 CARDGAME_panelBarSprites[8][2]
the sprites of the panel's two bars, by LANGUAGE (USA: 1)
Definition cardgame_3.c:40
CardPanelLayout CARDGAME_panelLayouts[2]
the panels' layouts, by side
Definition cardgame_3.c:31
u8 CARDGAME_flag6Frames[]
Definition cardgame_3.c:47
u8 CARDGAME_boxFrames[]
Definition cardgame_3.c:50
u8 CARDGAME_flagIconSprites[]
the sprites of the panel's five flag icons
Definition cardgame_3.c:53
u8 CARDGAME_panelLightCluts[8]
the clut rows of the panel's blinking lights: 0, 1, 2, 3, 2, 1
Definition cardgame_3.c:39
u8 CARDGAME_flagIconFrames[]
Definition cardgame_3.c:56
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
s32 SHIFT_PAL_SCREEN
moves both display areas 0x18 lines down
Definition eu_settings.c:15
s32 LANGUAGE
The European version's settings, in the small data (.sdata) between file/file_table....
Definition eu_settings.c:13
#define TEXT_CARD_GAME
CARDGM: the card battle's.
Definition file.h:202
#define TEXT_FILE(file)
Definition file.h:190
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
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_updateBlinkers(CardScreen *screen, CardScreenItems *items)
Moves and draws the twelve blinkers.
Definition panels.c:456
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
static void drawPanelParts(CardPanel *panel, s32 side, s32 y, s32 imageY)
Draws a side's panel image of its wins, its parts blinking by its flags, and its frame.
Definition panels.c:8
static void slidePanelIn(CardPanel *panel, s32 shownX, s32 shownY, s32 hiddenX, s32 hiddenY, s32 shownBoxX, s32 hiddenBoxX, s32 shownBoxY, s32 hiddenBoxY, s32 shownWinsX, s32 hiddenWinsX, s32 shownWinsY, s32 hiddenWinsY)
Slides a side's whole panel in from its hidden places to its shown ones, where it stays (state 2)
Definition panels.c:184
void CARDGAME_moveBlinker(CardBlinker *blinker)
Moves a blinker towards its target; it stops there (state 1)
Definition panels.c:415
static void slidePanelOut(CardPanel *panel, s32 shownX, s32 shownY, s32 hiddenX, s32 hiddenY, s32 shownBoxX, s32 hiddenBoxX, s32 shownBoxY, s32 hiddenBoxY, s32 shownWinsX, s32 hiddenWinsX, s32 shownWinsY, s32 hiddenWinsY)
Slides a side's whole panel out from its shown places to its hidden ones, where it's gone (state 0)
Definition panels.c:209
void CARDGAME_updatePanels(CardScreen *screen, CardScreenItems *items)
Runs and draws both panels and their icons.
Definition panels.c:473
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
#define FILE_CARDGAME_TIMS
CARDGAME's own pictures, a TIM archive.
Definition screen.h:15
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
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 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
u8 digits
Definition screen.h:81
s16 y
Definition screen.h:76
s16 value
Definition screen.h:74
u8 depth
Definition screen.h:83
s16 x
Definition screen.h:60
s16 y
Definition screen.h:61
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
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
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
s16 time
Definition screen.h:135
s16 duration
Definition screen.h:136
u8 handCount
Definition screen.h:147
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
s32 discardCount
Definition screen.h:151
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
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
The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the ...
Definition screen.h:263
CardBlinker blinkers[12]
Definition screen.h:272
CardPanel panels[2]
Definition screen.h:270
void *(* load)(u32 file)
Definition file.h:92
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
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
void(* setPos)(struct TextWindow *obj, s16 x, s16 y)
Definition text.h:173
void(* setString)()
Definition text.h:165
void(* setVisible)(struct TextWindow *obj, u8 arg)
Definition text.h:177
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