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

CARDGAME's card effects on the hands, decks and discards: discarding, drawing, taking cards and changing colour values. More...

Include dependency graph for pile_effects.c:

Go to the source code of this file.

Functions

void CARDGAME_startHandCount (CardBattle *battle, CardScreen *screen, s32 side)
 Starts a count of side's hand and discards (effectStep.vars[0] and effectStep.vars[1])
 
s32 CARDGAME_discardHand (CardBattle *battle, CardScreen *screen, s32 side)
 Counts a side's hand cards over to its discards on its panel, one every 7 frames, then moves them; 1 when done.
 
void CARDGAME_startColorChange (CardBattle *battle, CardScreen *screen, s32 amount, s32 interval)
 Starts CARDGAME_stepColorValue: amount (effectStep.vars[3], below 0 to take) one at a time, one each interval frames (effectStep.vars[2])
 
s32 CARDGAME_stepColorValue (CardBattle *battle, CardScreen *screen, s32 side, s32 color)
 Moves a side's colour value (pile.points[color]) one step each effectStep.vars[2] frames towards using up effectStep.vars[3] (up to 99, down to 0), on its panel; 1 when done.
 
void CARDGAME_startColorDrain (CardBattle *battle, CardScreen *screen)
 Starts CARDGAME_drainColorValues.
 
s32 CARDGAME_drainColorValues (CardBattle *battle, CardScreen *screen)
 Counts both sides' colour values (pile.points) down by one each effectStep.vars[2] frames, on the panels, until they are all 0; 1 when done.
 
void CARDGAME_startCloseGauge (CardBattle *battle, CardScreen *screen)
 Closes the gauge of the card before the last one.
 
s32 CARDGAME_discardPrevCard (CardBattle *battle, CardScreen *screen)
 Puts the card played before the last one (record.plays[playCount - 2]) on its side's discards once its sprite has turned; 1 when done.
 
s32 CARDGAME_keepLastCard (CardBattle *battle, CardScreen *screen)
 Keeps the last card played in keptCard (as card + 1) and counts it (keptCount); 1.
 
void CARDGAME_showPileCard (CardBattle *battle, CardScreen *screen, s32 side, s32 which)
 Shows side's card at effectStep.choice as sprite 17: of its hand (which 0) or its deck (1)
 
s32 CARDGAME_discardPickedCard (CardBattle *battle, CardScreen *screen, s32 side, s32 from)
 Moves sprite 17 to the side's spot, then puts card effectStep.vars[4] on the side's discards and takes entry effectStep.choice out of the pile it came from (from 0: the hand, from 1: the deck after deckTop); 1 when over.
 
void CARDGAME_takeCardToHand (CardBattle *battle, CardScreen *screen, s32 side, s32 which)
 Adds card effectStep.choice of a side's discards (which 4) or deck to its hand.
 
static void showPileCounts (CardBattle *battle, CardScreen *screen)
 Shows both sides' deck, hand and discard counts on their panels.
 
static void takeChosenDiscard (CardBattle *battle, s32 side)
 Takes card effectStep.choice out of side's used pile, shifting the cards after it up.
 
static void takeChosenCard (CardBattle *battle, s32 side)
 Takes card effectStep.choice out of side's deck (for the computer, a reserve card goes from the bottom), shifting the cards above it down.
 
s32 CARDGAME_drawFromDeck (CardBattle *battle, CardScreen *screen, s32 side, s32 which)
 Moves the card just put in the hand into place, then takes card effectStep.choice out of the deck (takeChosenCard), or out of the used pile when which is 4 (takeChosenDiscard)
 
void CARDGAME_startDiscardCount (CardBattle *battle, CardScreen *screen, s32 side)
 Starts a count of side's discards and deck (effectStep.vars[0] and effectStep.vars[1])
 
s32 CARDGAME_returnUsedCards (CardBattle *battle, CardScreen *screen, s32 side)
 Counts the panel's discards down into its deck, then puts the side's discards back into its deck; 1 once done.
 
