|
Digimon World 3 decomp
The European version, SLES_039.36
|
#include "cardgame/album.h"#include "shared/start_fader.inc.c"#include "shared/draw_fader.inc.c"#include "shared/update_fader.inc.c"#include "shared/create_fader.inc.c"#include "shared/hide_cards.inc.c"#include "shared/update_hiding.inc.c"#include "shared/update_scene.inc.c"#include "shared/start.inc.c"#include "shared/start_fade.inc.c"#include "shared/update_fade.inc.c"#include "shared/start_lerp.inc.c"#include "shared/update_lerp.inc.c"Go to the source code of this file.
Macros | |
| #define | FADER_DEPTH 0 |
| #define | SCENE_TASK Task |
| #define | SCENE_CHILD CardAlbum |
| #define | SCENE_CREATE OVL_NAME(createAlbum) |
| #define | SCENE_PRIM_BUFFERS 0xF000 |
| #define | SCENE_OT_SHIFT 3 |
Functions | |
| void | STCRDABM_loadIcons (CardAlbumGrid *grid) |
| Loads the images of the grid's page of cards, from grid->first, into VRAM's 6x2 grid of card images. | |
| void | STCRDABM_setPage (CardAlbumGrid *grid, s32 first) |
Turns the grid to the page whose first card is first (grid->setPage) | |
| void | STCRDABM_drawCards (CardAlbumGrid *grid, s32 previous) |
| Draws the page's cards, or the page being turned when previous != 0: a seen card's image, the sprite of its color and its AP and HP (sprite 0x1D instead for the other kinds), else an empty slot. | |
| void | STCRDABM_drawTurningSlots (CardAlbumGrid *grid) |
| Draws the slots turned so far over the cards, flashing the ones with a seen card. | |
| s32 | STCRDABM_pageHasCards (CardAlbumGrid *grid) |
| 1 when the grid's page holds a seen card (or runs past the last card) | |
| void | STCRDABM_updateGrid (CardAlbumGrid *grid) |
| The card grid's task: draws the page's cards; on a page turn, turns its 12 slots one every 2 frames over the old cards, then loads and shows the new ones, with a sound when the page has cards. | |
| CardAlbumGrid * | STCRDABM_createGrid (CardAlbum *album) |
| Creates the album's card grid (task), on the top layer. | |
| void | STCRDABM_createWindows (CardAlbum *album, CardAlbumWindows *win) |
| Creates the album's text windows (the page's and the selected card's), in front of the album. | |
| void | STCRDABM_showPageInfo (CardAlbum *album, CardAlbumWindows *win, s32 show) |
| Shows the title, help and page number and, while the album takes input, the previous and next page hints where there is such a page; hides them all when show is 0. | |
| void | STCRDABM_showCardInfo (CardAlbum *album, CardAlbumWindows *win, s32 show) |
| Shows the card under the cursor (album->card = page * 12 + slot + 1) once the player has seen it: its name, the copies owned and, for a card of kind 0, its level and its two stats, or its text for cards 0x45, 0x70, 0x9B, 0xC6 and 0xF1; the other kinds show their text. | |
| void | STCRDABM_drawAlbum (CardAlbum *album) |
| Draws the album: the scrolling background, its panels as they open, the blinking previous and next page sprites and the cursor while it takes input, and the panels of the card's details. | |
| void | STCRDABM_findPageCards (CardAlbum *album) |
| Notes which slots of the current page hold a seen card, and whether any does. | |
| static void | STCRDABM_turnAlbumPage (CardAlbum *album, CardAlbumWindows *win) |
| The page turned: shows the new page's cards, fading the card's details in or out when the page gains or loses cards seen. | |
| static void | STCRDABM_moveAlbumCursor (CardAlbum *album, CardAlbumWindows *win) |
| The pad moves the cursor between the page's slots (two rows of six) to the next card seen that way, and shows its details; it stays put when there is none. | |
| static void | STCRDABM_browseAlbum (CardAlbum *album, CardAlbumWindows *win) |
| The album open: L1/R1 turn the page, the pad moves the cursor between the page's cards seen; triangle fades the screen out to leave. | |
| void | STCRDABM_runAlbum (CardAlbum *album, CardAlbumWindows *win) |
| The album's steps: opens it, then turns pages with L1 and R1, moves the cursor between the seen cards and shows the selected one's details; Triangle fades the screen out to leave. | |
| void | STCRDABM_updateAlbum (CardAlbum *album, CardAlbumWindows *win) |
| The album's task: loads the files and creates its windows, then runs and draws it; once the screen has faded out, goes back to the previous mode. | |
| CardAlbum * | STCRDABM_createAlbum (void) |
| Creates the album (task), on the top layer. | |
| void | STCRDABM_loadFiles (void) |
| Loads the album's images and requests the card data and the card names, effects and album strings. | |
| s32 | STCRDABM_filesLoading (void) |
| Whether the card data or the strings are still loading. | |
Variables | |
| s32 | STCRDABM_cursorBlink [6] = {0, 1, 2, 3, 2, 1} |
| The cursor's CLUT row on each frame of its blink. | |
| CardAlbumFuncs | STCRDABM_funcs |
| void STCRDABM_loadIcons | ( | CardAlbumGrid * | grid | ) |
Loads the images of the grid's page of cards, from grid->first, into VRAM's 6x2 grid of card images.
Definition at line 19 of file album.c.
Referenced by STCRDABM_updateGrid().
| void STCRDABM_setPage | ( | CardAlbumGrid * | grid, |
| s32 | first | ||
| ) |
Turns the grid to the page whose first card is first (grid->setPage)
Definition at line 39 of file album.c.
Referenced by STCRDABM_createGrid(), and STCRDABM_updateGrid().
| void STCRDABM_drawCards | ( | CardAlbumGrid * | grid, |
| s32 | previous | ||
| ) |
Draws the page's cards, or the page being turned when previous != 0: a seen card's image, the sprite of its color and its AP and HP (sprite 0x1D instead for the other kinds), else an empty slot.
< sprite bank
< sprite bank
< sprite bank
< sprite bank
< sprite bank
Definition at line 52 of file album.c.
Referenced by STCRDABM_updateGrid().
| void STCRDABM_drawTurningSlots | ( | CardAlbumGrid * | grid | ) |
Draws the slots turned so far over the cards, flashing the ones with a seen card.
< sprite bank
Definition at line 131 of file album.c.
Referenced by STCRDABM_updateGrid().
| s32 STCRDABM_pageHasCards | ( | CardAlbumGrid * | grid | ) |
1 when the grid's page holds a seen card (or runs past the last card)
Definition at line 155 of file album.c.
Referenced by STCRDABM_updateGrid().
| void STCRDABM_updateGrid | ( | CardAlbumGrid * | grid | ) |
The card grid's task: draws the page's cards; on a page turn, turns its 12 slots one every 2 frames over the old cards, then loads and shows the new ones, with a sound when the page has cards.
< SYSTEM07
Definition at line 173 of file album.c.
Referenced by STCRDABM_createGrid().
| CardAlbumGrid * STCRDABM_createGrid | ( | CardAlbum * | album | ) |
Creates the album's card grid (task), on the top layer.
Definition at line 233 of file album.c.
Referenced by STCRDABM_runAlbum().
| void STCRDABM_createWindows | ( | CardAlbum * | album, |
| CardAlbumWindows * | win | ||
| ) |
Creates the album's text windows (the page's and the selected card's), in front of the album.
Definition at line 254 of file album.c.
Referenced by STCRDABM_updateAlbum().
| void STCRDABM_showPageInfo | ( | CardAlbum * | album, |
| CardAlbumWindows * | win, | ||
| s32 | show | ||
| ) |
Shows the title, help and page number and, while the album takes input, the previous and next page hints where there is such a page; hides them all when show is 0.
< CRDABM: STCRDABM's
< CRDABM: STCRDABM's
< CRDABM: STCRDABM's
< CRDABM: STCRDABM's
< CRDABM: STCRDABM's
Definition at line 282 of file album.c.
Referenced by STCRDABM_runAlbum(), and STCRDABM_turnAlbumPage().
| void STCRDABM_showCardInfo | ( | CardAlbum * | album, |
| CardAlbumWindows * | win, | ||
| s32 | show | ||
| ) |
Shows the card under the cursor (album->card = page * 12 + slot + 1) once the player has seen it: its name, the copies owned and, for a card of kind 0, its level and its two stats, or its text for cards 0x45, 0x70, 0x9B, 0xC6 and 0xF1; the other kinds show their text.
Hides it all otherwise.
< CARDNM
< CRDABM: STCRDABM's
< CARDST
< CRDABM: STCRDABM's
< CARDST
< CRDABM: STCRDABM's
< CRDABM: STCRDABM's
Definition at line 320 of file album.c.
Referenced by STCRDABM_moveAlbumCursor(), and STCRDABM_runAlbum().
| void STCRDABM_drawAlbum | ( | CardAlbum * | album | ) |
Draws the album: the scrolling background, its panels as they open, the blinking previous and next page sprites and the cursor while it takes input, and the panels of the card's details.
< sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< sprite bank
< GTE regards 4096 as 1.0
< sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< sprite bank
< sprite bank
< sprite bank
< sprite bank
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
< sprite bank
< sprite bank
< GTE regards 4096 as 1.0
< sprite bank
< GTE regards 4096 as 1.0
< sprite bank
< sprite bank
< GTE regards 4096 as 1.0
< sprite bank
< sprite bank
< sprite bank
Definition at line 377 of file album.c.
Referenced by STCRDABM_updateAlbum().
| void STCRDABM_findPageCards | ( | CardAlbum * | album | ) |
Notes which slots of the current page hold a seen card, and whether any does.
Definition at line 478 of file album.c.
Referenced by STCRDABM_runAlbum(), and STCRDABM_turnAlbumPage().
|
inlinestatic |
The page turned: shows the new page's cards, fading the card's details in or out when the page gains or loses cards seen.
< SYSTEM06
Definition at line 497 of file album.c.
Referenced by STCRDABM_browseAlbum().
|
inlinestatic |
The pad moves the cursor between the page's slots (two rows of six) to the next card seen that way, and shows its details; it stays put when there is none.
< SYSTEM06
Definition at line 524 of file album.c.
Referenced by STCRDABM_browseAlbum().
|
inlinestatic |
The album open: L1/R1 turn the page, the pad moves the cursor between the page's cards seen; triangle fades the screen out to leave.
< SYSTEM01
Definition at line 579 of file album.c.
Referenced by STCRDABM_runAlbum().
| void STCRDABM_runAlbum | ( | CardAlbum * | album, |
| CardAlbumWindows * | win | ||
| ) |
The album's steps: opens it, then turns pages with L1 and R1, moves the cursor between the seen cards and shows the selected one's details; Triangle fades the screen out to leave.
Definition at line 609 of file album.c.
Referenced by STCRDABM_updateAlbum().
| void STCRDABM_updateAlbum | ( | CardAlbum * | album, |
| CardAlbumWindows * | win | ||
| ) |
The album's task: loads the files and creates its windows, then runs and draws it; once the screen has faded out, goes back to the previous mode.
Definition at line 689 of file album.c.
Referenced by STCRDABM_createAlbum().
| CardAlbum * STCRDABM_createAlbum | ( | void | ) |
| void STCRDABM_loadFiles | ( | void | ) |
| s32 STCRDABM_filesLoading | ( | void | ) |
| s32 STCRDABM_cursorBlink[6] = {0, 1, 2, 3, 2, 1} |
The cursor's CLUT row on each frame of its blink.
Definition at line 4 of file album.c.
Referenced by STCRDABM_drawAlbum().
| CardAlbumFuncs STCRDABM_funcs |
Definition at line 6 of file album.c.
Referenced by STCRDABM_runAlbum(), and STCRDABM_updateAlbum().