|
Digimon World 3 decomp
The European version, SLES_039.36
|
CARDGAME's plays and round: the slots swept, a card put, taken, moved, copied or turned over, a card played, the hands dealt, then the round's start, attacks, swaps, totals and end (one module: cut between them, the round's first jump table would lose its alignment). More...
#include "cardgame/card_battle.h"Go to the source code of this file.
Functions | |
| void | CARDGAME_startSlotSweep (CardBattle *battle, CardScreen *screen) |
| Starts CARDGAME_stepSlotSweep. | |
| s32 | CARDGAME_stepSlotSweep (CardBattle *battle, CardScreen *screen, s32 which) |
| Goes over the marked slots one by one, discarding their cards (which 0) or returning them to the hand (1); 1 once done. | |
| void | CARDGAME_markRecordHits (CardBattle *battle, CardScreen *screen, s32 side, s32 index) |
| Marks (marks) the plays whose effect reaches sprite index, by their target (targetKind): a side, both, or a colour; side is not used. | |
| void | CARDGAME_putSlotCard (CardBattle *battle, CardScreen *screen, s32 side, s32 card) |
| Puts a card in the side's next slot (owned by side 2) and shows it. | |
| void | CARDGAME_takeHandCard (CardBattle *battle, CardScreen *screen, s32 side) |
| Takes the card the last record names out of the side's hand into its next slot and shows it. | |
| s32 | CARDGAME_moveSlotCard (CardBattle *battle, CardScreen *screen, s32 side) |
| Moves the side's next slot card into place; 1 once it is there. | |
| void | CARDGAME_copySlotCard (CardBattle *battle, CardScreen *screen, s32 side) |
| Copies the first marked slot card (effectStep.marked) into the side's next slot. | |
| s32 | CARDGAME_flipSlotCard (CardBattle *battle, CardScreen *screen, s32 side) |
| Waits effectStep.time frames, then flips the side's next slot card over and moves it into place; 1 once it is there. | |
| void | CARDGAME_startPlayCard (CardBattle *battle, CardScreen *screen, s32 side) |
| Shows the card being played as sprite 15 (opening the panels for side 0) and starts moving it to its place in the record. | |
| s32 | CARDGAME_stepPlayCard (CardBattle *battle, CardScreen *screen) |
| Card 15 goes off and the marked slot cards turn over; it then lands in sprite 12 + CardRecord.playCount. | |
| void | CARDGAME_clearHands (CardBattle *battle, CardScreen *screen) |
| Empties both hands, on the panels with the decks. | |
| void | CARDGAME_dealHands (CardBattle *battle, CardScreen *screen) |
| Deals six cards from each side's deck into its hand and puts them on the table, face down. | |
| static void | dealNextCards (CardBattle *battle, CardScreen *screen) |
| Deals the next card of each side to its slot, and counts it off the deck on the panels. | |
| static void | countNextColors (CardBattle *battle, CardScreen *screen) |
| Counts the colours of the next card of each side; the cards that add to one blink. | |
| static void | startDealState (CardBattle *battle, CardScreen *screen) |
| Starts the state of the battle start effectStep.nextState asks for. | |
| s32 | CARDGAME_stepStart (CardBattle *battle, CardScreen *screen) |
| The start of a card battle: deals six cards to each side (dealNextCards), turns them over and counts their colours (countNextColors) (a deck with fewer than six cards shows a message instead); 1 when it ends. | |
| void | CARDGAME_startAttack (CardBattle *battle, CardScreen *screen, s32 side) |
| Starts CARDGAME_stepAttack: side's apTotal comes off the other side's hpTotal (down to 0), counted down over its cards out. | |
| s32 | CARDGAME_stepAttack (CardBattle *battle, CardScreen *screen, s32 side) |
| The side's slot cards go over one by one (every 27 frames) while the panels count its attack (CARD_PANEL_AP) and the other side's HP (CARD_PANEL_HP) down; 1 once done. | |
| void | CARDGAME_startDiscardAllSlots (CardBattle *battle, CardScreen *screen, s32 side) |
| Starts CARDGAME_stepDiscardAllSlots from side's last slot. | |
| s32 | CARDGAME_stepDiscardAllSlots (CardBattle *battle, CardScreen *screen, s32 side) |
| Discards side's slot cards from the last to the first; 1 once done. | |
| s32 | CARDGAME_interpolate (s32 to, s32 from, s32 duration, s32 time) |
| The value going from FROM to TO in DURATION, at TIME, never past TO. | |
| void | CARDGAME_startSwap (CardBattle *battle, CardScreen *screen) |
| Shows the kept card (keptCard) as sprite 17 for CARDGAME_stepSwap. | |
| s32 | CARDGAME_stepSwap (CardBattle *battle, CardScreen *screen) |
| Swaps the two sides' pile apTotal and hpTotal, counting the panels' ap and hp over to each other, then shows message 0x2D until cross or triangle; 1 once done. | |
| void | CARDGAME_showSlotTotal (CardBattle *battle, CardScreen *screen, s32 side) |
| Adds up the marked slots' ap and hp (at most 99, 20 more for four or more slots) and shows them on sprite 0x11 with card effectStep.vars[4], looked for among the card list's last 100 cards. | |
| s32 | CARDGAME_stepSlotTotal (CardBattle *battle, CardScreen *screen, s32 side) |
| Takes the marked slots' sprites away, shows card effectStep.vars[4] in window 2 for 90 frames (or until cross or triangle), then adds effectStep.vars[1] and effectStep.vars[2] to the side's pile apTotal and hpTotal, counting the panel values up; 1 once done. | |
| void | CARDGAME_startTotals (CardBattle *battle, CardScreen *screen) |
| Starts CARDGAME_stepTotals. | |
| s32 | CARDGAME_stepTotals (CardBattle *battle, CardScreen *screen) |
| Adds up both players' slots' ap and hp and counts the panels' ap and hp over to the totals, which become the sides' pile apTotal and hpTotal; 1 once done. | |
| void | CARDGAME_startRoundEnd (CardBattle *battle, CardScreen *screen) |
| Starts CARDGAME_stepRoundEnd. | |
| s32 | CARDGAME_stepRoundEnd (CardBattle *battle, CardScreen *screen, s32 side) |
| Takes the side's slots away one by one, then moves both sides' hands back into their decks one at a time (the panels' hand and deck) and shows window 5 until cross or triangle; 1 once done. | |
CARDGAME's plays and round: the slots swept, a card put, taken, moved, copied or turned over, a card played, the hands dealt, then the round's start, attacks, swaps, totals and end (one module: cut between them, the round's first jump table would lose its alignment).
Definition in file round.c.
| void CARDGAME_startSlotSweep | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Starts CARDGAME_stepSlotSweep.
Definition at line 9 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepSlotSweep | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | which | ||
| ) |
Goes over the marked slots one by one, discarding their cards (which 0) or returning them to the hand (1); 1 once done.
Definition at line 16 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_markRecordHits | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side, | ||
| s32 | index | ||
| ) |
Marks (marks) the plays whose effect reaches sprite index, by their target (targetKind): a side, both, or a colour; side is not used.
Definition at line 60 of file round.c.
Referenced by CARDGAME_copySlotCard(), CARDGAME_putSlotCard(), and CARDGAME_takeHandCard().
| void CARDGAME_putSlotCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side, | ||
| s32 | card | ||
| ) |
Puts a card in the side's next slot (owned by side 2) and shows it.
Definition at line 120 of file round.c.
Referenced by startEffectStep().
| void CARDGAME_takeHandCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Takes the card the last record names out of the side's hand into its next slot and shows it.
Definition at line 151 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_moveSlotCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Moves the side's next slot card into place; 1 once it is there.
Definition at line 188 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_copySlotCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Copies the first marked slot card (effectStep.marked) into the side's next slot.
Definition at line 245 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_flipSlotCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Waits effectStep.time frames, then flips the side's next slot card over and moves it into place; 1 once it is there.
Definition at line 293 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_startPlayCard | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Shows the card being played as sprite 15 (opening the panels for side 0) and starts moving it to its place in the record.
Definition at line 358 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepPlayCard | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Card 15 goes off and the marked slot cards turn over; it then lands in sprite 12 + CardRecord.playCount.
1 once done
Definition at line 408 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_clearHands | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Empties both hands, on the panels with the decks.
Definition at line 524 of file round.c.
Referenced by startEffectStep().
| void CARDGAME_dealHands | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Deals six cards from each side's deck into its hand and puts them on the table, face down.
Definition at line 537 of file round.c.
Referenced by startDealState().
|
inlinestatic |
Deals the next card of each side to its slot, and counts it off the deck on the panels.
Definition at line 581 of file round.c.
Referenced by CARDGAME_stepStart().
|
inlinestatic |
Counts the colours of the next card of each side; the cards that add to one blink.
Definition at line 607 of file round.c.
Referenced by CARDGAME_stepStart().
|
inlinestatic |
Starts the state of the battle start effectStep.nextState asks for.
< W_JINGLE: a battle won
Definition at line 620 of file round.c.
Referenced by CARDGAME_stepStart().
| s32 CARDGAME_stepStart | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
The start of a card battle: deals six cards to each side (dealNextCards), turns them over and counts their colours (countNextColors) (a deck with fewer than six cards shows a message instead); 1 when it ends.
Definition at line 670 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_startAttack | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Starts CARDGAME_stepAttack: side's apTotal comes off the other side's hpTotal (down to 0), counted down over its cards out.
Definition at line 781 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepAttack | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
The side's slot cards go over one by one (every 27 frames) while the panels count its attack (CARD_PANEL_AP) and the other side's HP (CARD_PANEL_HP) down; 1 once done.
Definition at line 804 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_startDiscardAllSlots | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Starts CARDGAME_stepDiscardAllSlots from side's last slot.
Definition at line 871 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepDiscardAllSlots | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Discards side's slot cards from the last to the first; 1 once done.
Definition at line 878 of file round.c.
Referenced by CARDGAME_runEffectStep().
The value going from FROM to TO in DURATION, at TIME, never past TO.
Definition at line 899 of file round.c.
Referenced by CARDGAME_stepSlotTotal(), CARDGAME_stepSwap(), and CARDGAME_stepTotals().
| void CARDGAME_startSwap | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Shows the kept card (keptCard) as sprite 17 for CARDGAME_stepSwap.
Definition at line 919 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepSwap | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Swaps the two sides' pile apTotal and hpTotal, counting the panels' ap and hp over to each other, then shows message 0x2D until cross or triangle; 1 once done.
Definition at line 928 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_showSlotTotal | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Adds up the marked slots' ap and hp (at most 99, 20 more for four or more slots) and shows them on sprite 0x11 with card effectStep.vars[4], looked for among the card list's last 100 cards.
Definition at line 998 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepSlotTotal | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Takes the marked slots' sprites away, shows card effectStep.vars[4] in window 2 for 90 frames (or until cross or triangle), then adds effectStep.vars[1] and effectStep.vars[2] to the side's pile apTotal and hpTotal, counting the panel values up; 1 once done.
Definition at line 1062 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_startTotals | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Starts CARDGAME_stepTotals.
Definition at line 1163 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepTotals | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Adds up both players' slots' ap and hp and counts the panels' ap and hp over to the totals, which become the sides' pile apTotal and hpTotal; 1 once done.
< SYSTEM10: a number counts up or down
Definition at line 1173 of file round.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_startRoundEnd | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Starts CARDGAME_stepRoundEnd.
Definition at line 1226 of file round.c.
Referenced by startEffectStep().
| s32 CARDGAME_stepRoundEnd | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | side | ||
| ) |
Takes the side's slots away one by one, then moves both sides' hands back into their decks one at a time (the panels' hand and deck) and shows window 5 until cross or triangle; 1 once done.
< SYSTEM10: a number counts up or down
Definition at line 1237 of file round.c.
Referenced by CARDGAME_runEffectStep().