void CARDGAME_startDraw (CardBattle *battle, CardScreen *screen, s32 count)
 Starts drawing count cards (effectStep.count)
 
s32 CARDGAME_markDrawnCards (CardBattle *battle, CardScreen *screen, s32 side)
 Marks (effectStep.marked) the cards side draws from its deck: from its top for the player, by the round's level (round) for the computer; effectStep.flags when the deck runs out; 1.
 
void CARDGAME_drawMarkedCards (CardBattle *battle, CardScreen *screen, s32 side)
 Moves side's marked deck cards to its hand and opens its panel.
 
static void goToNextCard (CardBattle *battle, CardScreen *screen, s32 side)
 Goes on to the next drawn card, or once all are in place to the deck's empty message or the wait before the panel closes.
 
static void takeMarkedCard (CardBattle *battle, s32 side)
 Takes the last marked card out of side's deck (for the computer, a reserve card goes from the bottom), shifting the cards above it down.
 
s32 CARDGAME_drawNewCards (CardBattle *battle, CardScreen *screen, s32 side)
 Moves the cards drawn into the hand (from effectStep.vars[4] on) into place one at a time (goToNextCard), counting their colours and taking each flagged card (effectStep.marked) out of the deck (takeMarkedCard)
 

Detailed Description

CARDGAME's card effects on the hands, decks and discards: discarding, drawing, taking cards and changing colour values.

Definition in file pile_effects.c.

Function Documentation

◆ CARDGAME_startHandCount()

void CARDGAME_startHandCount ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Starts a count of side's hand and discards (effectStep.vars[0] and effectStep.vars[1])

Definition at line 7 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_discardHand()

s32 CARDGAME_discardHand ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Counts a side's hand cards over to its discards on its panel, one every 7 frames, then moves them; 1 when done.

Definition at line 16 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_startColorChange()

void CARDGAME_startColorChange ( CardBattle *  battle,
CardScreen *  screen,
s32  amount,
s32  interval 
)

Starts CARDGAME_stepColorValue: amount (effectStep.vars[3], below 0 to take) one at a time, one each interval frames (effectStep.vars[2])

Definition at line 54 of file pile_effects.c.

Referenced by CARDGAME_startColorDrain(), and startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_stepColorValue()

s32 CARDGAME_stepColorValue ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  color 
)

Moves a side's colour value (pile.points[color]) one step each effectStep.vars[2] frames towards using up effectStep.vars[3] (up to 99, down to 0), on its panel; 1 when done.

< SYSTEM10: a number counts up or down

< SYSTEM10: a number counts up or down

Definition at line 61 of file pile_effects.c.

Referenced by CARDGAME_stepEffectColorValue().

Here is the caller graph for this function:

◆ CARDGAME_startColorDrain()

void CARDGAME_startColorDrain ( CardBattle *  battle,
CardScreen *  screen 
)

Starts CARDGAME_drainColorValues.

Definition at line 113 of file pile_effects.c.

Referenced by startEffectStep().

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

◆ CARDGAME_drainColorValues()

s32 CARDGAME_drainColorValues ( CardBattle *  battle,
CardScreen *  screen 
)

Counts both sides' colour values (pile.points) down by one each effectStep.vars[2] frames, on the panels, until they are all 0; 1 when done.

Definition at line 119 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_startCloseGauge()

void CARDGAME_startCloseGauge ( CardBattle *  battle,
CardScreen *  screen 
)

Closes the gauge of the card before the last one.

Definition at line 178 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_discardPrevCard()

s32 CARDGAME_discardPrevCard ( CardBattle *  battle,
CardScreen *  screen 
)

Puts the card played before the last one (record.plays[playCount - 2]) on its side's discards once its sprite has turned; 1 when done.

Definition at line 185 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

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

◆ CARDGAME_keepLastCard()

s32 CARDGAME_keepLastCard ( CardBattle *  battle,
CardScreen *  screen 
)

Keeps the last card played in keptCard (as card + 1) and counts it (keptCount); 1.

Definition at line 225 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_showPileCard()

void CARDGAME_showPileCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  which 
)

