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

CARDGAME's card effects on the slots: shaking cards away, sending them off or back, their stats, and marking them by colour. More...

Include dependency graph for slot_effects.c:

Go to the source code of this file.

Functions

s32 CARDGAME_addColorCount (CardBattle *battle, CardScreen *screen, s32 side, s32 card)
 Counts a card of the colour it has on a side's panel (at most 99); 1 if it has one.
 
s32 CARDGAME_stepShakeAway (CardBattle *battle, CardScreen *screen, s32 index)
 Shakes sprite index, then shrinks it to nothing; 1 once done.
 
void CARDGAME_discardSlotCard (CardBattle *battle, CardScreen *screen, s32 side, s32 index)
 Puts the card of side's slot index on its owner's discards, on the panel.
 
s32 CARDGAME_stepDiscardSlotCard (CardBattle *battle, CardScreen *screen, s32 side, s32 index)
 Shakes side's slot index away, then CARDGAME_discardSlotCard; 1 once done.
 
s32 CARDGAME_stepSendOff (CardBattle *battle, CardScreen *screen, s32 index)
 Moves sprite index off the left of the screen; 1 once it is there.
 
void CARDGAME_returnSlotCard (CardBattle *battle, CardScreen *screen, s32 side, s32 index)
 Puts the card of side's slot index back in its owner's hand, on the panel.
 
s32 CARDGAME_stepReturnSlotCard (CardBattle *battle, CardScreen *screen, s32 side, s32 index)
 Sends side's slot index off, then CARDGAME_returnSlotCard; 1 once done.
 
void CARDGAME_startSlotEffects (CardBattle *battle, CardScreen *screen, s32 which)
 Starts effect 3 (which 0) or 4 on the flagged cards in play, and plays a sound if there were any.
 
s32 CARDGAME_waitFor (CardBattle *battle, CardScreen *screen, s32 duration)
 Counts effectStep.time up by the frame time; whether it passed duration.
 
void CARDGAME_moveMarkedSlots (CardBattle *battle, CardScreen *screen, s32 offset, s32 mode)
 Starts moving the marked slots (effectStep.marked) by an offset packed as x << 16 | y.
 
s32 CARDGAME_stepSlotStats (CardBattle *battle, CardScreen *screen)
 Counts the marked slots' ap and hp up or down by one a frame (sign of effectStep.vars[0]/effectStep.vars[1], for effectStep.vars[2]/effectStep.vars[3] frames, clamped to 0..99) with their sprites; when both are over, marks the slots whose hp reached 0.
 
void CARDGAME_markTargetSlots (CardBattle *battle, CardScreen *screen)
 Marks in effectStep.marked the slots out that the last card played applies to, by its target (record.plays[].targetKind): a side, both, or a card colour.
 
void CARDGAME_beginStep (CardBattle *battle, CardScreen *screen)
 Starts a step's first state.
 
s32 CARDGAME_removeMarkedSlots (CardBattle *battle, CardScreen *screen)
 Removes the slots marked in effectStep.marked: slides the cards after them left on screen, then moves their slots and sprites down and shrinks slotCount; 1 when over.
 
s32 CARDGAME_markPileCardsByColor (CardBattle *battle, CardScreen *screen, s32 side, s32 kind, s32 flags)
 Marks in effectStep.eligible the cards of a side's hand (kind 2), deck (3) or discards (4) whose colour has its bit (CARDGAME_colorFlags) in flags (kind 16 cards only with flags bit 0, the others with bit 1); 1 if any.
 
s32 CARDGAME_markSlotsByColor (CardBattle *battle, CardScreen *screen, s32 side, s32 flags)
 Marks in effectStep.eligible the slots of the sides flags picks (0x100 side's own, 0x200 the other) whose card colour has its bit (CARDGAME_colorFlags) in flags; 1 if any.
 

Detailed Description

CARDGAME's card effects on the slots: shaking cards away, sending them off or back, their stats, and marking them by colour.

Definition in file slot_effects.c.

Function Documentation

◆ CARDGAME_addColorCount()

s32 CARDGAME_addColorCount ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  card 
)

Counts a card of the colour it has on a side's panel (at most 99); 1 if it has one.

Definition at line 7 of file slot_effects.c.

Referenced by countNextColors().

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

◆ CARDGAME_stepShakeAway()

s32 CARDGAME_stepShakeAway ( CardBattle *  battle,
CardScreen *  screen,
s32  index 
)

Shakes sprite index, then shrinks it to nothing; 1 once done.

Definition at line 27 of file slot_effects.c.

Referenced by CARDGAME_discardPrevCard(), and CARDGAME_stepDiscardSlotCard().

Here is the caller graph for this function:

◆ CARDGAME_discardSlotCard()

void CARDGAME_discardSlotCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  index 
)

Puts the card of side's slot index on its owner's discards, on the panel.

Definition at line 53 of file slot_effects.c.

