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

CARDGAME's table views: browsing the played cards and picking one. More...

Include dependency graph for table_view.c:

Go to the source code of this file.

Functions

void CARDGAME_startViewTable (CardBattle *battle, CardScreen *screen)
 Starts CARDGAME_viewTable.
 
s32 CARDGAME_getTableHeight (CardBattle *battle, CardScreen *screen)
 The table's height: 8 per card of the longer row of slots (at least 3), and 14.
 
void CARDGAME_moveTableHighlight (CardBattle *battle, CardScreen *screen, s32 kind, s32 delta)
 Moves the highlight of a row of cards (kind 0, 1 or 2) by delta.
 
static void closeTableWindows (CardScreen *screen)
 Closes the card info's four windows.
 
static void startTableRow (CardBattle *battle, CardScreen *screen, s32 row)
 Starts showing a row of cards (0, 1 or 2) and its windows.
 
static void leaveTableRow (CardBattle *battle, CardScreen *screen, s32 offset)
 Leaves a row of cards (its first sprite at offset): unhighlights its card and closes the windows.
 
static void setUpViewState (CardBattle *battle, CardScreen *screen)
 Sets up the table view's next state (effectStep.nextState): opening the panels, a row, leaving a row, closing, or the no-cards message.
 
static void chooseFirstRow (CardBattle *battle, CardScreen *screen)
 Once the panels are open, shows the first row with cards in it, or the no-cards message.
 
static void browseOwnRow (CardBattle *battle, CardScreen *screen)
 The player's own row: up goes to the played or the opponent's row, left and right move along it, triangle leaves.
 
static void browseOpponentRow (CardBattle *battle, CardScreen *screen)
 The opponent's row: down goes to the played or the player's own row, left and right move along it, triangle leaves.
 
static void browsePlayedRow (CardBattle *battle, CardScreen *screen)
 The row of the cards played: up and down go to the opponent's or the player's own row, left and right move along it, triangle leaves.
 
static void leaveOwnRow (CardBattle *battle, CardScreen *screen)
 11 frames after leaving the player's own row, goes up to the played row (the cursor halved) or the opponent's row
 
static void leavePlayedRow (CardBattle *battle, CardScreen *screen)
 11 frames after leaving the played row, goes to the opponent's (effectStep.vars[1]) or the player's own row, the cursor doubled
 
static void leaveOpponentRow (CardBattle *battle, CardScreen *screen)
 11 frames after leaving the opponent's row, goes down to the played row (the cursor halved) or the player's own row
 
s32 CARDGAME_viewTable (CardBattle *battle, CardScreen *screen)
 Lets the player look over the cards out on the table: the two players' rows and the row of the cards played (up and down change rows, left and right move along one, triangle leaves), each state set up by setUpViewState; 1 once it is over.
 
void CARDGAME_startPickTableCard (CardBattle *battle, CardScreen *screen, s32 cancelable)
 Starts CARDGAME_pickTableCard, which triangle backs out of when cancelable (effectStep.vars[4])
 
s32 CARDGAME_getPickTableHeight (CardBattle *battle, CardScreen *screen)
 CARDGAME_getTableHeight, for CARDGAME_pickTableCard.
 
void CARDGAME_movePickHighlight (CardBattle *battle, CardScreen *screen, s32 kind, s32 delta)
 CARDGAME_moveTableHighlight, for CARDGAME_pickTableCard.
 
static void setUpPickState (CardBattle *battle, CardScreen *screen)
 Sets up the table pick's next state (effectStep.nextState): dimming the cards that can't be picked, a row, leaving a row, the pick, or closing.
 
static void chooseFirstPickRow (CardBattle *battle, CardScreen *screen)
 Once the panels are open (or right away without them), shows the first row the pick allows that has cards in it, or the no-cards message.
 
static void pickInOwnRow (CardBattle *battle, CardScreen *screen)
 The player's own row: up goes to the opponent's row when allowed, left and right move along it, triangle backs out (with effectStep.vars[4]), cross picks an eligible card.
 
