Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
album.c File Reference
Include dependency graph for album.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
 

Macro Definition Documentation

◆ FADER_DEPTH

#define FADER_DEPTH   0

Definition at line 14 of file album.c.

◆ SCENE_TASK

#define SCENE_TASK   Task

Definition at line 244 of file album.c.

◆ SCENE_CHILD

#define SCENE_CHILD   CardAlbum

Definition at line 245 of file album.c.

◆ SCENE_CREATE

#define SCENE_CREATE   OVL_NAME(createAlbum)

Definition at line 246 of file album.c.

◆ SCENE_PRIM_BUFFERS

#define SCENE_PRIM_BUFFERS   0xF000

Definition at line 247 of file album.c.

◆ SCENE_OT_SHIFT

#define SCENE_OT_SHIFT   3

Definition at line 248 of file album.c.

Function Documentation

◆ STCRDABM_loadIcons()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_setPage()

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().

Here is the caller graph for this function:

◆ STCRDABM_drawCards()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_drawTurningSlots()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_pageHasCards()

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().

Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_createWindows()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_showPageInfo()

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().

Here is the caller graph for this function:

◆ STCRDABM_showCardInfo()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_drawAlbum()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_findPageCards()

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().

Here is the caller graph for this function:

◆ STCRDABM_turnAlbumPage()

static void STCRDABM_turnAlbumPage ( CardAlbum *  album,
CardAlbumWindows *  win 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_moveAlbumCursor()

static void STCRDABM_moveAlbumCursor ( CardAlbum *  album,
CardAlbumWindows *  win 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_browseAlbum()

static void STCRDABM_browseAlbum ( CardAlbum *  album,
CardAlbumWindows *  win 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ STCRDABM_createAlbum()

CardAlbum * STCRDABM_createAlbum ( void  )

Creates the album (task), on the top layer.

Definition at line 724 of file album.c.

Here is the call graph for this function:

◆ STCRDABM_loadFiles()

void STCRDABM_loadFiles ( void  )

Loads the album's images and requests the card data and the card names, effects and album strings.

< TIM archive

< CARDNM

< CARDST

< CRDABM: STCRDABM's

Definition at line 734 of file album.c.

Here is the call graph for this function:

◆ STCRDABM_filesLoading()

s32 STCRDABM_filesLoading ( void  )

Whether the card data or the strings are still loading.

< CARDNM

< CARDST

< CRDABM: STCRDABM's

Definition at line 751 of file album.c.

Variable Documentation

◆ STCRDABM_cursorBlink

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().

◆ STCRDABM_funcs

CardAlbumFuncs STCRDABM_funcs
Initial value:
= {
}
s32 STCRDABM_filesLoading(void)
Whether the card data or the strings are still loading.
Definition album.c:751
void STCRDABM_loadFiles(void)
Loads the album's images and requests the card data and the card names, effects and album strings.
Definition album.c:734
s32 STCRDABM_updateLerp(MenuLerp *lerp)
s32 STCRDABM_updateFade(PanelAnim *fade)
void STCRDABM_startFade(PanelAnim *fade, s32 fadeIn)
void STCRDABM_startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)

Definition at line 6 of file album.c.

Referenced by STCRDABM_runAlbum(), and STCRDABM_updateAlbum().