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

The screen that buys cards from a shop's stock. More...

Include dependency graph for buy.c:

Go to the source code of this file.

Functions

void STCRDSHP_createBuyWindows (CardShopBuy *buy, CardShopBuyWindows *win)
 Creates the screen's windows and its cursor.
 
void STCRDSHP_showBuyCard (CardShopBuy *buy, CardShopBuyWindows *win, s32 show)
 Shows (or hides) the card under the cursor's name, price, how many the player has and its text or numbers.
 
void STCRDSHP_drawBuy (CardShopBuy *buy)
 Draws the screen: the card under the cursor's frames, the cursor, the arrows and the title.
 
static void STCRDSHP_openBuyCard (CardShopBuy *buy, CardShopBuyWindows *win)
 Once the card's panel has opened: shows the cursor, the card under it and the R1 arrow's label when there is a next page.
 
static void STCRDSHP_turnBuyPage (CardShopBuy *buy, CardShopBuyWindows *win)
 L1/R1 turn the page: the cursor goes back to its first card, the grid lays out the page's cards and the arrows' labels show where there are more.
 
static void STCRDSHP_chooseBuyCard (CardShopBuy *buy, CardShopBuyWindows *win)
 The cursor on the page's cards: left/right move it (only onto a card), L1/R1 turn the page and lay out its cards; cross asks to buy the card, unless the money is short or the player has 9 of it (a message), triangle leaves.
 
static void STCRDSHP_openBuyTotal (CardShopBuy *buy, CardShopBuyWindows *win)
 Once the total's panels have opened: shows the price with buy and no, and the cursor.
 
static void STCRDSHP_confirmBuyCard (CardShopBuy *buy, CardShopBuyWindows *win)
 Buy or no to the price: buy adds the card and pays for it; triangle declines.
 
static void STCRDSHP_closeBuyTotal (CardShopBuy *buy, CardShopBuyWindows *win)
 Hides the total, its answers and the cursor, and closes the panel.
 
static void STCRDSHP_closeBuy (CardShopBuy *buy, CardShopBuyWindows *win)
 Leaving: hides the cursor, the arrows' labels and the card, and closes its panel.
 
void STCRDSHP_runBuy (CardShopBuy *buy, CardShopBuyWindows *win)
 The states of the screen to buy cards: picking a card (left/right, L1/R1 for the pages), the yes/no to buy it and the messages when the player can't.
 
void STCRDSHP_updateBuy (CardShopBuy *buy, CardShopBuyWindows *win)
 The buy screen's update: takes the shop's stock, six cards a page.
 
CardShopBuy * STCRDSHP_createBuy (CardShop *shop, s32 shopId)
 Creates the screen to buy the cards of a shop.
 

Variables

s32 STCRDSHP_cursorRows []
 The CLUT rows of the cursor's frames.
 

Detailed Description

The screen that buys cards from a shop's stock.

Definition in file buy.c.

Function Documentation

◆ STCRDSHP_createBuyWindows()

void STCRDSHP_createBuyWindows ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)

Creates the screen's windows and its cursor.

buy.c

Definition at line 6 of file buy.c.

Referenced by STCRDSHP_updateBuy().

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

◆ STCRDSHP_showBuyCard()

void STCRDSHP_showBuyCard ( CardShopBuy *  buy,
CardShopBuyWindows *  win,
s32  show 
)

Shows (or hides) the card under the cursor's name, price, how many the player has and its text or numbers.

< CARDNM

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CARDST

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CARDST

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CRDSHP: STCRDSHP's, and STCRDDEK's

Definition at line 31 of file buy.c.

Referenced by STCRDSHP_chooseBuyCard(), STCRDSHP_closeBuy(), and STCRDSHP_openBuyCard().

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

◆ STCRDSHP_drawBuy()

void STCRDSHP_drawBuy ( CardShopBuy *  buy)

Draws the screen: the card under the cursor's frames, the cursor, the arrows and the title.

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

< GTE regards 4096 as 1.0

Definition at line 92 of file buy.c.

Referenced by STCRDSHP_updateBuy().

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