Referenced by CARDGAME_stepDiscardSlotCard(), and CARDGAME_stepRoundEnd().

Here is the caller graph for this function:

◆ CARDGAME_stepDiscardSlotCard()

s32 CARDGAME_stepDiscardSlotCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  index 
)

Shakes side's slot index away, then CARDGAME_discardSlotCard; 1 once done.

Definition at line 69 of file slot_effects.c.

Referenced by CARDGAME_stepDiscardAllSlots(), and CARDGAME_stepSlotSweep().

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

◆ CARDGAME_stepSendOff()

s32 CARDGAME_stepSendOff ( CardBattle *  battle,
CardScreen *  screen,
s32  index 
)

Moves sprite index off the left of the screen; 1 once it is there.

Definition at line 80 of file slot_effects.c.

Referenced by CARDGAME_stepReturnSlotCard().

Here is the caller graph for this function:

◆ CARDGAME_returnSlotCard()

void CARDGAME_returnSlotCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  index 
)

Puts the card of side's slot index back in its owner's hand, on the panel.

Definition at line 103 of file slot_effects.c.

Referenced by CARDGAME_stepReturnSlotCard().

Here is the caller graph for this function:

◆ CARDGAME_stepReturnSlotCard()

s32 CARDGAME_stepReturnSlotCard ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  index 
)

Sends side's slot index off, then CARDGAME_returnSlotCard; 1 once done.

Definition at line 119 of file slot_effects.c.

Referenced by CARDGAME_stepSlotSweep().

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

◆ CARDGAME_startSlotEffects()

void CARDGAME_startSlotEffects ( CardBattle *  battle,
CardScreen *  screen,
s32  which 
)

Starts effect 3 (which 0) or 4 on the flagged cards in play, and plays a sound if there were any.

The steps CARDGAME_runEffectStep starts (CardBattle.effectStep.next) and runs (effectStep.id)

Definition at line 131 of file slot_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_waitFor()

s32 CARDGAME_waitFor ( CardBattle *  battle,
CardScreen *  screen,
s32  duration 
)

Counts effectStep.time up by the frame time; whether it passed duration.

Definition at line 163 of file slot_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_moveMarkedSlots()

void CARDGAME_moveMarkedSlots ( CardBattle *  battle,
CardScreen *  screen,
s32  offset,
s32  mode 
)

Starts moving the marked slots (effectStep.marked) by an offset packed as x << 16 | y.

Definition at line 169 of file slot_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_stepSlotStats()

s32 CARDGAME_stepSlotStats ( CardBattle *  battle,
CardScreen *  screen 
)

Counts the marked slots' ap and hp up or down by one a frame (sign of effectStep.vars[0]/effectStep.vars[1], for effectStep.vars[2]/effectStep.vars[3] frames, clamped to 0..99) with their sprites; when both are over, marks the slots whose hp reached 0.

Definition at line 216 of file slot_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_markTargetSlots()

void CARDGAME_markTargetSlots ( CardBattle *  battle,
CardScreen *  screen 
)

Marks in effectStep.marked the slots out that the last card played applies to, by its target (record.plays[].targetKind): a side, both, or a card colour.

Definition at line 297 of file slot_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_beginStep()

void CARDGAME_beginStep ( CardBattle *  battle,
CardScreen *  screen 
)

Starts a step's first state.

Definition at line 370 of file slot_effects.c.

Referenced by startEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_removeMarkedSlots()

s32 CARDGAME_removeMarkedSlots ( CardBattle *  battle,
CardScreen *  screen 
)

Removes the slots marked in effectStep.marked: slides the cards after them left on screen, then moves their slots and sprites down and shrinks slotCount; 1 when over.

Definition at line 375 of file slot_effects.c.

Referenced by CARDGAME_runEffectStep().

Here is the caller graph for this function:

◆ CARDGAME_markPileCardsByColor()

s32 CARDGAME_markPileCardsByColor ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  kind,
s32  flags 
)

Marks in effectStep.eligible the cards of a side's hand (kind 2), deck (3) or discards (4) whose colour has its bit (CARDGAME_colorFlags) in flags (kind 16 cards only with flags bit 0, the others with bit 1); 1 if any.

Definition at line 478 of file slot_effects.c.

Referenced by CARDGAME_checkComputerCondition(), and CARDGAME_runEffectStep().

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

◆ CARDGAME_markSlotsByColor()

s32 CARDGAME_markSlotsByColor ( CardBattle *  battle,
CardScreen *  screen,
s32  side,
s32  flags 
)

Marks in effectStep.eligible the slots of the sides flags picks (0x100 side's own, 0x200 the other) whose card colour has its bit (CARDGAME_colorFlags) in flags; 1 if any.

Definition at line 537 of file slot_effects.c.

Referenced by CARDGAME_checkComputerCondition(), and CARDGAME_runEffectStep().

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