Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
album.h File Reference

STCRDABM.PRO: the card album (scene 0x1200). More...

#include "engine/game.h"
Include dependency graph for album.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CardAlbumGrid
 Draws the cards of a page and animates the page turns. More...
 
struct  CardAlbum
 
struct  CardAlbumWindows
 
struct  CardAlbumFuncs
 

Macros

#define OVL_NAME(name)   STCRDABM_##name
 The name of this overlay's copy of a function of src/shared/.
 
#define CARD_GRID   CardAlbumGrid
 The card grid that src/shared's hide_cards and update_hiding take.
 
#define CARD_COUNT   315
 
#define ALBUM_PAGE_CARDS   12
 
#define STCRDABM_FILE_SPRITES   0x605
 The album's files: the discs number them differently.
 
#define STCRDABM_FILE_IMAGES   0x606
 
#define STCRDABM_FILE_DATA   0x7F6
 
#define STCRDABM_SPRITES   (STCRDABM_FILE_SPRITES << 16)
 sprite bank
 
#define STCRDABM_IMAGES   (STCRDABM_FILE_IMAGES << 16)
 TIM archive.
 

Functions

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.
 
void STCRDABM_startFade (PanelAnim *fade, s32 fadeIn)
 
s32 STCRDABM_updateFade (PanelAnim *fade)
 
void STCRDABM_startLerp (MenuLerp *lerp, s32 from, s32 to, s32 frames)
 
s32 STCRDABM_updateLerp (MenuLerp *lerp)
 
void STCRDABM_startFader (ScreenFade *task, s32 fadeIn, s32 duration)
 
void STCRDABM_drawFader (ScreenFade *fader)
 
void STCRDABM_updateFader (ScreenFade *task)
 
ScreenFade * STCRDABM_createFader (void)
 
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_hideCards (CardAlbumGrid *grid)
 
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_updateHiding (CardAlbumGrid *grid)
 
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_updateScene (Task *task, CardAlbum **child)
 
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.
 
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.
 

Detailed Description

STCRDABM.PRO: the card album (scene 0x1200).

27 pages of 12 cards, the cards the player has are shown with their icon and numbers, the others as empty slots.

Definition in file album.h.

Macro Definition Documentation

◆ OVL_NAME

#define OVL_NAME (   name)    STCRDABM_##name

The name of this overlay's copy of a function of src/shared/.

Definition at line 11 of file album.h.

◆ CARD_GRID

#define CARD_GRID   CardAlbumGrid

The card grid that src/shared's hide_cards and update_hiding take.

Definition at line 13 of file album.h.

◆ CARD_COUNT

#define CARD_COUNT   315

Definition at line 15 of file album.h.

◆ ALBUM_PAGE_CARDS

#define ALBUM_PAGE_CARDS   12

Definition at line 16 of file album.h.

◆ STCRDABM_FILE_SPRITES

#define STCRDABM_FILE_SPRITES   0x605

The album's files: the discs number them differently.

Definition at line 24 of file album.h.

◆ STCRDABM_FILE_IMAGES

#define STCRDABM_FILE_IMAGES   0x606

Definition at line 25 of file album.h.

◆ STCRDABM_FILE_DATA

#define STCRDABM_FILE_DATA   0x7F6

Definition at line 26 of file album.h.

◆ STCRDABM_SPRITES

#define STCRDABM_SPRITES   (STCRDABM_FILE_SPRITES << 16)

sprite bank

Definition at line 28 of file album.h.

◆ STCRDABM_IMAGES

#define STCRDABM_IMAGES   (STCRDABM_FILE_IMAGES << 16)

TIM archive.

Definition at line 29 of file album.h.

Function Documentation

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

◆ STCRDABM_startFade()

void STCRDABM_startFade ( PanelAnim *  fade,
s32  fadeIn 
)

◆ STCRDABM_updateFade()

s32 STCRDABM_updateFade ( PanelAnim *  fade)

◆ STCRDABM_startLerp()

void STCRDABM_startLerp ( MenuLerp *  lerp,
s32  from,
s32  to,
s32  frames 
)

◆ STCRDABM_updateLerp()

s32 STCRDABM_updateLerp ( MenuLerp *  lerp)

◆ STCRDABM_startFader()

void STCRDABM_startFader ( ScreenFade *  task,
s32  fadeIn,
s32  duration 
)

◆ STCRDABM_drawFader()

void STCRDABM_drawFader ( ScreenFade *  fader)

◆ STCRDABM_updateFader()

void STCRDABM_updateFader ( ScreenFade *  task)

◆ STCRDABM_createFader()

ScreenFade * STCRDABM_createFader ( void  )

Referenced by STCRDABM_browseAlbum().

Here is the caller graph for this function:

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

void STCRDABM_hideCards ( CardAlbumGrid *  grid)

Referenced by STCRDABM_createGrid().

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

void STCRDABM_updateHiding ( CardAlbumGrid *  grid)

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

void STCRDABM_updateScene ( Task *  task,
CardAlbum **  child 
)

◆ 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_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: