116 for (i = 0; i < 12; i++) {
124 for (side = 0; side < 2; side++) {
174 s32 other = side ^ 1;
251 for (slot = 0; slot < 12; slot++) {
272 for (i = 0; i < 12 && ok == 1; i++) {
s32 CARDGAME_waitMessage(CardBattle *battle, CardScreen *screen)
Waits for the message window to open, for cross or triangle, then for the window to close; 1 once it ...
s32 CARDGAME_checkPlayCondition(CardBattle *battle, CardScreen *screen, s32 kind)
Whether the condition kind (1-11) of the card being played holds for its side: 1 if it does.
void CARDGAME_startClosePanels(CardBattle *battle, CardScreen *screen, s32 force)
When the last card was the player's (or force): takes its play off for a while and closes the panels.
s32 CARDGAME_stepClosePanels(CardBattle *battle, CardScreen *screen)
Waits for the panels to close and puts the play back; 1 once done.
void CARDGAME_startMessage(CardBattle *battle, CardScreen *screen, s32 text)
Opens message text for a step.
s32 CARDGAME_stepOpenPanels(CardBattle *battle, CardScreen *screen)
Waits for the panels to open and puts the play back; 1 once done.
void CARDGAME_startOpenPanels(CardBattle *battle, CardScreen *screen, s32 force)
When the last card was the player's (or force): takes its play off for a while and opens the panels.
s32 CARDGAME_countSlotValues(CardBattle *battle, CardScreen *screen)
Steps each slot's shown values (its sprite's ap and hp) one unit toward the slot's ap and hp,...
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.
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define SOUND_COUNT
SYSTEM10: a number counts up or down.
u8 dimAll
sets dimmed of the first 15 sprites once
The card battle (CARDGAME_createBattle).
s16 cards[250]
card ids, minus one (CARDGAME_loadCardImages)
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
u8 kind
an index in CARD_KINDS
u8 state
1 opening, 2 open, 4 confirmed, 5 closing
s16 deckCount
the cards left in the deck
s16 deck[40]
deckTop on are left
s16 deckTop
the index of the deck's top card
s16 hand[10]
handCount in use
u8 targetKind
its effect's (CardEffect.target)
u8 target
the slot's order, or the card, it was played on
s8 playCount
the plays in use
CardPlay plays[3]
the cards played this turn, up to three
The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the ...
CardMessageWindow message
s32(* getCardColor)(struct CardScreen *screen, s32 index)
void(* openPanels)(struct CardScreen *screen)
void(* openMessage)(struct CardScreen *screen, s32 message, s32 prompt, s16 choice, s32 place)
void(* closePanels)(struct CardScreen *screen)
void(* closeMessage)(struct CardScreen *screen)
A card a player has out (CARDGAME_setSlot)
s16 hp
its hit points, 0 to 99: at 0 it is lost
s16 ap
its attack points, 0 to 99
s16 card
the index in the battle's card list
u8 order
CardBattle.slotCount when it was added.
A card on the battle screen (CardScreen.sprites)
u8 ap
the values shown, which count towards the slot's
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
s8 marked[40]
the cards or slots picked
short(* playSound)(s32 id)
returns the voice of a key-on