◆ STCRDSHP_openBuyCard()

static void STCRDSHP_openBuyCard ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

Once the card's panel has opened: shows the cursor, the card under it and the R1 arrow's label when there is a next page.

< CRDSHP: STCRDSHP's, and STCRDDEK's

Definition at line 190 of file buy.c.

Referenced by STCRDSHP_runBuy().

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

◆ STCRDSHP_turnBuyPage()

static void STCRDSHP_turnBuyPage ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

L1/R1 turn the page: the cursor goes back to its first card, the grid lays out the page's cards and the arrows' labels show where there are more.

< SYSTEM06

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CRDSHP: STCRDSHP's, and STCRDDEK's

Definition at line 207 of file buy.c.

Referenced by STCRDSHP_chooseBuyCard().

Here is the caller graph for this function:

◆ STCRDSHP_chooseBuyCard()

static void STCRDSHP_chooseBuyCard ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

The cursor on the page's cards: left/right move it (only onto a card), L1/R1 turn the page and lay out its cards; cross asks to buy the card, unless the money is short or the player has 9 of it (a message), triangle leaves.

< SYSTEM06

< SYSTEM07

< SYSTEM01

Definition at line 250 of file buy.c.

Referenced by STCRDSHP_runBuy().

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

◆ STCRDSHP_openBuyTotal()

static void STCRDSHP_openBuyTotal ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

Once the total's panels have opened: shows the price with buy and no, and the cursor.

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CRDSHP: STCRDSHP's, and STCRDDEK's

< CRDSHP: STCRDSHP's, and STCRDDEK's

Definition at line 298 of file buy.c.

Referenced by STCRDSHP_runBuy().

Here is the caller graph for this function:

◆ STCRDSHP_confirmBuyCard()

static void STCRDSHP_confirmBuyCard ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

Buy or no to the price: buy adds the card and pays for it; triangle declines.

< SYSTEM02: a cursor moves

< SYSTEM00: a choice is taken

< SYSTEM01

Definition at line 312 of file buy.c.

Referenced by STCRDSHP_runBuy().

Here is the caller graph for this function:

◆ STCRDSHP_closeBuyTotal()

static void STCRDSHP_closeBuyTotal ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

Hides the total, its answers and the cursor, and closes the panel.

Definition at line 340 of file buy.c.

Referenced by STCRDSHP_runBuy().

Here is the caller graph for this function:

◆ STCRDSHP_closeBuy()

static void STCRDSHP_closeBuy ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)
inlinestatic

Leaving: hides the cursor, the arrows' labels and the card, and closes its panel.

Definition at line 352 of file buy.c.

Referenced by STCRDSHP_runBuy().

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

◆ STCRDSHP_runBuy()

void STCRDSHP_runBuy ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)

The states of the screen to buy cards: picking a card (left/right, L1/R1 for the pages), the yes/no to buy it and the messages when the player can't.

< CRDSHP: STCRDSHP's, and STCRDDEK's

< SYSTEM07

Definition at line 364 of file buy.c.

Referenced by STCRDSHP_updateBuy().

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

◆ STCRDSHP_updateBuy()

void STCRDSHP_updateBuy ( CardShopBuy *  buy,
CardShopBuyWindows *  win 
)

The buy screen's update: takes the shop's stock, six cards a page.

The match depends on pages holding the remainder first and the partial page being a variable of its own.

Definition at line 434 of file buy.c.

Referenced by STCRDSHP_createBuy().

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

◆ STCRDSHP_createBuy()

CardShopBuy * STCRDSHP_createBuy ( CardShop *  shop,
s32  shopId 
)

Creates the screen to buy the cards of a shop.

Definition at line 473 of file buy.c.

Referenced by STCRDSHP_startOption().

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

Variable Documentation

◆ STCRDSHP_cursorRows

s32 STCRDSHP_cursorRows[]
Initial value:
= {
0, 1, 2, 3,
2, 1,
}

The CLUT rows of the cursor's frames.

the CLUT rows of the cursor's frames

Definition at line 484 of file buy.c.

Referenced by STCRDSHP_drawBuy().