static void pickInOpponentRow (CardBattle *battle, CardScreen *screen)
 The opponent's row: down goes to the player's own row when allowed, left and right move along it, triangle backs out (with effectStep.vars[4]), else cross picks an eligible card.
 
s32 CARDGAME_pickTableCard (CardBattle *battle, CardScreen *screen)
 Lets the player pick a card out on the table (effectStep.flags bit 0: in their own row, bit 1: in the opponent's): 2 once one is picked (its sprite in effectStep.choice), 1 if there was none or the player backed out; each state is set up by setUpPickState.
 

Detailed Description

CARDGAME's table views: browsing the played cards and picking one.

Definition in file table_view.c.

Function Documentation

◆ CARDGAME_startViewTable()

void CARDGAME_startViewTable ( CardBattle *  battle,
CardScreen *  screen 
)

Starts CARDGAME_viewTable.

Definition at line 6 of file table_view.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_getTableHeight()

s32 CARDGAME_getTableHeight ( CardBattle *  battle,
CardScreen *  screen 
)

The table's height: 8 per card of the longer row of slots (at least 3), and 14.

Definition at line 12 of file table_view.c.

Referenced by CARDGAME_getPickTableHeight(), and setUpViewState().

Here is the caller graph for this function:

◆ CARDGAME_moveTableHighlight()

void CARDGAME_moveTableHighlight ( CardBattle *  battle,
CardScreen *  screen,
s32  kind,
s32  delta 
)

Moves the highlight of a row of cards (kind 0, 1 or 2) by delta.

< SYSTEM06

Definition at line 27 of file table_view.c.

Referenced by browseOpponentRow(), browseOwnRow(), browsePlayedRow(), CARDGAME_movePickHighlight(), CARDGAME_viewTable(), pickInOpponentRow(), and pickInOwnRow().

Here is the caller graph for this function:

◆ closeTableWindows()

static void closeTableWindows ( CardScreen *  screen)
inlinestatic

Closes the card info's four windows.

Definition at line 47 of file table_view.c.

Referenced by leaveTableRow(), setUpPickState(), and setUpViewState().

Here is the caller graph for this function:

◆ startTableRow()

static void startTableRow ( CardBattle *  battle,
CardScreen *  screen,
s32  row 
)
inlinestatic

Starts showing a row of cards (0, 1 or 2) and its windows.

Definition at line 55 of file table_view.c.

Referenced by setUpPickState(), and setUpViewState().

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

◆ leaveTableRow()

static void leaveTableRow ( CardBattle *  battle,
CardScreen *  screen,
s32  offset 
)
inlinestatic

Leaves a row of cards (its first sprite at offset): unhighlights its card and closes the windows.

Definition at line 64 of file table_view.c.

Referenced by setUpPickState(), and setUpViewState().

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

◆ setUpViewState()

static void setUpViewState ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

Sets up the table view's next state (effectStep.nextState): opening the panels, a row, leaving a row, closing, or the no-cards message.

Definition at line 74 of file table_view.c.

Referenced by CARDGAME_viewTable().

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

◆ chooseFirstRow()

static void chooseFirstRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

Once the panels are open, shows the first row with cards in it, or the no-cards message.

Definition at line 127 of file table_view.c.

Referenced by CARDGAME_viewTable().

Here is the caller graph for this function:

◆ browseOwnRow()

static void browseOwnRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

The player's own row: up goes to the played or the opponent's row, left and right move along it, triangle leaves.

< SYSTEM01

Definition at line 147 of file table_view.c.

Referenced by CARDGAME_viewTable().

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

◆ browseOpponentRow()

static void browseOpponentRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

The opponent's row: down goes to the played or the player's own row, left and right move along it, triangle leaves.

< SYSTEM01

Definition at line 170 of file table_view.c.

Referenced by CARDGAME_viewTable().

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

◆ browsePlayedRow()

static void browsePlayedRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

The row of the cards played: up and down go to the opponent's or the player's own row, left and right move along it, triangle leaves.

< SYSTEM01

Definition at line 193 of file table_view.c.

Referenced by CARDGAME_viewTable().

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

◆ leaveOwnRow()

static void leaveOwnRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

11 frames after leaving the player's own row, goes up to the played row (the cursor halved) or the opponent's row

Definition at line 222 of file table_view.c.

Referenced by CARDGAME_viewTable().

Here is the caller graph for this function:

◆ leavePlayedRow()

static void leavePlayedRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

11 frames after leaving the played row, goes to the opponent's (effectStep.vars[1]) or the player's own row, the cursor doubled

Definition at line 242 of file table_view.c.

Referenced by CARDGAME_viewTable().

Here is the caller graph for this function:

◆ leaveOpponentRow()

static void leaveOpponentRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

11 frames after leaving the opponent's row, goes down to the played row (the cursor halved) or the player's own row

Definition at line 262 of file table_view.c.

Referenced by CARDGAME_viewTable().

Here is the caller graph for this function:

◆ CARDGAME_viewTable()

s32 CARDGAME_viewTable ( CardBattle *  battle,
CardScreen *  screen 
)

Lets the player look over the cards out on the table: the two players' rows and the row of the cards played (up and down change rows, left and right move along one, triangle leaves), each state set up by setUpViewState; 1 once it is over.

Definition at line 284 of file table_view.c.

Referenced by CARDGAME_runEffectStep().

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

◆ CARDGAME_startPickTableCard()

void CARDGAME_startPickTableCard ( CardBattle *  battle,
CardScreen *  screen,
s32  cancelable 
)

Starts CARDGAME_pickTableCard, which triangle backs out of when cancelable (effectStep.vars[4])

Definition at line 356 of file table_view.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_getPickTableHeight()

s32 CARDGAME_getPickTableHeight ( CardBattle *  battle,
CardScreen *  screen 
)

CARDGAME_getTableHeight, for CARDGAME_pickTableCard.

Definition at line 362 of file table_view.c.

Referenced by setUpPickState().

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

◆ CARDGAME_movePickHighlight()

void CARDGAME_movePickHighlight ( CardBattle *  battle,
CardScreen *  screen,
s32  kind,
s32  delta 
)

CARDGAME_moveTableHighlight, for CARDGAME_pickTableCard.

Definition at line 367 of file table_view.c.

Referenced by CARDGAME_pickTableCard().

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

◆ setUpPickState()

static void setUpPickState ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

Sets up the table pick's next state (effectStep.nextState): dimming the cards that can't be picked, a row, leaving a row, the pick, or closing.

< SYSTEM07

Definition at line 373 of file table_view.c.

Referenced by CARDGAME_pickTableCard().

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

◆ chooseFirstPickRow()

static void chooseFirstPickRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

Once the panels are open (or right away without them), shows the first row the pick allows that has cards in it, or the no-cards message.

Definition at line 451 of file table_view.c.

Referenced by CARDGAME_pickTableCard().

Here is the caller graph for this function:

◆ pickInOwnRow()

static void pickInOwnRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

The player's own row: up goes to the opponent's row when allowed, left and right move along it, triangle backs out (with effectStep.vars[4]), cross picks an eligible card.

< SYSTEM01

Definition at line 479 of file table_view.c.

Referenced by CARDGAME_pickTableCard().

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

◆ pickInOpponentRow()

static void pickInOpponentRow ( CardBattle *  battle,
CardScreen *  screen 
)
inlinestatic

The opponent's row: down goes to the player's own row when allowed, left and right move along it, triangle backs out (with effectStep.vars[4]), else cross picks an eligible card.

< SYSTEM01

Definition at line 507 of file table_view.c.

Referenced by CARDGAME_pickTableCard().

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

◆ CARDGAME_pickTableCard()

s32 CARDGAME_pickTableCard ( CardBattle *  battle,
CardScreen *  screen 
)

Lets the player pick a card out on the table (effectStep.flags bit 0: in their own row, bit 1: in the opponent's): 2 once one is picked (its sprite in effectStep.choice), 1 if there was none or the player backed out; each state is set up by setUpPickState.

< SYSTEM01

Definition at line 535 of file table_view.c.

Referenced by answerTableCardPick(), and CARDGAME_runEffectStep().

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