|
Digimon World 3 decomp
The European version, SLES_039.36
|
The first object of CARDGAME.PRO, from the start of the code to CARDGAME_runEffectStep (USA). More...
#include "cardgame/card_battle.h"Go to the source code of this file.
Functions | |
| s32 | CARDGAME_getEffectField (s32 index, u32 field, s32 offset) |
| One field of card effect index (CardEffect): 0 its condition, 1 its play condition, 2 its message, 3 its target, 4 its script's step at offset. | |
| void | CARDGAME_jumpIfLastSide (CardBattle *battle, CardScreen *screen, s32 value, s32 offset) |
| The effect script jumps offset steps (effectPos) when the last card played was side value's. | |
| void | CARDGAME_jumpIfFewInHand (CardBattle *battle, s32 side, s32 value, s32 offset) |
| The effect script jumps offset steps (effectPos) when side holds at most value cards. | |
| void | CARDGAME_jumpIfManyInHand (CardBattle *battle, s32 side, s32 value, s32 offset) |
| The effect script jumps offset steps (effectPos) when side holds more than value cards. | |
| void | CARDGAME_jumpIfDeckLeft (CardBattle *battle, s32 side, s32 offset) |
| The effect script jumps offset steps (effectPos) when side's deck has cards left. | |
| void | CARDGAME_jumpIfSlotFree (CardBattle *battle, s32 side, s32 offset) |
| The effect script jumps offset steps (effectPos) when side has fewer than six cards out. | |
| s32 | CARDGAME_countDown (CardBattle *battle, CardScreen *screen) |
| Counts effectStep.time down by the frame time; whether it ran out. | |
| void | CARDGAME_chooseNextDraw (CardBattle *battle, CardScreen *screen, s32 which) |
| effectStep.choice becomes the card side which draws next: the player's deck top, or the opponent's first card held back (reserveStart) | |
| void | CARDGAME_markSlotsOfOrder (CardBattle *battle, CardScreen *screen) |
| Marks (effectStep.marked) the slots whose order is the last card played's target. | |
| void | CARDGAME_markBestOpponentSlot (CardBattle *battle) |
| Marks the opponent's slot that scoreHand rates highest, and keeps it in effectStep.choice. | |
| s32 | CARDGAME_stepEffectColorValue (CardBattle *battle, CardScreen *screen) |
| Effect steps 30-40: CARDGAME_stepColorValue on a colour of the last card's side (30-35) or of the other side (36-40) | |
| static void | startEffectStep (CardBattle *battle, CardScreen *screen, s32 side, s32 nextSide, s32 other) |
| Starts the effect step battle->effectStep.next asks for: what it shows, moves or waits for before it runs. | |
| static void | jumpBackForOtherColors (CardBattle *battle, s32 other) |
| The effect script goes back four steps (effectPos) when side other holds a card of another colour than 5. | |
| static void | chooseFirstEligible (CardBattle *battle, s32 other) |
| effectStep.choice becomes the first card of side other's hand that can be picked (effectStep.eligible) | |
| static void | answerOnceDone (CardBattle *battle, s32 result) |
| Ends a step that has an answer: result, once it is no longer -1. | |
| static void | answerTableCardPick (CardBattle *battle, CardScreen *screen) |
| Effect step 141: the player picks a card on the table; the answer is 0 when there was none or the player backed out, or 1 with the picked slot's order as the next play's target. | |
| static void | answerHandCardPick (CardBattle *battle, CardScreen *screen, s32 nextSide) |
| Effect step 151: a card is picked from nextSide's hand; the answer is 0 when the player backed out, or 1 with the picked card as the next play's target. | |
| static void | answerYesNo (CardBattle *battle, CardScreen *screen) |
| Effect step 152: the yes/no question; the answer is 1 for the first choice, 0 for the second. | |
| void | CARDGAME_runEffectStep (CardBattle *battle, CardScreen *screen) |
| Starts the effect step battle->effectStep.next asks for (startEffectStep), then runs the current one (battle->effectStep.id) | |
Variables | |
| CardEffect | CARDGAME_cardEffects [60] |
| The data: the cards' effects, this object's one table. | |
The first object of CARDGAME.PRO, from the start of the code to CARDGAME_runEffectStep (USA).
CARDGAME.PRO was four objects: each one's jump tables are aligned to 8 from the start of its own rodata, and they are 4 bytes past a multiple of 8 from 0x80082A04 (USA) to 0x80082E30 and from 0x80083294 on. Where each object's code starts is only known to be between the function with the last jump table of the object before and the one with its first. The second and third objects are cut into modules, in their link order (play_checks.c to round.c, then battle_steps.c to fader.c), each with its own rodata, a cut only where each jump table keeps its place. The data is with the objects that read it: effect_script.c's table, then the second object's (data/cardgame_2.c) and the third's (data/cardgame_3.c), whose variables at the end the second object reads too.
Definition in file effect_script.c.
One field of card effect index (CardEffect): 0 its condition, 1 its play condition, 2 its message, 3 its target, 4 its script's step at offset.
Definition at line 19 of file effect_script.c.
Referenced by CARDGAME_pickComputerCard(), CARDGAME_takeFlaggedCard(), checkPlayedCard(), and runCardEffects().
| void CARDGAME_jumpIfLastSide | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | value, | ||
| s32 | offset | ||
| ) |
The effect script jumps offset steps (effectPos) when the last card played was side value's.
Definition at line 43 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_jumpIfFewInHand | ( | CardBattle * | battle, |
| s32 | side, | ||
| s32 | value, | ||
| s32 | offset | ||
| ) |
The effect script jumps offset steps (effectPos) when side holds at most value cards.
Definition at line 50 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_jumpIfManyInHand | ( | CardBattle * | battle, |
| s32 | side, | ||
| s32 | value, | ||
| s32 | offset | ||
| ) |
The effect script jumps offset steps (effectPos) when side holds more than value cards.
Definition at line 57 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_jumpIfDeckLeft | ( | CardBattle * | battle, |
| s32 | side, | ||
| s32 | offset | ||
| ) |
The effect script jumps offset steps (effectPos) when side's deck has cards left.
Definition at line 64 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_jumpIfSlotFree | ( | CardBattle * | battle, |
| s32 | side, | ||
| s32 | offset | ||
| ) |
The effect script jumps offset steps (effectPos) when side has fewer than six cards out.
Definition at line 71 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| s32 CARDGAME_countDown | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Counts effectStep.time down by the frame time; whether it ran out.
Definition at line 78 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_chooseNextDraw | ( | CardBattle * | battle, |
| CardScreen * | screen, | ||
| s32 | which | ||
| ) |
effectStep.choice becomes the card side which draws next: the player's deck top, or the opponent's first card held back (reserveStart)
Definition at line 85 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_markSlotsOfOrder | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Marks (effectStep.marked) the slots whose order is the last card played's target.
Definition at line 94 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_markBestOpponentSlot | ( | CardBattle * | battle | ) |
Marks the opponent's slot that scoreHand rates highest, and keeps it in effectStep.choice.
Definition at line 119 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| s32 CARDGAME_stepEffectColorValue | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Effect steps 30-40: CARDGAME_stepColorValue on a colour of the last card's side (30-35) or of the other side (36-40)
Definition at line 142 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
Starts the effect step battle->effectStep.next asks for: what it shows, moves or waits for before it runs.
Definition at line 183 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
The effect script goes back four steps (effectPos) when side other holds a card of another colour than 5.
Definition at line 581 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
effectStep.choice becomes the first card of side other's hand that can be picked (effectStep.eligible)
Definition at line 596 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
Ends a step that has an answer: result, once it is no longer -1.
Definition at line 608 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
Effect step 141: the player picks a card on the table; the answer is 0 when there was none or the player backed out, or 1 with the picked slot's order as the next play's target.
Definition at line 617 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
Effect step 151: a card is picked from nextSide's hand; the answer is 0 when the player backed out, or 1 with the picked card as the next play's target.
Definition at line 641 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
|
inlinestatic |
Effect step 152: the yes/no question; the answer is 1 for the first choice, 0 for the second.
Definition at line 660 of file effect_script.c.
Referenced by CARDGAME_runEffectStep().
| void CARDGAME_runEffectStep | ( | CardBattle * | battle, |
| CardScreen * | screen | ||
| ) |
Starts the effect step battle->effectStep.next asks for (startEffectStep), then runs the current one (battle->effectStep.id)
Definition at line 676 of file effect_script.c.
Referenced by CARDGAME_runBattle().
| CardEffect CARDGAME_cardEffects[60] |
The data: the cards' effects, this object's one table.
The functions and data the overlay's files share.
Definition at line 1269 of file effect_script.c.
Referenced by CARDGAME_getEffectField().