22 screen->
openWindow(screen, 0, 0, text, 0, 0x42);
25 screen->
openWindow(screen, 5, 4, 0x24, 0, 0x14);
45#if VERSION_EU || VERSION_JP
62#elif VERSION_EU || VERSION_JP
97#elif VERSION_EU || VERSION_JP
140#elif VERSION_EU || VERSION_JP
166#elif VERSION_EU || VERSION_JP
185#elif VERSION_EU || VERSION_JP
263 for (i = 0; i < 5; i++) {
CARDGAME.PRO: the card battle (mode 0x700).
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
#define CARD_ANIM_UNDIM_ALL
CardAnim.dimAll.
s16 CARDGAME_stepWindowPositions[2][3][4][2]
three sets of four positions, then the same moved for SHIFT_PAL_SCREEN
CardBattleStep CARDGAME_windowSteps[]
s16 CARDGAME_countingCards[]
five card ids, minus one
GfxState GFX
GFX: the graphics state and its methods.
s32 SHIFT_PAL_SCREEN
moves both display areas 0x18 lines down
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
s32 CARDGAME_canPlayCard(CardBattle *battle, u8 *points, s32 card)
Whether a card can be played: in CARD_PHASE_PUT_OUT a kind 0x10 card needs as many points of its colo...
static void readYesNoInput(CardBattle *battle, CardScreen *screen)
The yes/no window's buttons: cross answers, triangle answers the second choice, up and down change th...
static void hideForMenu(CardBattle *battle, CardScreen *screen)
Closes the panels and opens the battle menu once they are closed.
void CARDGAME_startQuestion(CardBattle *battle, CardScreen *screen, s32 value)
Opens the panels and asks message value; the European and Japanese versions start on the second choic...
s16 CARDGAME_getStepWindowPos(s32 a, s32 b, s32 c)
A position of CARDGAME_stepWindowPositions.
void CARDGAME_showCardInfo(CardBattle *battle, CardScreen *screen, s32 offset)
Fills the information windows with the card of sprite offset + effectStep.cursor (the highlighted one...
void CARDGAME_clearCardInfo(CardBattle *battle, CardScreen *screen)
Empties the card information windows 1-4.
s32 CARDGAME_stepYesNo(CardBattle *battle, CardScreen *screen)
Runs the yes/no window that CARDGAME_startQuestion sets up: 1 for the first choice,...
static void showAfterMenu(CardBattle *battle, CardScreen *screen)
Back from the battle menu: reopens the yes/no window once the panels are open again.
s32 CARDGAME_openStepWindows(CardBattle *battle, CardScreen *screen, s32 layout, s32 text, s32 time, s32 step)
Opens the windows of the step CARDGAME_windowSteps[step] once its time is past; the next step.
void CARDGAME_showTableCardInfo(CardBattle *battle, CardScreen *screen, s32 kind)
CARDGAME_showCardInfo for the highlighted card of a row (kind 0, 1 or 2, as CARDGAME_moveTableHighlig...
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_CURSOR
SYSTEM02: a cursor moves.
u8 dimAll
sets dimmed of the first 15 sprites once
The card battle (CARDGAME_createBattle).
u8 run
what runs this frame (CARD_RUN_*)
s16 cards[250]
card ids, minus one (CARDGAME_loadCardImages)
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
u8 level
a Digimon's, 2-5 (CARDGAME shows its name); 0 on the other cards
s16 choice
the cursor's row
u8 state
1 opening, 2 open, 4 confirmed, 5 closing
s32 place
in CARDGAME_messageWindowPositions
u8 points[5]
one per card colour
s16 hand[10]
handCount in use
u8 menuState
CARDGAME_runBattleMenu's state.
s8 playCount
the plays in use
The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the ...
CardMessageWindow message
void(* openWindow)(struct CardScreen *screen, s32 index, s16 layout, s32 value, s32 x, s32 y)
void(* openPanels)(struct CardScreen *screen)
void(* setMessageChoice)(struct CardScreen *screen, s32 choice)
void(* openMessage)(struct CardScreen *screen, s32 message, s32 prompt, s16 choice, s32 place)
void(* confirmMessage)(struct CardScreen *screen)
void(* closePanels)(struct CardScreen *screen)
void(* closeMessage)(struct CardScreen *screen)
s16 index
in the battle's card list
u8 ap
the values shown, which count towards the slot's
s16 color
the card's colour, from 0
s32 cursor
the card or slot highlighted
s32 time
a frame count, or the step's own sub-state
u8 state
the step's own state
s32 vars[5]
values each step uses its own way
s32 choice
the card, slot or answer chosen; -1 for none
u8 numbers[3]
two numbers, and whether they are shown
s32 value
by its layout: a string, a card, or points | colour << 4
s32(* getFrameTime)(void)
short(* playSound)(s32 id)
returns the voice of a key-on