Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
pack_open.c
Go to the documentation of this file.
1/* The screen that opens a card pack from the bag, and the packs' cards */
2
4
5/* Creates the screen's windows and cursor */
7 s32 i;
8
9 for (i = 0; i < 8; i++) {
10 win->packs[i] = createTextWindow(open->layer, 1, (i % 2) * 0x83 + 0x37, (i / 2) * 0xE + 0x39);
11 }
12 win->cursor = createCursor(open->layer, open->depth - 1, 0x1D, 0x39);
13 win->cursor->setVisible(win->cursor, 0);
14 win->page = createTextWindow(open->layer, 1, 0x92, 0x75);
15 win->slash = createTextWindow(open->layer, 1, 0x93, 0x75);
16 win->pages = createTextWindow(open->layer, 1, 0xA6, 0x75);
17 win->prev = createTextWindow(open->layer, 1, 0x2D, 0x71);
18 win->next = createTextWindow(open->layer, 1, 0x102, 0x71);
19 win->name = createTextWindow(open->layer, 1, 0x8F, 0x8A);
20 win->countLabel = createTextWindow(open->layer, 1, 0x10B, 0x8A);
21 win->count = createTextWindow(open->layer, 1, 0x121, 0x8A);
22 win->help[0] = createTextWindow(open->layer, 1, 0x14, 0xC2);
23 win->help[1] = createTextWindow(open->layer, 1, 0x14, 0xD0);
24 win->cardName = createTextWindow(open->layer, 1, 0x88, 0x80);
25 win->pointsLabel = createTextWindow(open->layer, 1, 0x115, 0x80);
26 win->points = createTextWindow(open->layer, 1, 0x126, 0x80);
27 win->cardCountLabel = createTextWindow(open->layer, 1, 0x115, 0xA6);
28 win->cardCount = createTextWindow(open->layer, 1, 0x12C, 0xA6);
29 win->cardText = createTextWindow(open->layer, 1, 0x50, 0x97);
30 win->apLabel = createTextWindow(open->layer, 1, 0xCE, 0x97);
31 win->ap = createTextWindow(open->layer, 1, 0xF0, 0x97);
32 win->hpLabel = createTextWindow(open->layer, 1, 0xCE, 0xA4);
33 win->hp = createTextWindow(open->layer, 1, 0xF0, 0xA4);
34}
35
36/* Shows the page's packs, the page number and the arrows' labels, or hides
37 them */
39 s32 i;
40 s32 index;
41 s32 pack;
42
43 if (show) {
44 for (i = 0; i < 8; i++) {
45 index = open->page * 8 + i;
46 pack = open->packs[index];
47 if (index < open->packCount && pack != 0) {
48 win->packs[i]->setString(win->packs[i], FILE_CACHE.load(TEXT_FILE(TEXT_ITEM_NAMES)), pack);
49 } else {
50 win->packs[i]->setVisible(win->packs[i], 0);
51 }
52 }
53 win->page->setNumber(win->page, 0, open->page + 1);
54 win->page->setRightAlign(win->page, 1);
56 win->pages->setNumber(win->pages, 0, open->pages);
57 win->pages->setRightAlign(win->pages, 1);
58 if (open->pages >= 2) {
59 if (open->page > 0) {
61 } else {
62 win->prev->setVisible(win->prev, 0);
63 }
64 if (open->page < open->pages - 1) {
66 } else {
67 win->next->setVisible(win->next, 0);
68 }
69 }
70 } else {
71 for (i = 0; i < 8; i++) {
72 win->packs[i]->setVisible(win->packs[i], 0);
73 }
74 win->page->setVisible(win->page, 0);
75 win->slash->setVisible(win->slash, 0);
76 win->pages->setVisible(win->pages, 0);
77 win->prev->setVisible(win->prev, 0);
78 win->next->setVisible(win->next, 0);
79 }
80}
81
82/* Shows the name of the pack under the cursor, how many the bag holds and
83 the help, or hides them */
85 s32 pack;
86
87 if (show) {
88 pack = open->packs[open->cursor];
91 win->count->setNumber(win->count, 0, GAME.items[pack]);
92 win->count->setRightAlign(win->count, 1);
93 win->help[0]->setString(win->help[0], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0xF);
95 } else {
96 win->name->setVisible(win->name, 0);
97 win->countLabel->setVisible(win->countLabel, 0);
98 win->count->setVisible(win->count, 0);
99 win->help[0]->setVisible(win->help[0], 0);
100 win->help[1]->setVisible(win->help[1], 0);
101 }
102}
103
104/* Shows the card under the cursor: its name, how many the player has and
105 its numbers or its text, or hides them (also while it hasn't been seen) */
107 CardDrawer drawer;
108 s32 card;
109
110 card = open->cards[open->card];
111 if (GAME.cardsSeen[card] != 0 && show) {
112 initCardDrawer(&drawer);
113 drawer.setCard(card);
116 win->cardCount->setNumber(win->cardCount, 0, GAME.cards[card]);
117 win->cardCount->setRightAlign(win->cardCount, 1);
118 if (drawer.getKind() != 0) {
119 win->pointsLabel->setVisible(win->pointsLabel, 0);
120 win->points->setVisible(win->points, 0);
122 win->apLabel->setVisible(win->apLabel, 0);
123 win->ap->setVisible(win->ap, 0);
124 win->hpLabel->setVisible(win->hpLabel, 0);
125 win->hp->setVisible(win->hp, 0);
126 } else {
128 win->points->setNumber(win->points, 0, drawer.card->points);
129 win->points->setRightAlign(win->points, 1);
130 if (card == 0x45 || card == 0x70 || card == 0x9B || card == 0xC6 || card == 0xF1) {
132 win->apLabel->setVisible(win->apLabel, 0);
133 win->ap->setVisible(win->ap, 0);
134 win->hpLabel->setVisible(win->hpLabel, 0);
135 win->hp->setVisible(win->hp, 0);
136 } else {
137 win->cardText->setVisible(win->cardText, 0);
139 win->ap->setNumber(win->ap, 0, drawer.card->ap);
140 win->ap->setRightAlign(win->ap, 1);
142 win->hp->setNumber(win->hp, 0, drawer.card->hp);
143 win->hp->setRightAlign(win->hp, 1);
144 }
145 }
146 } else {
147 win->cardName->setVisible(win->cardName, 0);
149 win->cardCount->setVisible(win->cardCount, 0);
150 win->pointsLabel->setVisible(win->pointsLabel, 0);
151 win->points->setVisible(win->points, 0);
152 win->cardText->setVisible(win->cardText, 0);
153 win->apLabel->setVisible(win->apLabel, 0);
154 win->ap->setVisible(win->ap, 0);
155 win->hpLabel->setVisible(win->hpLabel, 0);
156 win->hp->setVisible(win->hp, 0);
157 }
158}
159
160/* Draws the screen: the page's packs and the arrows, the pack under the
161 cursor, the help's frame and the card under the cursor */
163 SpriteDrawer sprite;
164 CardDrawer drawer;
165 s32 i;
166 s32 index;
167 s32 pack;
168 s32 card;
169 s32 kind;
170 s32 frame;
171
172 initSpriteDrawer(&sprite);
173 sprite.setTexture(0x280, 0);
174 sprite.setLayerId(open->layer, open->depth);
175 if (open->fades[0].level != 0) {
176 if (open->fades[0].level != ONE) {
177 sprite.setScale(ONE, open->fades[0].level, ONE);
178 sprite.setPivot(0xA0, 0x5C);
179 } else {
180 for (i = 0; i < 8; i++) {
181 index = open->page * 8 + i;
182 pack = open->packs[index];
183 if (index >= open->packCount || pack <= 0) {
184 break;
185 }
186 sprite.setTexture(0x140, 0);
187 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), ITEM_FUNCS.getCategory(pack), (i % 2) * 0x83 + 0x28, (i / 2) * 0xE + 0x39);
188 sprite.setTexture(0x280, 0);
189 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x31, (i % 2) * 0x83 + 0x28, (i / 2) * 0xE + 0x39);
190 }
191 sprite.setTexture(0x280, 0);
192 if (open->pages >= 2) {
193 if (GFX.funcs.getTime() - open->arrowTime >= 11) {
194 if (++open->arrowFrame >= 4) {
195 open->arrowFrame = 0;
196 }
197 }
198 sprite.setClutRow(open->arrowFrame);
199 if (open->page > 0) {
200 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x48, 0x1E, 0x74);
201 }
202 if (open->page < open->pages - 1) {
203 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x47, 0xFD, 0x74);
204 }
205 sprite.setClutRow(0);
206 }
207 }
208 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x2B, 0, 0x32);
209 }
210 if (open->fades[1].level != 0) {
211 if (open->fades[1].level != ONE) {
212 sprite.setScale(open->fades[1].level, ONE, ONE);
213 sprite.setPivot(0x140, 0x8F);
214 } else {
215 sprite.setTexture(0x140, 0);
216 pack = open->packs[open->cursor];
217 sprite.draw(FILE_CACHE.getEntry(FILE_MENU_SPRITES << 16), ITEM_FUNCS.getCategory(pack), 0x80, 0x8A);
218 }
219 sprite.setTexture(0x280, 0);
220 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x2E, 0x79, 0x83);
221 }
222 if (open->fades[2].level != 0) {
223 sprite.setScale(ONE, open->fades[2].level, ONE);
224 if (open->fades[2].level != ONE) {
225 sprite.setPivot(0xA0, 0xCF);
226 }
227 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x2A, 0, 0xBD);
228 }
229 if (open->fades[3].level != 0) {
230 card = open->cards[open->card];
231 initCardDrawer(&drawer);
232 drawer.setCard(card);
233 sprite.setScale(open->fades[3].level, ONE, ONE);
234 if (open->fades[3].level != ONE) {
235 sprite.setPivot(0x140, 0x87);
236 }
237 kind = drawer.getKind();
238 if (kind == 1) {
239 frame = 0x12;
240 } else if (kind == 2) {
241 frame = 0x13;
242 } else {
243 frame = drawer.card->color + 0x13;
244 }
245 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), frame, 0x103, 0x7E);
246 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xD, 0xFC, 0x7C);
247 if (open->fades[3].level != ONE) {
248 sprite.setPivot(0x140, 0x87);
249 }
250 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xA, 0x82, 0x7C);
251 if (open->fades[3].level != ONE) {
252 sprite.setPivot(0x140, 0xAF);
253 }
254 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0x10, 0x103, 0xA4);
255 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xD, 0xFC, 0xA2);
256 if (open->fades[3].level != ONE) {
257 sprite.setPivot(0x140, 0xA5);
258 }
259 if (kind != 0) {
260 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xB, 0x4A, 0x92);
261 } else if (card == 0x45 || card == 0x70 || card == 0x9B || card == 0xC6 || card == 0xF1) {
262 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xB, 0x4A, 0x92);
263 } else {
264 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 0xC, 0xC7, 0x92);
265 }
266 if (open->glowShown != 0) {
267 if (GFX.funcs.getTime() - open->glowTime >= 5) {
268 open->glowTime = GFX.funcs.getTime();
269 if (++open->glowFrame >= 6) {
270 open->glowFrame = 0;
271 }
272 }
273 sprite.setLayerId(open->layer, open->depth - 2);
274 sprite.setClutRow(STCRDSHP_glowRows[open->glowFrame]);
275 sprite.draw(FILE_CACHE.getEntry(FILE_CARDSHOP_SPRITES << 16), 7, open->card * 0x2A + 0x24, 0x44);
276 }
277 }
278}
279
280/* Lists the bag's card packs, and how many pages they fill */
282 s32 count;
283 s32 i;
284
285 count = ITEM_FUNCS.list(1, open->items);
286 open->packCount = 0;
287 for (i = 0; i < count; i++) {
288 if (ITEM_FUNCS.getCategory(open->items[i]) == CARD_PACK_CATEGORY) {
289 open->packs[open->packCount++] = open->items[i];
290 }
291 }
292 if (open->packCount != 0) {
293 open->pages = open->packCount / 8 + (open->packCount % 8 != 0);
294 }
295}
296
297/* The cursor on the page's packs (two columns of four): L1/R1 turn the page,
298 the pad moves it; cross opens the pack, triangle leaves */
300 s32 cursor;
301 s32 first;
302 s32 last;
303
304 first = open->page;
305 if (!PAD_HELD(PAD_R1) && PAD_PRESSED(PAD_L1)) {
306 open->page--;
307 if (open->page < 0) {
308 open->page = 0;
309 }
310 } else if (!PAD_HELD(PAD_L1) && PAD_PRESSED(PAD_R1)) {
311 open->page++;
312 if (open->page > open->pages - 1) {
313 open->page = open->pages - 1;
314 }
315 }
316 if (first != open->page) {
318 open->cursor = open->page * 8;
319 win->cursor->setPos(win->cursor, (open->cursor % 2) * 0x83 + 0x1D, (open->cursor % 8) / 2 * 0xE + 0x39);
321 STCRDSHP_showPack(open, win, 1);
322 return;
323 }
324 last = (first + 1) * 8 - 1;
325 cursor = open->cursor;
326 first *= 8;
327 if (last > open->packCount - 1) {
328 last = open->packCount - 1;
329 }
331 open->cursor -= 2;
332 if (open->cursor < first) {
333 open->cursor = first;
334 }
335 } else if (PAD_PRESSED(PAD_DOWN) || PAD_REPEATED(PAD_DOWN)) {
336 open->cursor += 2;
337 if (open->cursor > last) {
338 open->cursor = last;
339 }
340 }
342 open->cursor--;
343 if (open->cursor < first) {
344 open->cursor = first;
345 }
347 open->cursor++;
348 if (open->cursor > last) {
349 open->cursor = last;
350 }
351 }
352 if (cursor != open->cursor) {
354 win->cursor->setPos(win->cursor, (open->cursor % 2) * 0x83 + 0x1D, (open->cursor % 8) / 2 * 0xE + 0x39);
355 STCRDSHP_showPack(open, win, 1);
356 } else if (PAD_PRESSED(PAD_CROSS)) {
358 open->substate = 10;
359 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
361 open->substate = 50;
362 open->step = 0;
363 }
364}
365
366/* Hides the packs' page and the pack under the cursor and closes their panels;
367 the help says the pack is opened, triangle to go back */
369 STCRDSHP_funcs.startFade(&open->fades[0], 0);
371 STCRDSHP_funcs.startFade(&open->fades[1], 0);
372 STCRDSHP_showPack(open, win, 0);
373 win->cursor->setVisible(win->cursor, 0);
374 win->help[0]->setString(win->help[0], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 0x10);
375 win->help[1]->setString(win->help[1], FILE_CACHE.load(TEXT_FILE(TEXT_CARD_SHOP)), 4);
376 open->substate++;
377}
378
379/* Once the panels have closed (and the last pack's grid has gone): draws the
380 pack's six cards, one of 16 at random for each slot, adds them to the
381 player's and takes the pack from the bag, then lays them out */
383 s32 pack;
384 s32 index;
385 s32 i;
386 s32 slot;
387
388 STCRDSHP_funcs.updateFade(&open->fades[0]);
389 if (STCRDSHP_funcs.updateFade(&open->fades[1])) {
390 pack = open->packs[open->cursor];
391 if (win->grid != NULL) {
392 win->grid->state = TASK_KILL;
393 return;
394 }
395 index = 0;
396 for (i = 0; STCRDSHP_packs[i].item != 0; i++) {
397 if (STCRDSHP_packs[i].item == pack) {
398 index = i;
399 }
400 }
401 for (i = 0; i < 6; i++) {
402 slot = RANDOM.next() % 16;
403 open->cards[i] = STCRDSHP_packs[index].slots[i][slot];
404 GAME.funcs.addCards(open->cards[i], 1);
405 }
406 GAME.items[pack]--;
407 win->grid = STCRDSHP_createGrid(open->shop, open->cards);
408 open->card = 0;
409 STCRDSHP_funcs.startFade(&open->fades[3], 1);
410 open->substate++;
411 }
412}
413
414/* The cursor on the cards drawn: left/right show each one; triangle closes
415 them */
417 s32 old;
418
419 old = open->card;
421 open->card--;
422 if (open->card < 0) {
423 open->card = 0;
424 }
426 open->card++;
427 if (open->card >= 6) {
428 open->card = 5;
429 }
430 }
431 if (old != open->card) {
434 } else if (PAD_PRESSED(PAD_TRIANGLE)) {
436 open->substate = 50;
437 open->glowShown = 0;
438 open->step = 1;
439 }
440}
441
442/* Leaving, once the help's panel has closed: hides the packs' page and the
443 pack under the cursor and closes their panels */
445 if (STCRDSHP_funcs.updateFade(&open->fades[2])) {
446 STCRDSHP_funcs.startFade(&open->fades[0], 0);
448 STCRDSHP_funcs.startFade(&open->fades[1], 0);
449 STCRDSHP_showPack(open, win, 0);
450 win->cursor->setVisible(win->cursor, 0);
451 open->substate++;
452 }
453}
454
455/* The states of the screen that opens a pack: its fades, the page and
456 cursor, and the grid of cards a pack gives */
458 s32 i;
459 s32 end;
460 s32 top;
461
462 switch (open->substate) {
463 case 0:
464 default:
465 STCRDSHP_funcs.startFade(&open->fades[0], 1);
466 open->substate++;
467 break;
468 case 1:
469 if (STCRDSHP_funcs.updateFade(&open->fades[0])) {
471 STCRDSHP_funcs.startFade(&open->fades[1], 1);
472 STCRDSHP_funcs.startFade(&open->fades[2], 1);
473 open->substate++;
474 }
475 break;
476 case 2:
477 STCRDSHP_funcs.updateFade(&open->fades[2]);
478 if (STCRDSHP_funcs.updateFade(&open->fades[1])) {
479 STCRDSHP_showPack(open, win, 1);
480 win->cursor->setPos(win->cursor, (open->cursor % 2) * 0x83 + 0x1D, (open->cursor % 8) / 2 * 0xE + 0x39);
481 win->cursor->setVisible(win->cursor, 1);
482 open->substate++;
483 }
484 break;
485 case 3:
486 open->substate++;
487 break;
488 case 4:
490 break;
491 case 10:
493 break;
494 case 11:
496 break;
497 case 12:
498 if (STCRDSHP_funcs.updateFade(&open->fades[3])) {
500 if (win->grid->state == TASK_RUN) {
501 open->glowShown = 1;
502 open->substate++;
503 }
504 }
505 break;
506 case 13:
508 break;
509 case 50:
510 STCRDSHP_funcs.startFade(&open->fades[2], 0);
511 win->help[0]->setVisible(win->help[0], 0);
512 win->help[1]->setVisible(win->help[1], 0);
513 if (open->step == 0) {
514 open->substate = 55;
515 } else {
516 open->substate++;
517 }
518 break;
519 case 51:
520 if (STCRDSHP_funcs.updateFade(&open->fades[2])) {
521 STCRDSHP_funcs.startFade(&open->fades[3], 0);
523 win->grid->hide(win->grid);
524 open->substate++;
525 }
526 break;
527 case 52:
528 if (STCRDSHP_funcs.updateFade(&open->fades[3]) || win->grid == NULL) {
529 /* The match depends on the page's rows: the first in a variable
530 of its own, and the last as (page + 1) * 8 - 1, as
531 STCRDSHP_choosePack writes it, which shifts the page twice
532 (top + 7 doesn't). */
533 open->substate = 0;
534 top = open->page * 8;
535 end = (open->page + 1) * 8 - 1;
536 i = open->packs[open->cursor];
538 if (end > open->packCount - 1) {
539 end = open->packCount - 1;
540 }
541 if (GAME.items[i] <= 0) {
542 i = open->packs[open->cursor];
543 if (GAME.items[i] <= 0) {
544 open->cursor--;
545 if (open->cursor < top) {
546 open->page--;
547 if (open->page >= 0) {
548 open->cursor = end;
549 } else {
550 open->state = TASK_KILL;
551 }
552 }
553 }
554 }
555 }
556 break;
557 case 55:
559 break;
560 case 56:
561 STCRDSHP_funcs.updateFade(&open->fades[0]);
562 if (STCRDSHP_funcs.updateFade(&open->fades[1])) {
563 open->substate = 60;
564 }
565 break;
566 case 60:
567 open->state = TASK_KILL;
568 break;
569 }
570}
571
572/* The update of the screen to open a pack */
574 switch (open->state) {
575 case TASK_INIT:
576 default:
577 open->nextState(open);
579 open->fades[3].duration = 10;
580 open->fades[2].duration = 10;
581 open->fades[0].duration = 10;
582 open->fades[1].duration = 10;
584 break;
585 case TASK_RUN:
588 break;
589 case TASK_DONE:
590 case TASK_KILL:
591 break;
592 }
593}
594
595/* Creates the screen to open a pack */
598
599 open->layer = SCREEN_LAYER;
600 open->depth = 6;
601 open->shop = shop;
602 return open;
603}
604
605/* The cards each slot of a pack draws one of, 16 each (STCRDSHP_packs) */
607 { 101, 101, 101, 138, 139, 139, 139, 139,
608 184, 184, 184, 184, 225, 225, 225, 225 },
609 { 57, 57, 57, 58, 58, 58, 186, 186,
610 230, 230, 311, 311, 311, 312, 312, 312 },
611 { 99, 99, 103, 103, 144, 144, 186, 186,
612 230, 230, 232, 232, 271, 271, 272, 272 },
613 { 99, 103, 144, 144, 146, 146, 189, 189,
614 232, 232, 271, 271, 272, 272, 275, 275 },
615 { 144, 144, 144, 146, 146, 189, 189, 232,
616 232, 271, 271, 272, 272, 272, 275, 275 },
617 { 146, 146, 146, 146, 189, 189, 189, 189,
618 232, 232, 232, 232, 275, 275, 275, 275 },
619 { 100, 100, 100, 141, 141, 141, 182, 182,
620 182, 227, 227, 227, 228, 228, 228, 266 },
621 { 59, 59, 100, 142, 142, 142, 187, 187,
622 187, 187, 268, 270, 313, 313, 313, 313 },
623 { 59, 59, 142, 142, 187, 187, 228, 268,
624 268, 268, 270, 270, 270, 313, 313, 313 },
625 { 53, 53, 53, 53, 231, 231, 231, 231,
626 273, 273, 273, 273, 314, 314, 314, 314 },
627 { 102, 102, 143, 143, 145, 145, 188, 188,
628 231, 231, 273, 273, 274, 274, 314, 314 },
629 { 102, 102, 102, 143, 143, 143, 145, 145,
630 145, 145, 188, 188, 188, 274, 274, 274 },
631 { 96, 96, 96, 140, 140, 140, 185, 185,
632 226, 226, 226, 229, 229, 229, 254, 295 },
633 { 60, 60, 60, 136, 136, 136, 178, 178,
634 178, 185, 264, 264, 264, 265, 265, 265 },
635 { 97, 97, 97, 97, 97, 136, 136, 136,
636 178, 178, 178, 229, 264, 264, 265, 265 },
637 { 55, 55, 93, 93, 93, 95, 95, 95,
638 95, 181, 181, 181, 223, 223, 223, 223 },
639 { 55, 55, 98, 98, 98, 98, 138, 138,
640 138, 224, 224, 224, 269, 269, 269, 269 },
641 { 93, 93, 95, 95, 98, 98, 138, 138,
642 181, 181, 223, 223, 224, 224, 269, 269 },
643 { 47, 47, 47, 83, 83, 83, 91, 91,
644 91, 129, 129, 129, 220, 220, 220, 220 },
645 { 24, 24, 24, 24, 24, 56, 56, 56,
646 130, 130, 130, 130, 220, 299, 299, 299 },
647 { 56, 87, 87, 87, 87, 130, 130, 130,
648 173, 173, 173, 259, 259, 259, 259, 299 },
649 { 24, 24, 51, 51, 51, 52, 52, 52,
650 87, 137, 137, 137, 173, 259, 300, 300 },
651 { 94, 94, 94, 137, 137, 179, 179, 179,
652 180, 180, 180, 222, 222, 222, 300, 300 },
653 { 51, 51, 52, 52, 94, 94, 137, 137,
654 179, 179, 180, 180, 222, 222, 300, 300 },
655 { 44, 44, 81, 81, 81, 126, 126, 126,
656 175, 175, 175, 175, 218, 218, 218, 218 },
657 { 30, 30, 81, 85, 85, 85, 174, 174,
658 174, 175, 216, 216, 216, 218, 257, 257 },
659 { 30, 85, 85, 85, 85, 174, 174, 174,
660 174, 216, 216, 216, 216, 257, 257, 257 },
661 { 12, 12, 12, 12, 18, 18, 18, 18,
662 54, 54, 54, 54, 267, 267, 267, 267 },
663 { 12, 18, 54, 54, 134, 134, 134, 134,
664 221, 221, 221, 221, 266, 266, 266, 266 },
665 { 12, 18, 267, 267, 308, 308, 308, 308,
666 309, 309, 309, 309, 310, 310, 310, 310 },
667 { 10, 10, 10, 80, 80, 80, 80, 125,
668 125, 125, 168, 168, 168, 210, 210, 210 },
669 { 43, 43, 43, 43, 43, 50, 50, 50,
670 50, 50, 125, 168, 212, 212, 212, 212 },
671 { 84, 84, 84, 84, 84, 212, 215, 215,
672 215, 215, 215, 258, 258, 258, 258, 258 },
673 { 6, 6, 86, 86, 219, 219, 219, 263,
674 263, 263, 306, 306, 306, 307, 307, 307 },
675 { 6, 6, 6, 11, 11, 17, 17, 86,
676 86, 86, 92, 92, 92, 219, 219, 219 },
677 { 11, 11, 11, 17, 17, 17, 92, 92,
678 92, 263, 263, 306, 306, 307, 307, 307 },
679 { 48, 48, 49, 49, 49, 167, 167, 167,
680 167, 167, 209, 209, 252, 252, 252, 252 },
681 { 15, 15, 15, 42, 42, 128, 128, 128,
682 128, 214, 214, 214, 214, 298, 298, 298 },
683 { 82, 82, 128, 128, 128, 128, 214, 214,
684 214, 214, 253, 253, 253, 298, 298, 298 },
685 { 135, 135, 135, 170, 170, 170, 177, 177,
686 177, 262, 262, 262, 303, 303, 305, 305 },
687 { 23, 23, 23, 29, 29, 29, 170, 170,
688 170, 170, 262, 262, 305, 305, 305, 305 },
689 { 23, 23, 23, 29, 29, 29, 135, 135,
690 177, 177, 177, 177, 303, 303, 303, 303 },
691 { 16, 16, 16, 22, 22, 38, 38, 169,
692 169, 169, 208, 208, 208, 208, 211, 211 },
693 { 3, 3, 3, 3, 3, 16, 122, 122,
694 122, 124, 124, 124, 169, 213, 213, 213 },
695 { 46, 46, 46, 46, 46, 122, 122, 122,
696 124, 124, 124, 208, 208, 213, 213, 213 },
697 { 5, 5, 5, 5, 88, 88, 88, 254,
698 254, 254, 295, 295, 295, 304, 304, 304 },
699 { 5, 5, 5, 5, 90, 90, 90, 132,
700 132, 132, 254, 254, 254, 304, 304, 304 },
701 { 5, 5, 5, 5, 90, 90, 90, 132,
702 132, 132, 261, 261, 261, 302, 302, 302 },
703 { 21, 28, 41, 41, 41, 45, 45, 45,
704 75, 75, 75, 75, 202, 202, 202, 202 },
705 { 21, 27, 27, 28, 79, 79, 79, 79,
706 164, 164, 164, 164, 294, 294, 294, 294 },
707 { 27, 27, 121, 121, 121, 121, 171, 171,
708 172, 172, 293, 293, 293, 293, 294, 294 },
709 { 79, 164, 171, 171, 171, 171, 172, 172,
710 176, 176, 176, 176, 217, 217, 217, 217 },
711 { 89, 89, 89, 89, 121, 133, 133, 133,
712 260, 260, 260, 293, 301, 301, 301, 301 },
713 { 89, 89, 89, 133, 133, 133, 133, 176,
714 176, 217, 217, 260, 260, 301, 301, 301 },
715 { 9, 9, 9, 14, 14, 113, 113, 113,
716 113, 158, 158, 158, 160, 160, 160, 160 },
717 { 4, 4, 4, 4, 113, 160, 249, 249,
718 249, 249, 249, 287, 287, 287, 287, 287 },
719 { 74, 74, 74, 74, 78, 78, 165, 165,
720 203, 203, 203, 203, 206, 250, 250, 250 },
721 { 78, 78, 78, 78, 127, 127, 127, 255,
722 255, 255, 296, 296, 296, 297, 297, 297 },
723 { 131, 131, 131, 206, 206, 206, 206, 255,
724 255, 255, 256, 256, 256, 296, 296, 296 },
725 { 127, 127, 127, 131, 131, 131, 165, 165,
726 165, 165, 256, 256, 256, 297, 297, 297 },
727 { 26, 26, 67, 67, 110, 110, 110, 110,
728 115, 115, 115, 115, 157, 157, 157, 157 },
729 { 2, 2, 2, 36, 36, 36, 36, 73,
730 73, 73, 152, 152, 204, 204, 204, 204 },
731 { 154, 154, 154, 154, 161, 161, 161, 161,
732 161, 161, 205, 205, 205, 205, 205, 205 },
733 { 2, 77, 77, 77, 120, 120, 120, 207,
734 207, 207, 251, 251, 251, 290, 290, 290 },
735 { 120, 120, 120, 123, 123, 123, 154, 166,
736 166, 166, 207, 207, 207, 290, 290, 290 },
737 { 77, 77, 77, 77, 123, 123, 123, 123,
738 166, 166, 166, 166, 251, 251, 251, 251 },
739 { 8, 72, 72, 72, 72, 116, 116, 116,
740 116, 116, 199, 199, 201, 201, 201, 201 },
741 { 20, 20, 20, 71, 71, 111, 111, 111,
742 111, 111, 153, 153, 284, 284, 284, 284 },
743 { 37, 37, 37, 111, 111, 111, 111, 111,
744 153, 153, 153, 153, 153, 284, 284, 284 },
745 { 76, 76, 117, 162, 162, 162, 162, 247,
746 247, 247, 247, 286, 286, 286, 286, 289 },
747 { 118, 118, 118, 118, 162, 162, 163, 163,
748 163, 163, 247, 286, 291, 291, 291, 291 },
749 { 76, 76, 76, 76, 117, 117, 117, 117,
750 118, 118, 163, 289, 289, 289, 289, 291 },
751 { 40, 40, 40, 148, 148, 148, 148, 191,
752 191, 191, 191, 193, 193, 281, 281, 281 },
753 { 70, 70, 70, 148, 148, 156, 156, 156,
754 191, 191, 200, 200, 200, 285, 285, 285 },
755 { 109, 109, 109, 156, 156, 156, 156, 280,
756 280, 282, 282, 282, 285, 285, 285, 285 },
757 { 70, 114, 114, 114, 114, 114, 242, 242,
758 242, 242, 248, 248, 248, 248, 248, 248 },
759 { 159, 159, 159, 159, 159, 200, 243, 243,
760 243, 243, 246, 246, 246, 246, 246, 246 },
761 { 114, 114, 119, 119, 119, 119, 119, 159,
762 159, 246, 248, 288, 288, 288, 288, 288 },
763 { 63, 63, 63, 64, 64, 105, 105, 105,
764 105, 105, 149, 149, 149, 149, 149, 192 },
765 { 39, 39, 106, 106, 106, 106, 150, 150,
766 150, 194, 194, 194, 196, 196, 196, 196 },
767 { 66, 66, 66, 106, 106, 106, 196, 196,
768 196, 279, 279, 279, 283, 283, 283, 283 },
769 { 239, 239, 239, 240, 240, 240, 244, 244,
770 244, 244, 245, 245, 245, 292, 292, 292 },
771 { 68, 68, 68, 108, 108, 108, 244, 244,
772 244, 245, 245, 245, 245, 292, 292, 292 },
773 { 244, 244, 244, 244, 245, 245, 245, 245,
774 283, 283, 292, 292, 292, 292, 292, 292 },
775 { 61, 62, 62, 62, 62, 62, 104, 104,
776 104, 104, 104, 147, 147, 190, 190, 233 },
777 { 65, 65, 65, 65, 276, 276, 276, 277,
778 277, 277, 278, 278, 278, 278, 278, 278 },
779 { 234, 234, 234, 234, 235, 235, 235, 236,
780 236, 236, 236, 236, 237, 237, 238, 238 },
781 { 107, 107, 107, 107, 151, 151, 151, 151,
782 195, 195, 195, 195, 197, 197, 197, 197 },
783 { 151, 151, 151, 195, 195, 195, 237, 237,
784 237, 237, 237, 237, 237, 278, 278, 278 },
785 { 107, 107, 107, 197, 197, 197, 238, 238,
786 238, 238, 238, 238, 238, 278, 278, 278 },
787 { 100, 100, 100, 136, 139, 139, 140, 140,
788 140, 225, 225, 225, 228, 228, 228, 264 },
789 { 100, 100, 101, 101, 141, 141, 146, 146,
790 189, 189, 227, 227, 228, 228, 275, 275 },
791 { 57, 57, 59, 97, 97, 103, 103, 142,
792 142, 186, 186, 268, 268, 311, 311, 312 },
793 { 59, 59, 103, 103, 145, 145, 145, 146,
794 146, 189, 189, 268, 268, 268, 312, 312 },
795 { 102, 102, 138, 143, 143, 145, 145, 146,
796 146, 188, 188, 189, 189, 274, 274, 275 },
797 { 102, 102, 143, 143, 145, 145, 146, 146,
798 188, 188, 189, 189, 274, 274, 275, 275 },
799 { 43, 43, 44, 56, 56, 84, 84, 125,
800 125, 126, 259, 259, 270, 270, 270, 270 },
801 { 30, 30, 30, 56, 56, 83, 91, 91,
802 129, 129, 130, 130, 130, 258, 258, 258 },
803 { 12, 12, 43, 84, 137, 137, 137, 137,
804 144, 144, 259, 263, 263, 263, 263, 270 },
805 { 11, 12, 12, 53, 53, 134, 137, 137,
806 144, 144, 263, 271, 271, 307, 314, 314 },
807 { 11, 11, 12, 12, 53, 134, 134, 137,
808 137, 144, 263, 263, 271, 307, 307, 314 },
809 { 11, 11, 12, 53, 53, 134, 137, 144,
810 144, 263, 263, 271, 271, 307, 307, 314 },
811 { 96, 96, 182, 182, 183, 183, 183, 184,
812 184, 184, 185, 185, 226, 226, 229, 229 },
813 { 24, 24, 93, 93, 93, 95, 95, 95,
814 181, 181, 181, 183, 183, 184, 185, 229 },
815 { 58, 60, 99, 99, 99, 178, 178, 178,
816 187, 230, 230, 230, 265, 265, 265, 313 },
817 { 24, 55, 58, 58, 60, 60, 187, 187,
818 232, 232, 269, 269, 272, 272, 313, 313 },
819 { 24, 55, 93, 93, 95, 95, 181, 181,
820 223, 223, 232, 232, 269, 269, 272, 272 },
821 { 24, 55, 93, 93, 95, 95, 181, 181,
822 223, 223, 232, 232, 269, 269, 272, 272 },
823 { 47, 47, 48, 168, 168, 175, 175, 183,
824 183, 183, 210, 210, 218, 218, 220, 220 },
825 { 18, 18, 47, 47, 48, 92, 92, 92,
826 183, 183, 220, 220, 222, 222, 267, 267 },
827 { 50, 50, 87, 87, 87, 173, 173, 173,
828 212, 214, 214, 257, 298, 298, 299, 299 },
829 { 50, 50, 87, 87, 173, 173, 179, 179,
830 179, 222, 222, 224, 257, 257, 257, 267 },
831 { 17, 17, 98, 98, 179, 179, 222, 222,
832 224, 224, 231, 231, 267, 267, 273, 273 },
833 { 17, 17, 18, 18, 23, 23, 29, 29,
834 92, 92, 179, 179, 222, 222, 267, 267 },
835 { 10, 10, 15, 15, 42, 42, 49, 49,
836 128, 128, 209, 209, 252, 252, 253, 253 },
837 { 80, 80, 81, 81, 82, 82, 85, 85,
838 174, 174, 184, 184, 216, 216, 229, 229 },
839 { 15, 42, 42, 42, 82, 82, 85, 85,
840 128, 128, 174, 174, 216, 216, 253, 253 },
841 { 6, 51, 52, 54, 135, 135, 135, 300,
842 300, 300, 303, 303, 303, 310, 310, 310 },
843 { 6, 6, 6, 52, 52, 52, 135, 135,
844 300, 303, 306, 306, 309, 309, 310, 310 },
845 { 51, 51, 52, 52, 54, 54, 300, 300,
846 303, 303, 306, 306, 309, 309, 310, 310 },
847 { 16, 16, 22, 22, 96, 96, 96, 160,
848 169, 169, 182, 182, 182, 211, 226, 226 },
849 { 3, 3, 96, 164, 164, 169, 169, 169,
850 182, 208, 208, 226, 226, 226, 293, 294 },
851 { 3, 3, 164, 164, 164, 208, 208, 208,
852 213, 215, 293, 293, 293, 294, 294, 294 },
853};
854#if VERSION_US
855/* 19 cards in the USA version, of which the slot only draws from the first 16 */
857 86, 86, 86, 170, 170, 170, 213, 213,
858 215, 215, 226, 226, 226, 295, 295, 295,
859 304, 304, 304,
860};
861#elif VERSION_EU || VERSION_JP
863 86, 86, 170, 170, 170, 213, 213, 215,
864 215, 226, 226, 226, 295, 295, 304, 304,
865};
866#endif
868 { 86, 86, 88, 88, 94, 94, 170, 170,
869 177, 177, 180, 180, 219, 219, 221, 221 },
870 { 88, 88, 94, 94, 177, 177, 180, 180,
871 219, 219, 221, 221, 295, 295, 304, 304 },
872 { 9, 9, 27, 27, 75, 75, 79, 79,
873 79, 113, 113, 122, 122, 122, 249, 249 },
874 { 38, 38, 45, 45, 46, 46, 46, 121,
875 121, 124, 124, 124, 167, 167, 185, 185 },
876 { 27, 27, 27, 46, 46, 46, 79, 79,
877 121, 121, 122, 122, 124, 124, 249, 249 },
878 { 5, 132, 254, 261, 262, 262, 262, 266,
879 266, 266, 305, 305, 305, 308, 308, 308 },
880 { 5, 5, 5, 132, 132, 132, 254, 254,
881 254, 261, 261, 261, 262, 266, 305, 308 },
882 { 5, 5, 132, 132, 133, 133, 254, 254,
883 260, 260, 261, 261, 262, 262, 305, 305 },
884 { 8, 71, 71, 71, 72, 72, 72, 110,
885 115, 115, 115, 115, 116, 116, 116, 116 },
886 { 2, 2, 20, 20, 20, 36, 36, 36,
887 37, 37, 111, 111, 115, 116, 205, 205 },
888 { 2, 2, 20, 20, 36, 36, 123, 123,
889 127, 127, 131, 131, 205, 205, 255, 255 },
890 { 77, 77, 77, 78, 120, 120, 120, 123,
891 123, 123, 127, 131, 255, 290, 290, 290 },
892 { 77, 77, 77, 78, 78, 78, 120, 120,
893 120, 123, 127, 131, 255, 290, 290, 290 },
894 { 77, 78, 78, 78, 120, 123, 127, 127,
895 127, 131, 131, 131, 255, 255, 255, 290 },
896 { 14, 21, 21, 21, 28, 28, 28, 41,
897 41, 41, 158, 158, 158, 202, 202, 202 },
898 { 21, 89, 89, 90, 90, 158, 176, 176,
899 176, 202, 217, 217, 217, 301, 301, 301 },
900 { 4, 4, 4, 74, 74, 74, 203, 203,
901 203, 250, 250, 250, 287, 287, 301, 302 },
902 { 4, 74, 89, 89, 89, 90, 90, 90,
903 171, 171, 176, 176, 176, 217, 217, 250 },
904 { 89, 89, 89, 90, 171, 172, 176, 176,
905 176, 217, 217, 217, 301, 301, 301, 302 },
906 { 89, 90, 90, 90, 171, 171, 171, 172,
907 172, 172, 176, 217, 301, 302, 302, 302 },
908 { 26, 26, 73, 73, 73, 73, 152, 152,
909 157, 157, 157, 157, 201, 201, 201, 201 },
910 { 73, 73, 166, 166, 166, 199, 256, 256,
911 256, 256, 296, 296, 296, 297, 297, 297 },
912 { 153, 153, 154, 154, 157, 161, 161, 161,
913 204, 204, 204, 207, 207, 207, 284, 284 },
914 { 165, 165, 166, 166, 166, 201, 206, 206,
915 251, 251, 256, 256, 296, 296, 297, 297 },
916 { 165, 165, 165, 166, 206, 206, 206, 207,
917 207, 207, 251, 251, 251, 256, 296, 297 },
918 { 165, 166, 166, 166, 206, 207, 251, 256,
919 256, 256, 296, 296, 296, 297, 297, 297 },
920 { 21, 21, 21, 21, 148, 148, 148, 158,
921 158, 158, 158, 193, 202, 202, 202, 202 },
922 { 21, 158, 159, 159, 159, 162, 162, 162,
923 202, 202, 242, 242, 242, 248, 248, 248 },
924 { 76, 76, 80, 80, 156, 156, 163, 163,
925 200, 200, 209, 209, 252, 252, 280, 280 },
926 { 76, 76, 80, 80, 159, 159, 162, 162,
927 163, 163, 209, 209, 242, 248, 252, 252 },
928 { 159, 159, 159, 159, 242, 242, 242, 242,
929 248, 248, 248, 248, 286, 288, 288, 289 },
930 { 76, 162, 163, 163, 286, 286, 286, 286,
931 288, 288, 288, 288, 289, 289, 289, 289 },
932 { 67, 70, 70, 70, 73, 73, 73, 109,
933 109, 201, 201, 281, 281, 285, 285, 285 },
934 { 40, 40, 41, 41, 81, 81, 81, 115,
935 115, 115, 178, 178, 191, 282, 282, 282 },
936 { 70, 70, 70, 73, 73, 73, 115, 115,
937 115, 117, 118, 119, 285, 285, 285, 291 },
938 { 114, 114, 117, 117, 118, 118, 119, 119,
939 243, 243, 246, 246, 247, 247, 291, 291 },
940 { 58, 58, 99, 99, 114, 114, 178, 178,
941 243, 243, 246, 246, 246, 247, 247, 247 },
942 { 58, 58, 99, 117, 117, 117, 118, 118,
943 118, 119, 119, 119, 178, 291, 291, 291 },
944 { 14, 28, 28, 28, 28, 28, 63, 63,
945 63, 63, 64, 105, 105, 105, 105, 199 },
946 { 28, 28, 63, 63, 66, 66, 66, 105,
947 105, 108, 108, 194, 194, 194, 239, 239 },
948 { 66, 66, 72, 72, 72, 106, 106, 110,
949 110, 116, 116, 116, 194, 194, 279, 279 },
950 { 2, 2, 4, 4, 4, 36, 36, 72,
951 72, 72, 106, 110, 116, 116, 116, 279 },
952 { 2, 4, 36, 74, 74, 74, 205, 244,
953 244, 244, 250, 250, 250, 292, 292, 292 },
954 { 2, 2, 2, 4, 4, 4, 36, 36,
955 36, 74, 205, 205, 205, 244, 250, 292 },
956 { 39, 147, 149, 149, 149, 149, 149, 149,
957 157, 157, 157, 157, 157, 157, 192, 233 },
958 { 10, 10, 10, 149, 150, 150, 152, 152,
959 157, 157, 196, 196, 236, 236, 277, 277 },
960 { 10, 10, 150, 152, 152, 187, 187, 187,
961 196, 196, 230, 230, 230, 236, 277, 277 },
962 { 68, 68, 151, 151, 197, 197, 237, 237,
963 240, 240, 245, 245, 245, 283, 283, 283 },
964 { 60, 68, 68, 68, 187, 230, 240, 240,
965 240, 245, 245, 245, 283, 283, 283, 313 },
966 { 60, 151, 151, 151, 187, 197, 197, 197,
967 230, 237, 237, 237, 240, 240, 240, 313 },
968 { 8, 26, 61, 62, 62, 62, 62, 62,
969 62, 104, 104, 104, 104, 104, 104, 190 },
970 { 9, 9, 49, 49, 49, 62, 65, 65,
971 65, 104, 234, 234, 235, 235, 276, 276 },
972 { 9, 9, 49, 49, 65, 65, 65, 71,
973 71, 203, 234, 234, 234, 276, 276, 287 },
974 { 107, 107, 111, 111, 111, 111, 195, 195,
975 238, 238, 265, 265, 265, 265, 278, 278 },
976 { 20, 20, 20, 20, 37, 37, 37, 37,
977 107, 107, 195, 195, 238, 238, 278, 278 },
978 { 20, 20, 37, 37, 111, 111, 111, 111,
979 203, 203, 265, 265, 265, 265, 287, 287 },
980 { 96, 96, 96, 96, 183, 183, 183, 185,
981 185, 185, 227, 227, 227, 228, 228, 228 },
982 { 101, 101, 101, 139, 139, 139, 139, 184,
983 184, 184, 226, 226, 226, 229, 229, 229 },
984 { 100, 100, 100, 140, 140, 140, 141, 141,
985 141, 182, 182, 182, 182, 225, 225, 225 },
986 { 100, 100, 100, 141, 141, 141, 182, 182,
987 182, 183, 183, 183, 225, 225, 225, 225 },
988 { 101, 101, 101, 139, 139, 139, 184, 184,
989 184, 226, 226, 226, 226, 229, 229, 229 },
990 { 96, 96, 96, 140, 140, 140, 185, 185,
991 185, 227, 227, 227, 227, 228, 228, 228 },
992 { 44, 44, 91, 91, 91, 91, 125, 125,
993 125, 126, 126, 126, 126, 129, 129, 129 },
994 { 10, 10, 10, 10, 80, 80, 80, 81,
995 81, 81, 175, 175, 175, 218, 218, 218 },
996 { 47, 47, 47, 47, 91, 91, 91, 126,
997 126, 126, 168, 168, 168, 220, 220, 220 },
998 { 10, 10, 10, 81, 81, 81, 83, 83,
999 83, 210, 210, 210, 210, 218, 218, 218 },
1000 { 47, 47, 47, 125, 125, 125, 125, 129,
1001 129, 129, 168, 168, 168, 220, 220, 220 },
1002 { 80, 80, 80, 80, 83, 83, 83, 83,
1003 175, 175, 175, 175, 210, 210, 210, 210 },
1004 { 28, 28, 28, 28, 38, 38, 38, 38,
1005 45, 45, 45, 45, 49, 49, 49, 49 },
1006 { 16, 16, 16, 16, 16, 16, 41, 41,
1007 41, 41, 41, 41, 41, 41, 41, 41 },
1008 { 21, 21, 21, 21, 22, 22, 22, 22,
1009 22, 22, 48, 48, 48, 48, 48, 48 },
1010 { 75, 75, 75, 75, 75, 75, 75, 75,
1011 202, 202, 202, 202, 202, 202, 202, 202 },
1012 { 167, 167, 169, 169, 209, 209, 209, 209,
1013 209, 211, 211, 211, 211, 211, 252, 252 },
1014 { 167, 167, 167, 167, 169, 169, 169, 169,
1015 209, 209, 211, 211, 252, 252, 252, 252 },
1016 { 8, 8, 8, 8, 14, 14, 14, 14,
1017 14, 14, 26, 26, 26, 26, 26, 26 },
1018 { 67, 67, 67, 67, 72, 72, 113, 113,
1019 113, 113, 115, 115, 157, 157, 201, 201 },
1020 { 73, 73, 73, 110, 110, 116, 116, 116,
1021 152, 152, 158, 158, 158, 160, 160, 160 },
1022 { 71, 71, 72, 72, 72, 113, 113, 113,
1023 115, 115, 115, 199, 199, 201, 201, 201 },
1024 { 9, 9, 72, 72, 72, 110, 110, 113,
1025 113, 113, 115, 115, 115, 201, 201, 201 },
1026 { 9, 9, 73, 73, 73, 110, 110, 116,
1027 116, 116, 157, 157, 157, 158, 158, 158 },
1028 { 39, 39, 39, 40, 40, 40, 105, 105,
1029 105, 191, 191, 191, 281, 281, 281, 281 },
1030 { 61, 61, 61, 105, 105, 105, 149, 149,
1031 149, 192, 192, 192, 281, 281, 281, 281 },
1032 { 62, 62, 62, 104, 104, 104, 148, 148,
1033 148, 233, 233, 233, 281, 281, 281, 281 },
1034 { 63, 63, 63, 147, 147, 147, 149, 149,
1035 149, 190, 190, 190, 281, 281, 281, 281 },
1036 { 63, 63, 63, 64, 64, 64, 191, 191,
1037 191, 193, 193, 193, 281, 281, 281, 281 },
1038 { 40, 40, 40, 62, 62, 62, 104, 104,
1039 104, 148, 148, 148, 281, 281, 281, 281 },
1040};
1112 { 0, { NULL } },
1113};
1114/* The CLUT rows of the glow around the card drawn last */
1116 0, 1, 2, 3,
1117 2, 1,
1118};
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
CardPackGrid * STCRDSHP_createGrid(CardShop *owner, s32 *cards)
Creates the grid of six cards, copying the cards given.
Definition card_grid.c:208
STCRDSHP.PRO: the card packs (mode 0x1300).
#define CARD_PACK_CATEGORY
getItemCategory's value for the card packs (the item type 28)
Definition card_packs.h:25
#define FILE_CARDSHOP_SPRITES
The sprite sheet of the screen, the shop's textures and the card data (five files,...
Definition card_packs.h:34
CardShopFuncs STCRDSHP_funcs
The shops' helpers.
Definition shop.c:440
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
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_CARD_NAMES
CARDNM.
Definition file.h:203
#define TEXT_CARD_EFFECTS
CARDST.
Definition file.h:204
#define TEXT_FILE(file)
Definition file.h:190
#define TEXT_ITEM_NAMES
ITMNAM.
Definition file.h:215
#define FILE_MENU_SPRITES
Files the engine loads by number.
Definition file.h:188
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
long open(char *name, unsigned long mode)
The kernel's file functions (libapi.h); the sim: device is the PC's.
#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
ItemFuncs ITEM_FUNCS
Definition items.c:890
void STCRDSHP_listPacks(CardPackOpen *open)
Lists the bag's card packs, and how many pages they fill.
Definition pack_open.c:281
static void STCRDSHP_openPack(CardPackOpen *open, CardPackOpenWindows *win)
Once the panels have closed (and the last pack's grid has gone): draws the pack's six cards,...
Definition pack_open.c:382
void STCRDSHP_createPackOpenWindows(CardPackOpen *open, CardPackOpenWindows *win)
Creates the screen's windows and cursor.
Definition pack_open.c:6
static void STCRDSHP_closePackList(CardPackOpen *open, CardPackOpenWindows *win)
Hides the packs' page and the pack under the cursor and closes their panels; the help says the pack i...
Definition pack_open.c:368
CardPackOpen * STCRDSHP_createPackOpen(CardShop *shop)
Creates the screen to open a pack.
Definition pack_open.c:596
s32 STCRDSHP_glowRows[]
The CLUT rows of the glow around the card drawn last.
Definition pack_open.c:1115
void STCRDSHP_runPackOpen(CardPackOpen *open, CardPackOpenWindows *win)
The states of the screen that opens a pack: its fades, the page and cursor, and the grid of cards a p...
Definition pack_open.c:457
void STCRDSHP_showPackCard(CardPackOpen *open, CardPackOpenWindows *win, s32 show)
Shows the card under the cursor: its name, how many the player has and its numbers or its text,...
Definition pack_open.c:106
void STCRDSHP_showPackPage(CardPackOpen *open, CardPackOpenWindows *win, s32 show)
Shows the page's packs, the page number and the arrows' labels, or hides them.
Definition pack_open.c:38
static void STCRDSHP_closePackOpen(CardPackOpen *open, CardPackOpenWindows *win)
Leaving, once the help's panel has closed: hides the packs' page and the pack under the cursor and cl...
Definition pack_open.c:444
void STCRDSHP_updatePackOpen(CardPackOpen *open, CardPackOpenWindows *win)
The update of the screen to open a pack.
Definition pack_open.c:573
s32 STCRDSHP_slotCards[123][16]
The cards each slot of a pack draws one of, 16 each (STCRDSHP_packs)
Definition pack_open.c:606
CardPack STCRDSHP_packs[]
Definition pack_open.c:1041
s32 STCRDSHP_slotCards123[16]
Definition pack_open.c:862
static void STCRDSHP_choosePackCard(CardPackOpen *open, CardPackOpenWindows *win)
The cursor on the cards drawn: left/right show each one; triangle closes them.
Definition pack_open.c:416
void STCRDSHP_drawPackOpen(CardPackOpen *open)
Draws the screen: the page's packs and the arrows, the pack under the cursor, the help's frame and th...
Definition pack_open.c:162
static void STCRDSHP_choosePack(CardPackOpen *open, CardPackOpenWindows *win)
The cursor on the page's packs (two columns of four): L1/R1 turn the page, the pad moves it; cross op...
Definition pack_open.c:299
s32 STCRDSHP_slotCards124[86][16]
Definition pack_open.c:867
void STCRDSHP_showPack(CardPackOpen *open, CardPackOpenWindows *win, s32 show)
Shows the name of the pack under the cursor, how many the bag holds and the help, or hides them.
Definition pack_open.c:84
#define PAD_CROSS
Definition pad.h:31
#define PAD_DOWN
Definition pad.h:24
#define PAD_RIGHT
Definition pad.h:23
#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_L1
Definition pad.h:28
#define PAD_LEFT
Definition pad.h:25
#define PAD_HELD(button)
Definition pad.h:142
#define PAD_R1
Definition pad.h:29
#define PAD_REPEATED(button)
Definition pad.h:141
Random RANDOM
Definition random.c:533
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_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...
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
Definition gfx.h:193
void(* setCard)()
(id)
Definition gfx.h:205
s32(* getKind)(void)
Definition gfx.h:214
CardImage * card
Definition gfx.h:194
u8 hp
Definition gfx.h:175
u8 color
from 1
Definition gfx.h:173
u8 ap
Definition gfx.h:174
u8 points
what it adds to its colour
Definition gfx.h:179
void(* hide)(struct CardPackGrid *grid)
Definition card_packs.h:57
The children of the screen to open a pack.
Definition card_packs.h:134
TextWindow * count
how many the bag holds
Definition card_packs.h:139
TextWindow * page
Definition card_packs.h:143
TextWindow * pointsLabel
Definition card_packs.h:147
TextWindow * cardCount
how many the player has
Definition card_packs.h:150
TextWindow * packs[8]
the page's
Definition card_packs.h:135
TextWindow * help[2]
Definition card_packs.h:140
TextWindow * cardName
the card under the cursor's
Definition card_packs.h:146
TextWindow * hpLabel
Definition card_packs.h:154
TextWindow * prev
by the arrows
Definition card_packs.h:141
TextWindow * countLabel
Definition card_packs.h:138
TextWindow * ap
Definition card_packs.h:153
TextWindow * name
the pack's
Definition card_packs.h:137
TextWindow * pages
Definition card_packs.h:145
TextWindow * cardText
Definition card_packs.h:151
TextWindow * slash
Definition card_packs.h:144
TextWindow * hp
Definition card_packs.h:155
TextWindow * apLabel
Definition card_packs.h:152
TextWindow * cardCountLabel
Definition card_packs.h:149
CardPackGrid * grid
Definition card_packs.h:156
TextWindow * points
Definition card_packs.h:148
TextWindow * next
Definition card_packs.h:142
The screen to open a pack (STCRDSHP_createPackOpen): the bag's packs, eight a page.
Definition card_packs.h:111
A card pack: the item and the six lists of 16 cards its slots draw from.
Definition card_packs.h:16
s32 * slots[6]
Definition card_packs.h:18
s32(* updateFade)(PanelAnim *fade)
Definition card_packs.h:210
void(* startFade)(PanelAnim *fade, s32 fadeIn)
Definition card_packs.h:209
The card shop's main task (STCRDSHP_createShop): buy cards, open packs or edit the decks.
Definition card_packs.h:81
void(* setPos)()
(cursor, x, y)
Definition text.h:34
void(* setVisible)()
(cursor, visible)
Definition text.h:33
void *(* load)(u32 file)
Definition file.h:92
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
void(* addCards)(s32 card, s32 count)
Definition game_state.h:26
s8 cards[0x13D]
counts, up to CARD_COPIES_MAX
Definition game_state.h:514
s8 items[0x193]
counts, up to 99
Definition game_state.h:512
u8 cardsSeen[0x149]
Definition game_state.h:515
GameFuncs funcs
Definition game_state.h:582
s32(* getTime)(void)
Definition gfx.h:31
GfxFuncs funcs
Definition gfx.h:77
s32(* getCategory)(s32 item)
getItemCategory
Definition game_state.h:671
s32(* list)(s32 type, s16 *out)
listItems
Definition game_state.h:673
s32(* next)(void)
0 to RANDOM_COUNT - 1
Definition random.h:15
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
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
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)