Shows side's card at effectStep.choice as sprite 17: of its hand (which 0) or its deck (1)

Definition at line 235 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_discardPickedCard()

s32 CARDGAME_discardPickedCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  from 
)

Moves sprite 17 to the side's spot, then puts card effectStep.vars[4] on the side's discards and takes entry effectStep.choice out of the pile it came from (from 0: the hand, from 1: the deck after deckTop); 1 when over.

Definition at line 258 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_takeCardToHand()

void CARDGAME_takeCardToHand ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  which 
)

Adds card effectStep.choice of a side's discards (which 4) or deck to its hand.

Definition at line 329 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ showPileCounts()

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

Shows both sides' deck, hand and discard counts on their panels.

Definition at line 362 of file pile_effects.c.

Referenced by CARDGAME_drawFromDeck(), and CARDGAME_drawNewCards().

Here is the caller graph for this function:

◆ takeChosenDiscard()

static void takeChosenDiscard ( CardBattle *  battle,
s32  side 
)
inlinestatic

Takes card effectStep.choice out of side's used pile, shifting the cards after it up.

Definition at line 373 of file pile_effects.c.

Referenced by CARDGAME_drawFromDeck().

Here is the caller graph for this function:

◆ takeChosenCard()

static void takeChosenCard ( CardBattle *  battle,
s32  side 
)
inlinestatic

Takes card effectStep.choice out of side's deck (for the computer, a reserve card goes from the bottom), shifting the cards above it down.

Definition at line 384 of file pile_effects.c.

Referenced by CARDGAME_drawFromDeck().

Here is the caller graph for this function:

◆ CARDGAME_drawFromDeck()

s32 CARDGAME_drawFromDeck ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  which 
)

Moves the card just put in the hand into place, then takes card effectStep.choice out of the deck (takeChosenCard), or out of the used pile when which is 4 (takeChosenDiscard)

Definition at line 432 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

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

◆ CARDGAME_startDiscardCount()

void CARDGAME_startDiscardCount ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Starts a count of side's discards and deck (effectStep.vars[0] and effectStep.vars[1])

Definition at line 528 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_returnUsedCards()

s32 CARDGAME_returnUsedCards ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Counts the panel's discards down into its deck, then puts the side's discards back into its deck; 1 once done.

Definition at line 538 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_startDraw()

void CARDGAME_startDraw ( CardBattle *  battle,
CardScreen *  screen,
s32  count 
)

Starts drawing count cards (effectStep.count)

Definition at line 604 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_markDrawnCards()

s32 CARDGAME_markDrawnCards ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Marks (effectStep.marked) the cards side draws from its deck: from its top for the player, by the round's level (round) for the computer; effectStep.flags when the deck runs out; 1.

Definition at line 617 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_drawMarkedCards()

void CARDGAME_drawMarkedCards ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Moves side's marked deck cards to its hand and opens its panel.

Definition at line 657 of file pile_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ goToNextCard()

static void goToNextCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)
inlinestatic

Goes on to the next drawn card, or once all are in place to the deck's empty message or the wait before the panel closes.

Definition at line 700 of file pile_effects.c.

Referenced by CARDGAME_drawNewCards().

Here is the caller graph for this function:

◆ takeMarkedCard()

static void takeMarkedCard ( CardBattle *  battle,
s32  side 
)
inlinestatic

Takes the last marked card out of side's deck (for the computer, a reserve card goes from the bottom), shifting the cards above it down.

Definition at line 715 of file pile_effects.c.

Referenced by CARDGAME_drawNewCards().

Here is the caller graph for this function:

◆ CARDGAME_drawNewCards()

s32 CARDGAME_drawNewCards ( CardBattle *  battle,
CardScreen *  screen,
s32  side 
)

Moves the cards drawn into the hand (from effectStep.vars[4] on) into place one at a time (goToNextCard), counting their colours and taking each flagged card (effectStep.marked) out of the deck (takeMarkedCard)

Definition at line 778 of file pile_effects.c.

Referenced by CARDGAME_runEffectStep().

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